Clock Schematic |
This clock use DS1302 as timekeeping chip and this was my first time I used this IC for my project. It used three wires for communication. It communicates with a microprocessor via a simple serial interface. Three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). The real-time clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The DS1302 will run with a voltage from 2.0V to 5.5V.
Here I used PIC16F88 micro-controller and 16x2 LCD. No switches were added to edit time and date. To add switches you have to modify the code and it is not difficult. The DS1302 uses an external 32.768kHz crystal. The oscillator circuit does not require any external resistors or capacitors to operate. The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was trimmed. Please refer datasheet for more information.
DS1302 Features
- Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100
- 31 x 8 Battery-Backed General-Purpose RAM
- Serial I/O for Minimum Pin Count
- 2.0V to 5.5V Full Operation
- Uses Less than 300nA at 2.0V
- Single-Byte or Multiple-Byte (Burst Mode) Data Transfer for Read or Write of Clock or RAM Data
- Simple 3-Wire Interface
- DS1202 Compatible
MikroC used as programming language but you can easily convert it to MikroC Pro. Micro-controller is running by its internal clock at 8MHz.The project files can be download from below with Source files, Proteus and Hex file.
This comment has been removed by a blog administrator.
ReplyDeleteHow to adjust the clock time & date
ReplyDeleteThis is a demo circuit. You have to edit source file and add push buttons to adjust the clock
Delete