PDA

View Full Version : counter



daydream
- 2nd May 2012, 08:16
hi,can someone tell me how to use timer0 in pic16f628 as a counter.an example like counting the pulses of an inputed puls signal using timer0.

thank you.

Demon
- 2nd May 2012, 20:48
I'm on cellphone, can't post details.

Search here for DT INTERRUPTS, use that to make a 1 second timer, then count how many times the input pin goes high.

Robert

EDIT: For better sampling, use 60 sec timer and divide by 60.

mister_e
- 3rd May 2012, 04:52
code example, search for frequency counter, pulse counter, olympic timer etc.... even of grandpa 16f84 template are still valuable...