Alarm registers, Status/control registers, Status register – Rainbow Electronics DS2404 User Manual
Page 7: Control register

DS2404
7 of 29
Alarm Registers
The alarm registers for the real-time clock, interval timer, and cycle counter all operate in the same
manner. When the value of a given counter equals the value in its associated alarm register, the
appropriate flag bit is set in the status register. If the corresponding interrupt enable bit(s) in the status
register is set, an interrupt is generated. If a counter and its associated alarm register are write protected
when an alarm occurs, access to the device becomes limited. (See “Status/Control”, “Interrupts”, and the
“Programmable Expiration” sections.)
STATUS/CONTROL REGISTERS
The status and control registers are the first two bytes of page 16 (see “Memory Map”, Figure 4).
Status Register
7
6
5
4
3
2
1
0
X
X
CCE
ITE
RTE
CCF
ITF
RTF
0200h
0
RTF
Real-time clock alarm flag
1
ITF
Interval timer alarm flag
2
CCF
Cycle counter alarm flag
When a given alarm occurs, the corresponding alarm flag is set to a logic 1. The alarm flag(s) is cleared
by reading the status register.
3
RTE
Real-time interrupt enable
4
ITE
Interval timer interrupt enable
5
CCE
Cycle counter interrupt enable
Writing any of the interrupt enable bits to a logic 0 will allow an interrupt condition to be generated when
its corresponding alarm flag is set (see “Interrupts” section).
Control Register
7
6
5
4
3
2
1
0
DSEL
START
STOP
MAN.
AUTO
OSC
RO
WPC
WPI
WPR
0201h
0
WPR Write protect real-time clock/alarm registers
1
WPI
Write protect interval timer/alarm registers
2
WPC Write protect cycle counter/alarm registers
Don’t care bits
Read Only