Freelance Electronics Components Distributor
Closed Dec 25th-26th
800-300-1968
We Stock Hard to Find Parts

89V54RD

Part # 89V54RD
Description
Category IC
Availability In Stock
Qty 61
Manufacturer Available Qty
SST
  • Shipping Freelance Stock: 9
    Ships Immediately
Request For Quote
SST
Date Code: 0619
  • Shipping Freelance Stock: 5
    Ships Immediately
Request For Quote
SST
  • Shipping Freelance Stock: 20
    Ships Immediately
Request For Quote
Silicon Storage Technology
Date Code: 0619
  • Shipping Freelance Stock: 27
    Ships Immediately
Request For Quote



Technical Document


DISCLAIMER: The information provided herein is solely for informational purposes. Customers must be aware of the suitability of this product for their application, and consider that variable factors such as Manufacturer, Product Category, Date Codes, Pictures and Descriptions may differ from available inventory.

52
Data Sheet
FlashFlex51 MCU
SST89E52RD2/RD / SST89E54RD2/RD / SST89E58RD2/RD
SST89V52RD2/RD / SST89V54RD2/RD / SST89V58RD2/RD
©2006 Silicon Storage Technology, Inc. S71255-05-000 5/06
8.3.3 High Speed Output Mode
The high speed output mode is used to toggle a port pin
when a match occurs between the PCA timer and the pre-
loaded value in the compare registers. In this mode, the
CEX output pin (on port 1) associated with the PCA mod-
ule will toggle every time there is a match between the PCA
counter (CH and CL) and the capture registers (CCAPnH
and CCAPnL). To activate this mode, the user must set
TOG, MAT, and ECOM bits in the module’s CCAPMn SFR.
High speed output mode is much more accurate than tog-
gling pins since the toggle occurs before branching to an
interrupt. In this case, interrupt latency will not affect the
accuracy of the output. When using high speed output,
using an interrupt is optional. Only if the user wishes to
change the time for the next toggle is it necessary to
update the compare registers. Otherwise, the next toggle
will occur when the PCA timer rolls over and matches the
last compare value. (See Figure 8-4)
FIGURE 8-4: PCA High Speed Output Mode
1255 F26.0
CF CR CCF4 CCF3 CCF2 CCF1 CCF0
ECOMn
CAPPn
CAPNn MATn TOGn PWMn ECCFn
CCON
CCAPMn
n=0 to 4
PCA Interrupt
CH CL
CCAPnH CCAPnL
PCA Timer/Counter
000
16-bit Comparator
Reset
Write to
CCAPnL
Write to
CCAPnH
10
Enable Match
CEXn
Toggle
Data Sheet
FlashFlex51 MCU
SST89E52RD2/RD / SST89E54RD2/RD / SST89E58RD2/RD
SST89V52RD2/RD / SST89V54RD2/RD / SST89V58RD2/RD
53
©2006 Silicon Storage Technology, Inc. S71255-05-000 5/06
8.3.4 Pulse Width Modulator
The Pulse Width Modulator (PWM) mode is used to gener-
ate 8-bit PWMs by comparing the low byte of the PCA
timer (CL) with the low byte of the compare register
(CCAPnL). When CL < CCAPnL the output is low. When
CL CCAPnL the output is high. To activate this mode, the
user must set the PWM and ECOM bits in the module’s
CCAPMn SFR. (See Figure 8-5 and Table 8-7)
In PWM mode, the frequency of the output depends on the
source for the PCA timer. Since there is only one set of CH
and CL registers, all modules share the PCA timer and fre-
quency. Duty cycle of the output is controlled by the value
loaded into the high byte (CCAPnH). Since writes to the
CCAPnH register are asynchronous, a new value written to
the high byte will not be shifted into CCAPnL for compari-
son until the next period of the output (when CL rolls over
from 255 to 00).
To calculate values for CCAPnH for any duty cycle, use
the following equation:
CCAPnH = 256(1 - Duty Cycle)
where CCAPnH is an 8-bit integer and Duty Cycle is a
fraction.
FIGURE 8-5: PCA Pulse Width Modulator Mode
TABLE 8-7: Pulse Width Modulator Frequencies
PCA Timer Mode
PWM Frequency
12 MHz 16 MHz
1/12 Oscillator Frequency 3.9 KHz 5.2 KHz
1/4 Oscillator Frequency 11.8 KHz 15.6 KHz
Timer 0 Overflow:
8-bit 15.5 Hz 20.3 Hz
16-bit 0.06 Hz 0.08 Hz
8-bit Auto-Reload 3.9 KHz to 15.3 Hz 5.2 KHz to 20.3 Hz
External Input (Max) 5.9 KHz 7.8 KHz
T8-7.0 1255
1255 F27.0
ECOMn
CAPPn
CAPNn MATn TOGn PWMn ECCFn
CCAPMn
n=0 to 4
CL
CCAPnL
CCAPnH
PCA Timer/Counter
00000
8-bit Comparator
Overflow
CL < CCAPnL
CL >= CCAPnL
Enable
CEXn
0
1
54
Data Sheet
FlashFlex51 MCU
SST89E52RD2/RD / SST89E54RD2/RD / SST89E58RD2/RD
SST89V52RD2/RD / SST89V54RD2/RD / SST89V58RD2/RD
©2006 Silicon Storage Technology, Inc. S71255-05-000 5/06
8.3.5 Watchdog Timer
The Watchdog Timer mode is used to improve reliability in
the system without increasing chip count (See Figure 8-6).
Watchdog Timers are useful for systems that are suscepti-
ble to noise, power glitches, or electrostatic discharge. It
can also be used to prevent a software deadlock. If during
the execution of the user’s code, there is a deadlock, the
Watchdog Timer will time out and an internal reset will
occur. Only module 4 can be programmed as a Watchdog
Timer (but still can be programmed to other modes if the
Watchdog Timer is not used).
To use the Watchdog Timer, the user pre-loads a 16-bit
value in the compare register. Just like the other compare
modes, this 16-bit value is compared to the PCA timer
value. If a match is allowed to occur, an internal reset will be
generated. This will not cause the RST pin to be driven high.
In order to hold off the reset, the user has three options:
1. periodically change the compare value so it will
never match the PCA timer,
2. periodically change the PCA timer value so it will
never match the compare values, or
3. disable the watchdog timer by clearing the WDTE
bit before a match occurs and then re-enable it.
The first two options are more reliable because the Watch-
dog Timer is never disabled as in option #3. If the program
counter ever goes astray, a match will eventually occur and
cause an internal reset. The second option is also not rec-
ommended if other PCA modules are being used. Remem-
ber, the PCA timer is the time base for all modules;
changing the time base for other modules would not be a
good idea. Thus, in most application the first solution is the
best option.
Use the code below to initialize the Watchdog Timer. Mod-
ule 4 can be configured in either compare mode, and the
WDTE bit in CMOD must also be set. The user’s software
then must periodically change (CCAP4H, CCAP4L) to
keep a match from occurring with the PCA timer (CH, CL).
This code is given in the Watchdog routine below.
;==============================================
Init_Watchdog:
MOVCCAPM4, #4CH; Module 4 in compare mode
MOVCCAP4L, #0FFH; Write to low byte first
MOVCCAP4H, #0FFH; Before PCA timer counts up
; to FFFF Hex, these compare
; values must be changed.
ORLCMOD, #40H; Set the WDTE bit to enable the
; watchdog timer without
; changing the other bits in
; CMOD
;==============================================
;Main program goes here, but call WATCHDOG periodically.
;==============================================
WATCHDOG:
CLR EA; Hold off interrupts
MOVCCAP4L, #00; Next compare value is within
MOVCCAP4H, CH; 65,535 counts of the
; current PCA
SETBEA; timer value
RET
;==============================================
This routine should not be part of an interrupt service rou-
tine. If the program counter goes astray and gets stuck in an
infinite loop, interrupts will still be serviced and the watchdog
will keep getting reset. Thus, the purpose of the watchdog
would be defeated. Instead, call this subroutine from the
main program of the PCA timer.
FIGURE 8-6: PCA Watchdog Timer (Module 4 only)
1255 F28.0
CIDL WDTE CPS1 CPS0 ECF
ECOMn
CAPPn
CAPNn MATn TOGn PWMn ECCFn
CMOD
CCAPM4
Reset
CH CL
CCAP4H CCAP4L
PCA Timer/Counter
00X0
16-bit Comparator
Reset
Write to
CCAP4L
Write to
CCAP4H
10
Enable
Match
Module 4
1X
PREVIOUS1112131415161718192021222324NEXT