PDA

View Full Version : Variable timer



Cezar Neto
- 14th February 2008, 23:43
Hello!

I need a variable timer using a PIC but I didnīt have success. When I say variable I mean that I have to change the range of counting, for example, sometimes I need to count from 1 second to 1 minute but sometimes I have to count from 1 second to 3 minutes. Sometimes I have to have a port ON for 1 minute and sometimes for 3 minutes. Iīve tried to change the clock, instead using a cristal based I used a RC clock, changing the resistor and capacitor, but it didnīt work. Does anyone have a sugestion on how to do it?

Thanks.

krohtech
- 14th February 2008, 23:52
I would use Darrel’s Instant Interrupt system and the Elapsed Timer
http://darreltaylor.com/DT_INTS-14/elapsed.html

skimask
- 15th February 2008, 04:04
Hello!
I need a variable timer using a PIC but I didnīt have success. When I say variable I mean that I have to change the range of counting, for example, sometimes I need to count from 1 second to 1 minute but sometimes I have to count from 1 second to 3 minutes. Sometimes I have to have a port ON for 1 minute and sometimes for 3 minutes. Iīve tried to change the clock, instead using a cristal based I used a RC clock, changing the resistor and capacitor, but it didnīt work. Does anyone have a sugestion on how to do it?
Thanks.

Show us some code!