PDA

View Full Version : Timer quetion?



FastEddie
- 17th August 2007, 05:43
Hi,
I just wondered if anyone has a simple example for using the timer in PBC (not the Pro version). I've looked all over and have found a few examples for the pro version and a few for assembly. Unfortunately, I don't have the pro version, and don't yet have enough courage to try any assembly. Basically, all I'm trying to do is:

After I get an input from one switch(SW0), my timer starts counting for about 2 or 3 minutes. Then if I get an input from another switch(SW1) the timer starts over. If I get an input from yet another switch(SW2) while the timer is counting, the output of 1 of my pins(Out0) turns on.
I don't have any idea how do this since I've always used PAUSE before for timing situations, but I've never had to check for inputs at the same time. Any examples would be appreciated.
I'm using the 16F818 @4 MHz with the internal osc.

Thanks,
Ed