Download USER`S MANUAL

Transcript
REAL TIME CLOCK
KS32C65100 RISC MICROPROCESSOR
LEAP YEAR GENERATOR
This generator calculates if the last date of each month is 28, 29, 30 or 31 based on data from BCDDAY,
BCDMON and BCDYEAR. It also considers leap years in deciding the last date.
An 8-bit counter can just represent 2 BCD digits, so it cannot decide whether 00 year is a leap year or not. We
know year 2000 is a leap year, therefore the leap year generator is hard-wired to work up to 2-29-00.
SYSTEM POWER OPERATION (+5V)
It is required to set bit 0 of the RTCCON register for interfacing between CPU and RTC logic. A 1 second error
can occur when the CPU reads or writes data into BCD counters, and this can cause the change of the higher
time units. When the CPU reads/writes data to/from the BCD counters, another time unit may be changed if
BCDSEC register is overflowed. To avoid this problem, the CPU should reset the BCDSEC register to 00h.The
reading sequence of the BCD counters is BCDYEAR, BCDMON, BCDDATE, BCDDAY, BCDHOUR, BCDMIN
and BCDSEC. It is required to read it again from BCDYEAR to BCDSEC if BCDSEC is zero.
BACKUP BATTERY OPERATION
The RTC logic is driven by a backup battery if the system power is off. The interfaces of the CPU and RTC logic
are blocked and the backup battery only drives the oscillation circuit and the BCD counters, to minimize power
dissipation.
22-2