try with this
Code:
' measure time that RA.1 stays high
TMR1L=0
TMR1H=0
' test if the signal is already high
'
Signal1HIGH:
if signal1 then Signal1HIGH
' wait for the rising edge
'
while signal1 = 0
wend
' signal is now high... let's count the "hi" time
'
T1CON.0 = 1 ' start Timer1
While signal1 ' wait for falling edge
wend
T1CON = 0 ' stopTimer
' store the result
'
signal1time.lowbyte = TMR1L
Signal1time.highbyte = TMR1H
Last edited by mister_e; - 14th February 2005 at 15:04.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks