FlashFlex51 MCU
SST89E52RD2 / SST89E54RD2 / SST89E58RD2 / SST89E516RD2
SST89V52RD2 / SST89V54RD2 / SST89V58RD2 / SST89V516RD2
Preliminary Specifications
8.3.2 16-Bit Software Timer Mode
If necessary, a new 16-bit compare value can be loaded
into CCAPnH and CCAPnL during the interrupt routine.
The user should be aware that the hardware temporarily
disables the comparator function while these registers are
being updated so that an invalid match will not occur. Thus,
it is recommended that the user write to the low byte first
(CCAPnL) to disable the comparator, then write to the high
byte (CCAPnH) to re-enable it. If any updates to the regis-
ters are done, the user may want to hold off any interrupts
from occurring by clearing the EA bit. (See Figure 8-3)
The 16-bit software timer mode is used to trigger interrupt
routines, which must occur at periodic intervals. It is setup
by setting both the ECOM and MAT bits in the module’s
CCAPMn register. The PCA timer will be compared to the
module’s capture registers (CCAPnL and CCAPnH) and
when a match occurs, an interrupt will occur, if the CCFn
(CCON SFR) and the ECCFn (CCAPMn SFR) bits for the
module are both set.
CF
CR
CCF4 CCF3 CCF2 CCF1 CCF0
CCON
Write to
CCAPnL Reset
PCA Interrupt
Write to
CCAPnH
CCAPnH
CCAPnL
1
0
Enable
Match
16-bit Comparator
CH
CL
PCA Timer/Counter
CCAPMn
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
n=0 to 4
0
0
0
0
1255 F25.0
FIGURE
8-3: PCA COMPARE MODE (SOFTWARE TIMER)
©2004 Silicon Storage Technology, Inc.
S71255-00-000
3/04
56