Monday, March 30, 2009

7-Segment Digital clock circuit

Build a digital clock that turns AC load on/off with preset time

Figure 1 shows a circuit diagram of the Clock Controller V1.1.

P10-P1.7 drives 7-segment common anode LED with sink current.
P3.0-P3.3 also drives a base pin of 4-PNP transistor, 2n2907 with
sink current. As shown in the figure, the 2nd 2-digit LED that
connected to P3.2 and P3.3 is rotated 180 degrees to the 1st
2-digit allowing the pt. segment to be used for 1 second blinking.
P3.0-P3.3 also connects four momentary switches while the other
legs are tied to input port P3.4. During display and key switch
scanning, a logic '0' is shifted from P3.0 to P3.3, if there was a
key pressed, P3.4 then became low. P3.7 is a 1-bit sink current
driving, an example in the circuit uses a 2n2907 to drive a small
electromechanical relay 5V, say.

Blue Clock (Atmel Atmega8535 microcontroller)
The power comes in at the top left of the schematic. A bridge

rectifier is used so the polarity of the input signal doesn't matter.
A small SOT223 package, 5V regulator is used to provide
regulated voltage the Atmega8535, RTC, and the LED display
drivers. The Real Time Clock data is comes in from the PCF8563P.
This IC has a 32.768 crystal to keep time and a uses a 3V
CR2032 lithium battery when powered down. SW1 - SW4 are
the four pushbuttons for user input. The MBI5027 constant current
display drivers (24 pin DIP) from Macroblock can be a little hard
to find. They use power directly from the wall transform to turn
on the 7 segment LED's.




AVR 7-segment clock
The circuit can be viewed in every electronic book. Some

7-segments and LED's arranged as a matrix in rows and
colums and a multiplex routine written in assembler. The two
buttons are for setting the time.



Realtime clock with LED display and 89S8252
A real time clock using six 7-segment displays is used in this

project to display the time in HH-MM-SS format using a micro
controller ATMEL-89s8252 with minimum number of external
components. Five switches are used to set the HOURS
MINUTES (+/-) and one for zero reset of the clock display.
The micro controller runs of a 6Mhz crystal which also acts as
the time base for the clock.


Digital Clock with PIC16F84A
This is a small ajustable clock, I made based on PIC16F84A

microchip.The hardware part is very simple because it only
uses 74hct238 demultiplexer, 4x7 segments, and some rezistors.
The software part is programmed through a device connected to
serial port with icprog and made/debuged with MPlab.


Relate Posts