EPSON
EPSON ELECTRONICS AMERICA, INC.
RTC-658X/RTC-659X
3. Time, Calendar, Alarm, and Extended alarms Locations (659X series only)
The time and calendar information is obtained by reading the appropriate memory bytes. The time, calendar, alarm,
and extended alarm are set or initialized by writing to the appropriate RAM bytes. The contents of the sixteen time,
calendar, alarm, and extended alarm bytes may be either binary or binary coded decimal (BCD) format. Before writing
to the internal time, calendar, alarm, and extended alarm registers, the SET access bit in register B should be set to
one. This prevents updates from occurring while the access is being attempted. In addition to writing to the sixteen
time, calendar, alarm, and extended alarm registers in a selected format (binary or BCD), the Data Mode (DM) bit of
register B must be set to the appropriate logic level. All sixteen time, calendar, alarm, and extended alarm registers
must use the same data mode. The SET bit in register B should be cleared after the DM bit has been written to allow
the Real Time Clock (RTC) to update the time and calendar bytes.
Once initialized, the RTC makes all the updates in the selected mode. The data mode cannot be changed without
reinitializing all sixteen data bytes. The following table shows the binary and BCD formats of the sixteen time,
calendar, alarm, and extended alarm locations. The 24/12 bit cannot be changed without reinitializing the hour
locations. When the 12-hour format is selected, the high order bit of the hours byte represents p.m. when it is one.
Once per second, the time and calendar bytes are advanced and a check for alarm and extended alarm conditions
are made. If a read of the time and calendar information is made during an update cycle, it is possible that the seconds,
minutes, hours, etc. data may not correlate. The probability of reading the incorrect time is low, but this possibility
should be considered. See also Section 9.
The calendar compensates for leap years and advances the date of the month through 29 in February of a leap year.
The calendar does not compensate for leap centuries and will always make the 00 year a leap year. The year 2000
will be correctly compensated by providing 29 days in February, but 2100 will be erroneous and require manual
intervention.
Time Calendar And Alarm Data Modes
Range
CS
ADRS
Function
DEC
Binary Data Mode
BCD Data Mode
0
Seconds
0-59
00-3B
00-59
1
Seconds Alarm
0-59
00-3B
00-59
2
Minutes
0-59
00-3B
00-59
3
Minutes Alarm
0-59
00-3B
00-59
Hours-12 Hour Mode
1-12
01-0C am, 81-8C pm
01-12 am, 81-92 pm
4
Hours-24 Hour Mode
0-23
00-17
00-23
Hours Alarm-12 Hour Mode
1-12
01-0C am, 81-8C pm
01-12 am, 81-92 pm
5
Hours Alarm-24 Hour Mode
0-23
00-17
00-23
6
Day of Week (Sundays=1)
1-07
01-17
01-07
7
Day of Month
1-31
01-1F
01-31
8
Month
1-12
01-0C
01-12
RTC
or
CS=”L”
9
Year
0-99
00-63
00-99
0
Extended Seconds Alarm
0-59
00-3B
00-59
1
Extended Minutes Alarm
0-59
00-3B
00-59
Extended Hours-12 Hour Mode
1-12
01-0C am, 81-8C pm
01-12 am, 81-92 pm
2
Extended Hours-24 Hour Mode
0-23
00-17
00-23
3
Extended Day of Week (Sunday=1)
1-07
01-07
4
Extended Day of Month
1-31
01-1F
01-31
*
XLAM
=”L”
5
Extended Month Alarm
1-12
01-0C
01-12
* For RTC-6591/6593/6597 only.
4. Non-volatile RAM
The 114 bytes general purpose non-volatile RAM are not dedicated to any specific function. They may be accessed
by the processor as non-volatile memory at any time, even during an update cycle.