PDA

View Full Version : Any PICBASIC codes that demonstrate the use of multiple timers for 16F628A ?



GirLovesWaffles
- 20th July 2011, 07:39
16F628A Datasheet:
Timers 2 x 8-bit, 1 x 16-bit

How do you use those multiple timers in PICBasic ?

I would like to run two LED chaser sequence [5 LEDs each] but they are to be played out in different speeds.

I think using the 2 eight bit timers would be nice [I am assuming here that they are completely independent of each other.]

Actually I don't even mind using the 16 bit timer too if it is necessary, I just need it to work.*

The longer LED chaser sequence of the two will have a pause of say 100 [PICBASIC: Pause 100] before the next LED lights up.

Is there any PICBASIC codes that demonstrate the use of multiple timers ?

Hopefully not too overly complicated as I am just trying to flash some LEDs here.

mackrackit
- 20th July 2011, 12:59
This might be the easiest way to get started.
http://www.picbasic.co.uk/forum/showthread.php?t=3251