SX User’s Manual Rev. 3.1 158 © 2000 Scenix Semiconductor, Inc. All rights reserved. www.scenix.com Chapter 6 Timers and Interrupts 6.4.3 RTCC Interrupts The Real-Time Clock/Counter is a general-purpose timer that can be used to keep track of elapsed time
or to keep a count of pulses received on the RTCC input pin. To enable RTCC interrupts, clear the
RTE_EI bit in the OPTION register. In that case, the RTCC counter generates an interrupt each time
it rolls over from FFh to 00h.
The  SX48/52BC  has  an  interrupt  pending  flag  associated  with  RTCC  rollover  interrupts,  called
RTCCOV (RTCC Overflow), which is bit 7 in the T1CNTB register. The SX18/20/28 has no such flag.
In that case, the interrupt service routine should read the RTCC register to determine whether an RTCC
rollover caused the interrupt. A register value of 00h (or a very low value) is an indicator that a rollover
has just occurred.
You can configure the RTCC circuit to count instruction cycles or external events, and you can specify
the  number  of  cycles  or  events  that  cause  the  RTCC  counter  to  be  incremented.  For  details,  see
Section 6.2. 6.4.4 Port B Interrupts The Multi-Input Wakeup/Interrupt circuit allows the Port B pins to be used as device inputs to trigger
an interrupt from an external source. The same circuit is used for both wakeups and interrupts. In the
power down state, a wakeup signal on a Port B pin wakes up the device and causes a device reset. The
same signal received during normal device operation triggers an interrupt.
You  can  configure  any  of  the  eight  Port  B  pins  to  operate  as  wakeup/interrupt  input  pins  and
individually enable or disable the corresponding interrupt. On each enabled pin, you can choose to
sense either rising or falling edges from the external interrupt source.
Each  wakeup/interrupt  pin  has  an  associated  pending  flag  to  indicate  whether  a  wakeup/interrupt
signal has been detected. When Port B has been configured to use multiple Port B interrupt pins, the
interrupt service routine should read the wakeup pending register to determine which Port B pin caused
the interrupt.
For  more  information  on  using  the  Multi-Input  Wakeup/Interrupt  pins  and  the  associated  Port  B
registers, see Section 4.4.
6.4.5 Device-Specific Interrupts Some  SX  devices  have  on-chip  peripheral  modules  that  can  generate  interrupts.  For  example,  the SX48/52BD device has to additional timers, T1 and T2, that can generate interrupts. These interrupt
sources operate just like RTCC and Multi-Input Wakeup interrupts. They have their own interrupt
configuration and enable bits.
For more information on using the interrupts associated with Timer T1 and Timer T2, see Chapter 8.