May 23, 2005 ... Abstract: This application note provides example hardware and software for
interfacing the DS3231 with an 8051-type microcontroller. Figure 1.
Maxim > Design Support > Technical Documents > Application Notes > Real-Time Clocks > APP 3506
Keywords: DS3231, example code, TCXO, rtc, real time clock, ds3231 rtc tcxo, app note 3506 APPLICATION NOTE 3506
Interfacing a DS3231 with an 8051-Type Microcontroller May 23, 2005 Abstract: This application note provides example hardware and software for interfacing the DS3231 with an 8051-type microcontroller.
Figure 1. DS3231 Pin assignment.
Description This application note demonstrates how to interface a DS3231 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.
Operation The program uses two general-purpose port pins on the microcontroller to operate as a master on the I²C bus. The DS3231 operates as a slave device on the same bus. The program demonstrates setting and reading the time and date, as well as reading and displaying temperature data. The program displays the time, date, and temperature information on an LCD display, which utilizes a standard HD44780 controller. Pin assignment and a schematic of the DS3231 are shown in Figures 1 and 2, respectively. The software is shown in Figure 3.
Page 1 of 3
For Larger Image Figure 2. Schematic of the DS3231.
Download text file Figure 3. Example Software Related Parts DS3231
Extremely Accurate I²C-Integrated RTC/TCXO/Crystal
Free Samples
DS3231M
±5ppm, I²C Real-Time Clock
Free Samples
DS3232
Extremely Accurate I²C RTC with Integrated Crystal and SRAM
Free Samples
DS32B35
Accurate I²C RTC with Integrated TCXO/Crystal/FRAM
DS32C35
Accurate I²C RTC with Integrated TCXO/Crystal/FRAM
Page 2 of 3
More Information For Technical Support: http://www.maximintegrated.com/support For Samples: http://www.maximintegrated.com/samples Other Questions and Comments: http://www.maximintegrated.com/contact Application Note 3506: http://www.maximintegrated.com/an3506 APPLICATION NOTE 3506, AN3506, AN 3506, APP3506, Appnote3506, Appnote 3506 Copyright © by Maxim Integrated Products Additional Legal Notices: http://www.maximintegrated.com/legal
Page 3 of 3