Electronic – five month countdown timer circuit

counterpictimer

I'm a beginner in electronics, so I just have an idea in my head and don't know how to actually make it. I want to make a countdown circuit, for an event in next 5 month. The display format is like this:

DDD HH MM SS

Days have 3 digits, hours, minutes and seconds have 2 digits and I want to show the numbers on 7-segment displays. I just want to show remained time to a specific time, some day in October. I want to make it with a PIC or anything that you suggest.
I googled it, but just found a MM:SS countdown circuit. I can't expand it for solving my question. How can I do that?

Best Answer

In order to expand the display to displaying DDD MM HH, you need five more I/O lines for the DDD and SS. The PIC16F84A microntroller shown in the linked circuit has only 13 I/O lines and there are all used. (If you don't need the buzzer and relay outputs then potentially you have two spare outputs, but as I mentioned above, you need five.)

So If you want to stay with the PIC16F series of microcontrollers in your linked circuit, I would expand it to meet your needs using a PIC16F883 which has 24 I/O pins. (They make PIC16F microcontrollers with 18 and 20 I/O pins, but only in SMD packages, and I assume you want through-hole). Just add five more outputs going to additional transistors like T1-T4 driving the five new seven segment displays, and the a-g inputs of the displays to the parallel bus coming out of resistor pack R5-R11.

For a crystal, you need to choose one that has a tight tolerance as possible to keep the drift to a minimum. Timer1 of the PIC16F883 can run off of a 32KHz 30 ppm watch crystal.

Software wise, set up Timer1 to interrupt once a second. Use the Set and Select buttons as in the previous application to set up the initial DDD:HH:MM:SS values. On each interrupt, update the display -- decrement seconds, when they roll over from 00 to 59, decrement minutes etc.