Interfacing a DS1388 Real-Time Clock with an 8051-Type Microcontroller
DescriptionThis application note demonstrates how to interface a DS1388 real-time clock to an 8051-type microcontroller and provides example code showing basic interface routines. The microcontroller used in this example is the DS2250, and the software is written in C.
OperationThe program uses two general-purpose port pins on the micro to operate as a master on the I²C bus. The DS1388 operates as a slave device on the same bus.
The software is shown in Figure 1. A schematic of the circuit is shown in Figure 2.
Figure 1. Program Listing
Download zip file
For Larger Image
Figure 2. Schematic.