Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
43
ERAM
256 or 768 BYTES
UPPER
128 BYTES
INTERNAL RAM
LOWER
128 BYTES
INTERNAL RAM
SPECIAL
FUNCTION
REGISTER
100
FF
00
FF
00
80 80
EXTERNAL
DATA
MEMORY
FFFF
0000
SU01293
Figure 39. Internal and External Data Memory Address Space with EXTRAM = 0
HARDWARE WATCHDOG TIMER (ONE-TIME
ENABLED WITH RESET-OUT FOR
P89C51RA2/RB2/RC2/RD2xx)
The WDT is intended as a recovery method in situations where the
CPU may be subjected to software upset. The WDT consists of a
14-bit counter and the WatchDog Timer reset (WDTRST) SFR. The
WDT is disabled at reset. To enable the WDT, the user must write
01EH and 0E1H in sequence to the WDTRST, SFR location 0A6H.
When the WDT is enabled, it will increment every machine cycle
while the oscillator is running and there is no way to disable the
WDT except through reset (either hardware reset or WDT overflow
reset). When the WDT overflows, it will drive an output reset HIGH
pulse at the RST-pin (see the note below).
Using the WDT
To enable the WDT, the user must write 01EH and 0E1H in sequence
to the WDTRST, SFR location 0A6H. When the WDT is enabled, the
user needs to service it by writing 01EH and 0E1H to WDTRST to
avoid a WDT overflow. The 14-bit counter overflows when it reaches
16383 (3FFFH) and this will reset the device. When the WDT is
enabled, it will increment every machine cycle while the oscillator is
running. This means the user must reset the WDT at least every
16383 machine cycles. To reset the WDT, the user must write 01EH
and 0E1H to WDTRST. WDTRST is a write only register. The WDT
counter cannot be read or written. When the WDT overflows, it will
generate an output RESET pulse at the reset pin (see note below).
The RESET pulse duration is 98 × T
OSC
(6-clock mode; 196 in
12-clock mode), where T
OSC
= 1/f
OSC
. To make the best use of the
WDT, it should be serviced in those sections of code that will
periodically be executed within the time required to prevent a WDT
reset.
Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
44
FLASH EPROM MEMORY
GENERAL DESCRIPTION
The P89C51RA2/RB2/RC2/RD2xx Flash memory augments EPROM
functionality with in-circuit electrical erasure and programming. The
Flash can be read and written as bytes. The Chip Erase operation will
erase the entire program memory. The Block Erase function can
erase any Flash block. In-system programming and standard parallel
programming are both available. On-chip erase and write timing
generation contribute to a user friendly programming interface.
The P89C51RA2/RB2/RC2/RD2xx Flash reliably stores memory
contents even after 10,000 erase and program cycles. The cell is
designed to optimize the erase and programming mechanisms. In
addition, the combination of advanced tunnel oxide processing and
low internal electric fields for erase and programming operations
produces reliable cycling. The P89C51RA2/RB2/RC2/RD2xx uses a
+5 V V
PP
supply to perform the Program/Erase algorithms.
FEATURES – IN-SYSTEM PROGRAMMING (ISP)
AND IN-APPLICATION PROGRAMMING (IAP)
Flash EPROM internal program memory with Block Erase.
Internal 1-kbyte fixed BootROM, containing low-level in-system
programming routines and a default serial loader. User program
can call these routines to perform In-Application Programming
(IAP). The BootROM can be turned off to provide access to the
full 64-kbyte Flash memory.
Boot Vector allows user provided Flash loader code to reside
anywhere in the Flash memory space. This configuration provides
flexibility to the user.
Default loader in BootROM allows programming via the serial port
without the need for a user provided loader.
Up to 64-kbyte external program memory if the internal program
memory is disabled (EA
= 0).
Programming and erase voltage +5 V (+12 V tolerant).
Read/Programming/Erase using ISP/IAP:
Byte Programming (8 ms).
Typical quick erase times:
Block Erase (4 kbyte) in 3 seconds.
Full Chip Erase:
– RD2xx (64K) in 11 seconds
– RC2 (32K) in 7 seconds
– RB2 (16K) in 5 seconds
– RA2 (4K) in 4 seconds
Parallel programming with 87C51 compatible hardware interface
to programmer.
In-system programming (ISP).
In-application programming (IAP).
Programmable security for the code in the Flash.
10,000 minimum erase/program cycles for each byte.
10-year minimum data retention.
FLASH PROGRAMMING AND ERASURE
In general, there are three methods of erasing or programming of
the Flash memory that may be used. First, the Flash may be
programmed or erased in the end-user application by calling
low-level routines through entry point in the BootROM. The end-user
application, though, must be executing code from a different block
than the block that is being erased or programmed. Second, the
on-chip ISP boot loader may be invoked. This ISP boot loader will, in
turn, call low-level routines through the common entry point in the
BootROM that can be used by end-user applications. Third, the
Flash may be programmed or erased using parallel method by using
a commercially available EPROM programmer. The parallel
programming method used by these devices is similar to that used
by EPROM 87C51, but it is not identical, and the commercially
available programmer will need to have support for these devices.
FLASH MEMORY SPACES
Flash User Code Memory Organization
The P89C51RA2/RB2/RC2/RD2xx contains 8KB/16KB/32KB/64KB
Flash user code program memory organized into 4-kbyte blocks.
ISP and IAP BootROM routines will support the new 4-kbyte block
sizes through additional block number assignments while
maintaining compatibility with previous 8-kbyte and 16-kbyte block
assignments. This memory space is programmable via IAP, ISP, and
parallel modes.
Status Byte/Boot Vector Block
This device includes a 4-kbyte block which contains the Status Byte
and Boot Vector (Status Byte Block) . The Status Byte and Boot
Vector are programmable via IAP, ISP, and parallel modes. Note that
erasing of either the Status Byte and Boot Vector will erase the
entire contents of this block. Thus the Status Byte and Boot Vector
are erased together but are programmable separately.
Security & User Configuration Block
This device includes a 4-kbyte block (Security Block) which contains
the Security Bits, the 6-clock/12-clock Flash-based clock mode bit
FX2, and 4095 user programmable bytes. This block is
programmable via IAP, ISP, and parallel modes. Security bits will
prevent, as required, parallel programmers from reading or writing,
however, IAP or ISP inhibitions will be software controlled. This
block may only be erased using full-chip erase functions in ISP, IAP,
or parallel mode. This security feature protects against software
piracy and prevents the contents of the Flash from being read. The
Security bits are located in the Flash. There are three programmable
security bits that will provide different levels of protection for the
on-chip code and data (See Table 11). The 4095 user programmable
bytes are not part of user code memory are intended to be
programmed or read through IAP, ISP, or parallel programmer
functions.
The 6-clock/12-clock Flash-based clock mode bit FX2 will be latched
at power-on. This allows the bit to be changed via IAP or ISP and
delay taking effect until the next reset. This avoids changing baud
rates during ISP operations.
Boot ROM
When the microcontroller programs its Flash memory, all of the low
level details are handled by code that is contained in a 1-kbyte
Philips Semiconductors Preliminary data
P89C51RA2/RB2/RC2/RD2xx80C51 8-bit Flash microcontroller family
8KB/16KB/32KB/64KB ISP/IAP Flash with 512B/512B/512B/1KB RAM
2002 Jul 18
45
BootROM that is shadowed over a portion of the user code memory
space. A user program simply calls the common entry point with
appropriate parameters in the BootROM to accomplish the desired
operation. BootROM operations include: erase block, program byte,
verify byte, program security bit, etc. The BootROM overlays the
program memory space at the top of the address space from FC00
to FFFF hex, when it is enabled. The BootROM may be turned off so
that the upper 1 kbyte of user program memory is accessible for
execution.
Clock Mode
The clock mode feature sets operating frequency to be 1/12 or 1/6 of
the oscillator frequency. The clock mode configuration bit, FX2, is
located in the Security Block (See Table 8). FX2, when programmed,
will override the SFR clock mode bit (X2) in the CKCON register. If
FX2 is erased, then the SFR bit (X2) may be used to select between
6-clock and 12-clock mode.
Table 8.
CLOCK MODE CONFIG BIT (FX2) X2 bit in CKCON DESCRIPTION
erased 0 12-clock mode (default)
erased 1 6-clock mode
programmed x 6-clock mode
NOTE:
1. Default clock mode after ChipErase is set to SFR selection.
FLASH MEMORY SPACES
Flash User Code Memory Organization
FFFF
C000
8000
4000
2000
0000
PROGRAM
ADDRESS
BOOT ROM
(1 kB)
FFFF
FC00
SU01614
89C51RD2xx
89C51RC2xx
89C51RB2xx
89C51RA2xx
BLOCK 1
BLOCK 0
BLOCK 3
BLOCK 2
BLOCK 5
BLOCK 4
BLOCK 7
BLOCK 6
BLOCK 9
BLOCK 8
BLOCK 11
BLOCK 10
BLOCK 13
BLOCK 12
BLOCK 15
BLOCK 14
Each block is
4 kbytes in size
Figure 40. Flash Memory Configurations
Power-On Reset Code Execution
The P89C51RA2/RB2/RC2/RD2xx contains two special Flash
registers: the BOOT VECTOR and the STATUS BYTE. At the falling
edge of reset, the P89C51RA2/RB2/RC2/RD2xx examines the
contents of the Status Byte. If the Status Byte is set to zero,
power-up execution starts at location 0000H, which is the normal
start address of the user’s application code. When the Status Byte is
set to a value other than zero, the contents of the Boot Vector is
used as the high byte of the execution address and the low byte is
set to 00H. The factory default setting is 0FCH, corresponds to the
address 0FC00H for the factory masked-ROM ISP boot loader. A
custom boot loader can be written with the Boot Vector set to the
custom boot loader.
NOTE: When erasing the Status Byte or Boot Vector, both
bytes are erased at the same time. It is necessary to reprogram
the Boot Vector after erasing and updating the Status Byte.

P89C51RC2BA/01,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT 32KB FLASH 44PLCC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union