PCF8573P I2C Real Time Clock
In this post I’m going to show you how to interface an I2C Real Time Clock – RTC with PIC microcontroller. Only a basic hardware configuration and a communication protocol are presented here. I’m planning to extend it to a more advanced design in a near future. Although PCF8573 was used a similar IC’s like PCF8583 will also fit with minimal changes to PIC software. The PCF8573 is a real time clock/calendar IC. Its addresses and data are transferred serially via the two-line bidirectional I2C bus. I2C communication was used in a number of projects like a Function Generator. Here a modified assembly code will read a minutes count from PCF8573 and show its binary value on LED bar graph connected to PORTB of PIC16F876A.
To set up a basic circuit only an oscillator and a small capacitor are required. See design schematic. PCF8573 I2C address 0xD0 is send by PIC. If ACK is received the minutes data is read by sending 0xD1 address and transferred to PORTB. (LSB is R/W bit). More detailed explanation can be found in attached assembly code at the bottom of the page, also look at full Data Sheet for comprehensive functional description of RTC, its timing specification and operation modes. In a screenshot above you can see SCL – Clock and SDA – Data lines while I2C was active. Oscilloscope screen capture was taken with RIGOL DS2072 using its I2C Decoder and trigger mode.
For more detail: PCF8573P I2C Real Time Clock
For All Your PCB Need, One-stop PCB Solution Services Appear:
EasyEDA: free PCB design tool, 200,000+ engineers are using
PCBs: 10pcs 2-layer 10x10cm only $8.21, on-time global shipping
Components: save 50% on cost, save on freight if shipped with ordered PCBs