87C575 Philips Semiconductors, 87C575 Datasheet - Page 15

no-image

87C575

Manufacturer Part Number
87C575
Description
80C51 8-bit microcontroller family 8K/256 OTP/ROM/ROMless/ 4 comparator/ failure detect circuitry/ watchdog timer
Manufacturer
Philips Semiconductors
Datasheet
Philips Semiconductors
Pulse Width Modulator Mode
All of the PCA modules can be used as PWM
outputs. Figure 12 shows the PWM function.
The frequency of the output depends on the
source for the PCA timer. All of the modules
will have the same frequency of output
because they all share the PCA timer. The
duty cycle of each module is independently
variable using the module’s capture register
CCAPLn. When the value of the PCA CL
SFR is less than the value in the module’s
CCAPLn SFR the output will be low, when it
is equal to or greater than the output will be
high. When CL overflows from FF to 00,
CCAPLn is reloaded with the value in
CCAPHn. the allows updating the PWM
without glitches. The PWM and ECOM bits in
the module’s CCAPMn register must be set
to enable the PWM mode.
WATCHDOG TIMER
The watchdog timer is not directly loadable
by the user. Instead, the value to be loaded
into the main timer is held in an autoload
register or is part of the mask ROM
programming. In order to cause the main
timer to be loaded with the appropriate value,
a special sequence of software action must
take place. This operation is referred to as
feeding the watchdog timer.
To feed the watchdog, two instructions must
be sequentially executed successfully. No
1998 May 01
80C51 8-bit microcontroller family
8K/256 OTP/ROM/ROMless, 4 comparator, failure detect circuitry, watchdog timer
WRITE TO
CCAPnL
0
WRITE TO
CCAPnH
1
RESET
ENABLE
CCAPnH
PCA TIMER/COUNTER
16–BIT COMPARATOR
CH
––
CF
intervening instruction fetches are allowed,
so interrupts should be disabled before
feeding the watchdog. The instructions
should move A5H to the WFEED1 register
and then 5AH to the WFEED2 register. If
WFEED1 is correctly loaded and WFEED2 is
not correctly loaded, then an immediate
underflow will occur.
The watchdog timer subsystem has two
modes of operation. Its principal function is a
watchdog timer. In this mode it protects the
system from incorrect code execution by
causing a system reset when the watchdog
timer underflows as a result of a failure of
software to feed the timer prior to the timer
reaching its terminal count. If the user does
not employ the watchdog function, the
watchdog subsystem can be used as a timer.
In this mode, reaching the terminal count sets
a flag. In most other respects, the timer mode
possesses the characteristics of the
watchdog mode. This is done to protect the
integrity of the watchdog function.
The watchdog timer subsystem consists of a
prescaler and a main counter. The prescaler
has 8 selectable taps off the final stages and
the output of a selected tap provides the
clock to the main counter. The main counter
is the section that is loaded as a result of the
software feeding the watchdog and it is the
section that causes the system reset
Figure 11. PCA High Speed Output Mode
ECOMn
CCAPnL
CR
CL
CAPPn
0
––
MATCH
15
CAPNn
CCF4
0
MATn
(TO CCFn)
CCF3
TOGn
CCF2
1
(watchdog mode) or time-out flag to be set
(timer mode) if allowed to reach its terminal
count.
Programming the Watchdog Timer
Both the EPROM and ROM devices have a
set of SFRs for holding the watchdog
autoload values and the control bits. The
watchdog time-out flag is present in the
watchdog control register and operates the
same in all versions. In the EPROM device,
the watchdog parameters (autoload value
and control) are always taken from the SFRs.
In the ROM device, the watchdog parameters
can be mask programmed or taken from the
SFRs. The selection to take the watchdog
parameters from the SFRs or from the mask
programmed values is controlled by EA
(external access). When EA is high (internal
ROM access), the watchdog parameters are
taken from the mask programmed values. If
the watchdog is mask programmed to the
timer mode, then the autoload values and the
pre-scaler taps are taken from the SFRs.
When EA is low (external access), the
watchdog parameters are taken from the
SFRs. The user should be able to leave code
in his program which initializes the watchdog
SFRs even though he has migrated to the
mask ROM part. This allows no code
changes from EPROM prototyping to ROM
coded production parts.
PWMn
CCF1
0
ECCFn
CCF0
80C575/83C575/
TOGGLE
CCAPMn, n: 0..4
CCON
(D8H)
(DAH – DEH)
Product specification
PCA INTERRUPT
87C575
SU00751
CEXn

Related parts for 87C575