While Loop Ends Unexpectedly.
Re: While Loop Ends Unexpectedly.
Do I need to make T1_CCR = 0x30 to interrupt on the falling edge, then in the interrupt routine reset T1_CCR = 0x28, if P1.18 = 0, and T1_CCR = 0x30 if P1.18 = 1?
Re: While Loop Ends Unexpectedly.
No you can interrupt on both.
What kind of signal are you measuring? Is it clean, or could it have multiple transitions like a switch bounce?
What kind of signal are you measuring? Is it clean, or could it have multiple transitions like a switch bounce?
Re: While Loop Ends Unexpectedly.
My test setup produces an output from a Coridium SuperPro board. It's pulling down a 1K load connected to 5 volts supplied by the ProPlus board under test. The 5.0 Volts is from the USB dongle.
I have P1.18 connected to a channel on my 100Mhz logic analyzer. I can see some steps in the falling edge, but mostly it's clean.
I have P1.18 connected to a channel on my 100Mhz logic analyzer. I can see some steps in the falling edge, but mostly it's clean.
Re: While Loop Ends Unexpectedly.
I commented out VICIntEnable0 = 0x4 in the interrupt routine. The main program runs, but the interrupt is sporadic.
Re: While Loop Ends Unexpectedly.
I changed T1_IR = 0x10 to T1_IR = 0x20, and reinserted VICIntEnable0 = 0x4. Now it all seems to be working. I am using Capture Channel 1, not Capture Channel 0.
I'll try to remove some of the redundant instructions.
I'll try to remove some of the redundant instructions.
Re: While Loop Ends Unexpectedly.
I removed the redundant instruction. It still looks good. Now I have to integrate it into the target program, as this was a test program just to debug this problem. The interrupt routine shouldn't be changed by that.