www.webx.dk Start page
OZ2CPU Radioamateur mainpage
Homemade electronics
Homemade LED 7 segment Count Down Alarm


Here it is set for 3.00 minutes count down, ready to be started.


Here I have added two fets for the time-out switch, it is like an electronic relay, just much more reliable
it can be used to sound a big horn, or what ever you like.

PIC 16F84 running 4.00 MHz using crystal or resonator, not critical since this count down alarm only runs for a few minutes

Pinout information inputs:
RA0 pin 17 = Pause input, active low, pulled up
RA4 pin 3 = Start input, active low, pulled up
MCLR pin 4 = Restart input, active low, pulled up

Pinout information outputs:
RB0 pin 6 = alarm output, active hi
RB1 pin 7 = A Segment (active low in prototype software)
RB2 pin 8 = B Segment
RB3 pin 9 = C Segment
RB4 pin 10 = D Segment
RB5 pin 11 = E Segment
RB6 pin 12 = F Segment
RB7 pin 13 = G Segment
RA1 pin 18 = select digit 1 (minutes) active hi
RA2 pin 1 = select digit 2 (sec 10) active hi
RA3 pin 2 = select digit 3 (sec 1) active hi
Crystal or resonator on pin 15 and 16
Power on pin 14 and ground on pin 5

Here is a test version that uses 3 LED displays with common +
I have just soldered the 3 displays directly to the pic, not even using resistors :-)
it works fine, but 1 is more lit up than 8 is, offcourse.

When time is over the sound output is active hi for 1 sec, use a beeper or a large horn with driver transistor
if Pause or Start is pushed active, WHILE the Reset button is pressed,
the count down time can be changed, the selected count time is stored into EEPROM and remembered forever.
The multiplexing time for each display is 2mS, so the repeat time is 6mS = 166Hz,
on my test board it does not flicker that much. But it can be made faster if I want to.


The bottom side of my test setup

Download HEX file for 16F84A Negative segment outouts
Download HEX file for 16F84A Positive segment outouts
Download HEX file for 16F84 Negative segment outputs
Download HEX file for 16F84 Positive segment outputs
Download HEX file for 16C84 Negative segment outputs
Download HEX file for 16C84 Positive segment outputs
use it ONLY for your own private use.
The PIC is programmed using NO watchdog timer and XTAL osc offcourse

Driving LARGE LED displays:
Large displays consume alot more current, so driver transistors must be used,
for the 7 segment outputs, another software version with active hi outputs must be used,
then 7 NPN or 7 N-FETS is easy to use to drive all 3 displays 7 segments,
remember to add one series resistor from each driver to the common rails
The active HI outputs to drive the 3 displays common + is perfect to drive an NPN-PNP set of hight side drivers.

if you have made this countdown timer please transfer any amount
small or big to my paypal account, my first name at webx dot dk.

Made Nov/Dec 2004, OZ2CPU.