Nope...
Lets say we had ten thousand captures after this;
Code:
Loop:
TMR1H = 0 'Clear 8-bit register
TMR1L = 0 'Clear 8-bit register
capture = 0 'Clear Timer
'SEROUT2 LCD,84, [Prefix,CursorPS,0,"Capture ", dec Capture," ",DEC Period]
Start:
If Capture = 0 then
Goto Start
endif
T1CON.0=1
Capture = 0
CaptureLoop:
If Capture = 0 then
'SEROUT2 LCD,84, [Prefix,CursorPS,0,"Dont Capture ", dec Capture," ",DEC Period]
Goto CaptureLoop
endif
T1Con.0=0
period.LowByte=CCPR1L
period.HighByte=CCPR1H
They would all be zero since TMR1 was disabled after the T1CON.0=0.
Once period = CCPR1L & CPR1H it's a done deal until the next capture,
and Timer1 is re-enabled.
Capture works wether or not Timer1 is enabled. It just returns 0 if it's off.
Yet - I may be missing something...
Bookmarks