Hi,
How can I use timer2 with pause command?(16f877)
For example:
pause 7000 ' with tmr2
Hi,
How can I use timer2 with pause command?(16f877)
For example:
pause 7000 ' with tmr2
Timer2 is not very versatile as it's an 8-bit Timer (eg 16F628). With both the Postscaler and Prescaler enabled you can only get 16*256*2 oscillator ticks out of it (check your PICs Datasheet). The longest timing sequence (at 4MHz) is therefore 8.192mS. You need some additional external variable as a counter (and associated processing code) to time intervals as long as your 7 second example. Is there a reason you don't want to use Pause?
Hi,
I want to use tmr2 ,like this
for i = 1 to 900
pause 8 'tmr2
next i
Can I set tmr2 to work with pause command?
Bookmarks