DS 1302 is a high-performance, low-power real-time clock with RAM, which has the function of timing. It is similar to an electronic watch and a perpetual calendar in daily contact, and can time the year, month, day, hour, minute and week.
You can set the time by writing the time into DS 1302 with a single chip microcomputer, or you can read the time from DS 1302 with a single chip microcomputer, and the read time can also be displayed on the LCD. In this way, the function of electronic watch can be realized.
In order to initiate any data transmission when DS 1302 is working, it is necessary to set the reset pin (RST) to high level and load the 8-bit address and command information into the shift register. Data is serially input on the rising edge of the clock (SCLK), and the first 8 bits specify the access address. After the command word is loaded into the shift register, data is output in the next clock cycle during the read operation, and data is output during the write operation.
In single-byte mode, the number of clock pulses is 8+8(8-bit address +8-bit data), and in multi-byte mode, it is 8+ 248 data at most.
Introduction of ds 1302 Chip
DS 1302 is a real-time clock chip with high performance and low power consumption introduced by DALLAS Company. Equipped with 3 1 byte static RAM, it uses SPI three-wire interface to communicate synchronously with CPU, which can transmit multiple bytes of clock signal and RAM data at one time in a burst mode.
The real-time clock can provide seconds, minutes, hours, days, weeks, months and years, and it can be automatically adjusted when a month is less than 3 1 day, and it has the function of leap year compensation.
The working voltage is 2.5~5.5V wide. Using dual power supply, the charging mode of standby power supply can be set, which provides the ability of trickle charging the standby power supply. DS 1302 is used for data recording, especially for some data points with special significance, which can record data and the time when data appears at the same time, so it is widely used in measurement systems.