Digital Clock with PIC Microcontroller
- aakash sehgal
- Sep 20, 2016
- 2 min read
This is a digital clock by that shows not only hour, minute and second .
componets required
4x 6" big 7 segment display PIC16F84A 3x 10K Resistors 2x tack switches (micro switches) 4MHz Cristal (XTAL) 2x 22PF If you are planing to protect your IC you should connect the IC through 5V regulator (1x 7805) Vero baord(I used dot matrix board)
The brain of the circuit is a Microchip PIC18F252 microcontroller. It acquires precise time information from DS1307 real time clock via I2C interface and displays it on four digit 38 mm seven-segment display with the help of MAX7219CNG display driver.There are two LEDs on the board indicates power and functional status and the buttons let the user adjust the time.We will use a 12V AC-DC power adapter to power the board. We need to convert 12VDC to 5VDC level that the ICs need and supply the required amount of current to the components. Not to deal with the heating problems, we should use a step down DC-DC converter. We choose LM2574N-5.0 fixed 5VDC step-down converter which can provide up to 500mA continuous current. LM2574 supports wide input range up to 40VDC and provides high efficiency. It requires only two capacitors, one power inductor and one Schottky diode as the external components.A 3mm LED is connected to 5VDC output of LM2775 through a current limiting resistor to indicate the power on status.Real time clocks are integrated circuits which can provide the current date and the time information. They can precisely update the time by using the clock input which is generally 32.768 kHz. We useDS1307 RTC IC for this purpose. It communicates via I2C protocol. It can provide second, minute, hour, day of the week, month and the year information. It supports 12 and 24 hour formats.To be able communicate via I2C, we need to connect two inputs of the PIC to the SCL and the SDA pins of DS1307. Those lines should be pulled-up to 5VDC supply via resistors which are 10K in our circuit.
Comments