p89v660 NXP Semiconductors, p89v660 Datasheet - Page 64

no-image

p89v660

Manufacturer Part Number
p89v660
Description
P89v660/p89v662/p89v664 8-bit 80c51 5 V Low Power 16 Kb/32 Kb/64 Kb Flash Microcontroller With 512 B/1 Kb/2 Kb Ram, Dual I2c-bus, Spi
Manufacturer
NXP Semiconductors
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
p89v660FA
Manufacturer:
PHI
Quantity:
5 530
Part Number:
p89v660FA
Manufacturer:
PHI
Quantity:
5 530
Part Number:
p89v660FA
Manufacturer:
NXP
Quantity:
12 388
Part Number:
p89v660FA
Manufacturer:
INT
Quantity:
5 600
Part Number:
p89v660FA
Manufacturer:
NXP/恩智浦
Quantity:
20 000
Part Number:
p89v660FA,512
Manufacturer:
NXP Semiconductors
Quantity:
10 000
Part Number:
p89v660FAЈ¬512
Manufacturer:
PHI
Quantity:
5 530
Part Number:
p89v660FBC,557
Manufacturer:
NXP Semiconductors
Quantity:
10 000
NXP Semiconductors
P89V660_662_664_2
Product data sheet
6.10.5 PCA watchdog timer
value in the module’s CCAPnL 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, CCAPnL is reloaded with
the value in CCAPnH. This 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.
An on-board watchdog timer is available with the PCA to improve the reliability of the
system without increasing chip count. Watchdog timers are useful for systems that are
susceptible to noise, power glitches, or electrostatic discharge. Module 4 is the only PCA
module that can be programmed as a Watchdog. However, this module can still be used
for other modes if the Watchdog is not needed.
Watchdog works. The user pre-loads a 16-bit value in the compare registers. 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.
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
shown above.
In order to hold off the reset, the user has three options:
The first two options are more reliable because the watchdog 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 recommended if other PCA
modules are being used. Remember, 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
applications the first solution is the best option.
;CALL the following WATCHDOG subroutine periodically.
This routine should not be part of an interrupt service routine, because 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 within 2
timer.
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.
3. Disable the Watchdog by clearing the WDTE bit before a match occurs and then
CLR
MOV
MOV
SETB
RET
re-enable it.
EA
CCAP4L,#00
CCAP4H,CH
EA
Rev. 02 — 29 January 2008
;Hold off interrupts
;Next compare value is within 255 counts of
;Re-enable interrupts
current PCA timer value
80C51 with 512 B/1 kB/2 kB RAM, dual I
Figure 31
P89V660/662/664
shows a diagram of how the
16
© NXP B.V. 2008. All rights reserved.
count of the PCA
2
C-bus, SPI
64 of 89

Related parts for p89v660