Here I am going to teach you a simple circuit of 24 hour digital clock display that can also be used in 12 hour format by simply loading the corresponding clock program. You can download the hex files for both 12 hour format and 24 hour time system from the link given in this article. Coming to the technical part, main component of the circuit is a PIC16f84A microchip; it generates the one second clock to run the device and also controls the seven segment display. Three push buttons are also provided to set the time; one for reset by which you can reset the complete circuit as it is connected to the reset pin of PIC microcontroller. Other two push buttons are for setting hour and minute. By Pressing these button continuously you can increment hour and minutes.
The main feature of this real time clock circuit is that it only draws less than 100mA, so it can be run with rechargeable batteries. By increasing the value of resistors connected to the seven segment display you can decrease the current gain. 24(international time clock) to 12 hour time clock conversion can be done simply by burning the PIC microchip with the corresponding hex file.
12 hours hex file
(In case you are facing any problem in downloading the files, use the comment box at the bottom
Download link Updated: 14/June/2013)
The main feature of this real time clock circuit is that it only draws less than 100mA, so it can be run with rechargeable batteries. By increasing the value of resistors connected to the seven segment display you can decrease the current gain. 24(international time clock) to 12 hour time clock conversion can be done simply by burning the PIC microchip with the corresponding hex file.
Download Hex file of real time embedded C
24 hours time clock hex file12 hours hex file
(In case you are facing any problem in downloading the files, use the comment box at the bottom
Download link Updated: 14/June/2013)
Circuit diagram of Pacific Time clock
Click on the circuit for enlarged viewComponents Required
- PIC 16F84A
- Transistor BC548 (4-Nos)
- Resistor (180R-9Nos,10K,1K-4Nos)
- LED
- Capacitor(22pf2Nos)
- Push button (3-Nos)
- Crystal 4MHz
- Common cathode seven segment display (4-Nos)
How to make a digital clock?
- We use four common cathode seven segment displays which are connected in PORTB of the PIC.
- The seven inputs of seven segment displays are connected in parallel but it shows different values it is done by continues scanning, that is if a value want display on the first seven segment display activate the corresponding transistor then send the value to through the port that is shown below.
- To display a value on the second display activate the second transistor and send value through PORTB.
- This scanning is continually done by PORTA and PORTB sends the display value.
- Three push buttons are used one for reset the microcontroller and remaining two for set minute and hour which connected in PORTB which scan to get a zero volt on the pins RB6and RB7.
- An LED connected on the RB0 which blink for on second
Components pin out
7 segment display
Ads
Wonderful circuit
ReplyDeletehow much cost for creating this circuit?
ReplyDeleteIt costs around 300 Rs(7 USD). Microcontroller itself costs 175 Rs.
Deletewhat is the name of the display?for example:lts543
ReplyDeleteHi Mahesh,
DeleteLT543R; 'R' for Red.
in the 'components required' column you have mentioned the display as "Common anode seven segment displays" but in the 'how to make digital clock' column you have mentioned it as "common cathode seven segment displays"..please tell me that whether it is anode or cathode display?
ReplyDeleteHi Mahesh,
DeleteSorry for the mistake, its actually common cathode display. We have changed it and thanks for pointing out the mistake.
sir,u have used dot board for connecting all these components together but it is tough job to connect it at the back side of dot board. can u tell me the PCB board type for this circuit?
ReplyDeletesir instead of using dot board for this circuit can u tell me the PCB type for this circuit?
ReplyDelete