This is a simple countdown-timer-on-a-chip project – you program the PIC, attach some buttons and a pair of 2-segment LEDs, and you are done.
I used this timer for one of my projects, but I tried to make that timer as generic as possible, so it can have other applications. On this site I describe only the timer itself – code, pinout, and operation. If you want to see something built with the timer, check my Air Sampler project.
Give it a try:
- Two digit LED display with maximum count time of 99 units (units are configurable and can be seconds, minutes, or hours).
- Start/Stop/Increment/Decrement buttons working in press and press-and-hold mode.
- Optional Increment-by-ten/Decrement-by-ten buttons.
- Pause and resume.
- Add or subtract time while timer is running.
- One output to control an external device or signal time state.
- One unused pin – you can customize the code to make use of it as an either input or output.
- Works with a cheap 3.579545 MHz (NTSC) crystal, easily adjustable to other frequencies.
You can give it a try right now – the widget on the right is a fully-operational simulation of the timer, configured to count seconds. Adjust the time using the , , , and buttons. Start the timer with the button. Pause, stop, or clear timer by pressing . Pressing and holding a button works as you would expect from any timer. The green LED will show you when the timer is working – in real life, instead of the LED you will most likely have some device controlled by the timer.
If you have questions or comments, or if you have found an error on this site, please let me know. My e-mail is at the bottom of the page.
For more detail: Countdown Timer using PIC16F690 microcontroller