嵌入式新闻
The RTC provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. Additionally, the clock provides two programmable time-of-day alarms and a programmable square-wave output.
Figure 2 is a schematic that illustrates the connections required for interfacing the DS32x35 RTC with an 8051-type microcontroller. The program uses two general-purpose (GP) port pins on the microcontroller to communicate with the DS32x35 using an I²C serial interface; a third GP port pin is used to enable or disable the write-protect (WP) input pin for the FRAM. The microcontroller's internal UART drives two port pins, which are connected to a DS232 line driver/receiver. User inputs and data outputs from the program are passed through the RS-232 interface from a PC's terminal-emulator program to the microcontroller. The RS-232 DTR input line controls the microcontroller's reset input.
Download (TXT, 11.5kB)
Figure 1. Program Listing
More detailed image (PDF, 260kB)
Figure 2. A schematic illustrating the connections for interfacing the DS32x35 with an 8051-type microcontroller.
全部0条评论
快来发表一下你的评论吧 !