-
Pulse In??
Hi All!
Maybe a silly question and if you wished to measure the time (duration) of a 5 volt pulse I know you would use pulsin as
Plusin PortA.0,1,w3 (the 1 meaning when the pulse goes high). Now if you wish to know the time the signal is low you would use
Plusin PortA.0,0,w4. The question does the second measurement of time the signal is low happen immediately after the measurement of the high timing or does it wait until the next high to low trasition? Thanks, Ed
-
Re: Pulse In??
No, it "triggers" on the rising or falling edge of the signal.
Your PULSIN PortA.0, 1, W3 will start timing on the rising edge and stop timing on the falling edge. The next PULSIN PortA.0, 0, W4 won't be able to "see" the same falling edge that the first one sees.
/Henrik.
-
Re: Pulse In??
Code:
PULSIN Input, 1, HiPart
RCTIME Input, 0, LoPart
That's done ... ( may be some µS ( 4 or 6 ? ) to add to LoPart to be really true ... ;) )
Alain
-
Re: Pulse In??
Thank you so much Alian!
Had not thought of that as a possibility!
Best, Ed