The Philips microcontrollers described in this data sheet are
high-performance static 80C51 designs. They are manufactured in
an advanced CMOS process and contain a non-volatile Flash
program memory that is programmable in parallel (via a parallel
programmer) or In-System Programmable (ISP) via boot loader.
They support both 12-clock and 6-clock operation.
The P89C60X2 and P89C61X2 contain 512 bytes RAM and
1024 bytes RAM respectively, 32 I/O lines, three 16-bit
counter/timers, a six-source, four-priority level nested interrupt
structure, a serial I/O port for either multi-processor
communications, I/O expansion or full duplex UART, and on-chip
oscillator and clock circuits.
TypeMemoryTimersSerial Interfaces
RAM
ROM
OTP
P89C60X2
P89C61X2
NOTE:
2
C = Inter-Integrated Circuit Bus; CAN = Controller Area Network; SPI = Serial Peripheral Interface; PCA = Programmable Counter Array;
1. I
512B––64K3––
1024B––64K3––
Flash
# of Timers
PWM
PCA
WD
nn
nn
2
UART
––––326 (2)
––––326 (2)
In addition, the devices are static designs which offer a wide range
of operating frequencies down to zero. Two software selectable
modes of power reduction — idle mode and power-down mode —
are available. The idle mode freezes the CPU while allowing the
RAM, timers, serial port, and interrupt system to continue
functioning. The power-down mode saves the RAM contents but
freezes the oscillator, causing all other chip functions to be
inoperative. Since the design is static, the clock can be stopped
without loss of user data. Then the execution can be resumed from
the point the clock was stopped.
SELECTION TABLE
For applications requiring more RAM, as well as more on-chip
peripherals, see the P89C66x and P89C51Rx2 data sheets.
P0.0-0.743–3639–3237–30I/OPort 0: Port 0 is an open-drain, bidirectional I/O port. Port 0 pins that have 1s written to
P1.0–P1.72–91–840–44,
P2.0–P2.724–3121–2818–25I/OPort 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 pins that have
P3.0–P3.711,
RST1094IReset: A high on this pin for two machine cycles while the oscillator is running, resets the
ALE/PROG333027OAddress Latch Enable/Program Pulse: Output pulse for latching the low byte of the
PSEN322926OProgram Store Enable: The read strobe to external program memory. When the device
EA/V
PP
222016IGround: 0 V reference.
444038IPower Supply: This is the power supply voltage for normal, idle, and power-down
1–3
2140I/OT2 (P1.0): Timer/Counter 2 external count input/clockout (see Programmable
3241IT2EX (P1.1): Timer/Counter 2 Reload/Capture/Direction control
13–19
10–175,
7–13
11105IRxD (P3.0): Serial input port
13117OTxD (P3.1): Serial output port
14128IINT0 (P3.2): External interrupt
15139IINT1 (P3.3): External interrupt
161410IT0 (P3.4): Timer 0 external input
171511IT1 (P3.5): Timer 1 external input
181612OWR (P3.6): External data memory write strobe
191713ORD (P3.7): External data memory read strobe
353129IExternal Access Enable/Programming Supply Voltage: EA must be externally held low to enable the
operation.
them float and can be used as high-impedance inputs. Port 0 is also the multiplexed
low-order address and data bus during accesses to external program and data memory.
In this application, it uses strong internal pull-ups when emitting 1s. Port 0 also outputs
the code bytes during program verification and received code bytes during Flash
programming. External pull-ups are required during program verification.
I/OPort 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 1 pins that have
1s written to them are pulled high by the internal pull-ups and can be used as inputs. As
inputs, port 1 pins that are externally pulled low will source current because of the
internal pull-ups. (See DC Electrical Characteristics: IIL). Port 1 also receives the
low-order address byte during program memory verification. Alternate functions for Port 1
include:
Clock-Out)
1s written to them are pulled high by the internal pull-ups and can be used as inputs. As
inputs, port 2 pins that are externally being pulled low will source current because of the
internal pull-ups. (See DC Electrical Characteristics: IIL). Port 2 emits the high-order
address byte during fetches from external program memory and during accesses to
external data memory that use 16-bit addresses (MOVX @DPTR). In this application, it
uses strong internal pull-u ps when emitting 1s. During accesses to external data memory
that use 8 -bit addresses (MOV @Ri), port 2 emits the contents of the P2 special function
register. Some Port 2 pins receive the high order address bits during Flash programming
and verification.
I/OPort 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins that have
1s written to them are pulled high by the internal pull-ups and can be used as inputs. As
inputs, port 3 pins that are externally being pulled low will source current because of the
pull-ups. (See DC Electrical Characteristics: IIL). Port 3 also serves the special features
of the 80C51 family, as listed below:
device. An internal diffused resistor to VSS permits a power-on reset using only an
external capacitor to VCC.
address during an access to external memory. In normal operation, ALE is emitted at a
constant rate of 1/6 (12-clk) or 1/3 (6-clk Mode) the oscillator frequency, and can be used
for external timing or clocking. Note that one ALE pulse is skipped during each access to
external data memory. This pin is also the program pulse input (PROG) during Flash
programming. ALE can be disabled by setting SFR auxiliary.0. With this bit set, ALE will
be active only during a MOVX instruction.
is executing code from the external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to
external data memory. PSEN is not activated during fetches from internal program
memory.
device to fetch code from external program memory locations 0000H to FFFFH. If EA is held high, the device
executes from internal program memory. This pin also receives the 5 V / 12 V programming supply voltage
(VPP) during Flash programming. If security bit 1 is programmed, EA will be internally latched on Reset.
2003 Sep 1 1
8
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
PIN NUMBER
MNEMONICNAME AND FUNCTIONTYPELQFPDIPPLCC
XTAL1211915ICrystal 1: Input to the inverting oscillator amplifier and input to the internal clock
XTAL2201814OCrystal 2: Output from the inverting oscillator amplifier.
NOTE:
To avoid “latch-up” effect at power-on, the voltage on any pin at any time must not be higher than V
generator circuits.
+ 0.5 V or VSS – 0.5 V, respectively.
CC
P89C60X2/61X2
2003 Sep 1 1
9
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
P89C60X2/61X2
SPECIAL FUNCTION REGISTERS (see notes on next page)
Special Function Registers (SFRs) accesses are restricted in the following ways:
1. Do not attempt to access any SFR locations not defined.
2. Accesses to any defined SFR locations must be strictly for the functions for the SFRs.
3. SFR bits labeled ‘–’, ‘0’ or ‘1’ can ONLY be written and read as follows:
‘–’ MUST be written with ‘0’, but can return any value when read (even if it was written with ‘0’). It is a reserved bit and may be used in
future derivatives.
‘0’ MUST be written with ‘0’, and will return a ‘0’ when read.
‘1’ MUST be written with ‘1’, and will return a ‘1’ when read.
*: SFRs are bit addressable.
#: SFRs are modified from or added to the 80C51 SFRs.
–: Reserved bits (see note above).
1
: Reset value depends on reset source.
P89C60X2/61X2
2003 Sep 1 1
11
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
FLASH EPROM MEMORY
GENERAL DESCRIPTION
The P89C60X2/61X2 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 (ISP) and standard parallel
programming are both available. On-chip erase and write timing
generation contribute to a user friendly programming interface.
The P89C60X2/61X2 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 P89C60X2/61X2 uses a +5 V V
perform the Program/Erase algorithms (12 V tolerant).
supply to
PP
FEA TURES
•Flash EPROM internal program memory with Block Erase.
•Loader in BootROM allows in-system programming via the serial
port.
•Up to 64 kbytes 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:
– Byte Programming (8 ms).
– Typical erase times:
Block Erase (4 kbytes) in 3 seconds.
Full-chip erase in 15 seconds.
•Parallel programming with 87C51 compatible hardware interface
to programmer.
P89C60X2/61X2
•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
There are two methods of erasing or programming of the Flash
memory that may be used. First, the on-chip ISP boot loader may be
invoked. Second, 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 CHARACTERISTICS
Flash User Code Memory Organization
The P89C60X2/61X2 contains 64 kbytes Flash user code program
memory organized into 4-kbyte blocks (see Figure 1).
Boot ROM
When the microcontroller programs its Flash memory during ISP, all
of the low level details are handled by code that is contained in a
1 kbyte BootROM. BootROM operations include: erase block,
program byte, verify byte, program security bit, etc.
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 1). 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.
2003 Sep 1 1
12
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
Table 1.
CLOCK MODE CONFIG BIT (FX2)X2 bit in CKCONDESCRIPTION
1. Default clock mode after ChipErase is set to 12-clock.
P89C60X2
P89C61X2
FFFF
C000
PROGRAM
ADDRESS
8000
4000
2000
0000
Figure 1. Flash Memory Configuration
BLOCK 15
BLOCK 14
BLOCK 13
BLOCK 12
BLOCK 11
BLOCK 10
BLOCK 9
BLOCK 8
BLOCK 7
BLOCK 6
BLOCK 5
BLOCK 4
BLOCK 3
BLOCK 2
BLOCK 1
BLOCK 0
BOOT ROM
(1 kB)
Each block is
4 kbytes in size
P89C60X2/61X2
SU01673
Power-On Reset Code Execution
The P89C60X2/61X2 contains a special Flash register, the STATUS
BYTE. At the falling edge of reset, the P89C60X2/61X2 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 factory masked-ROM ISP boot
loader is invoked. The factory default for the Status Byte is FFh.
Once set to 00h, the Status Byte can only be changed back to FFh
by a full-chip erase operation when using ISP.
2003 Sep 1 1
Hardware Activation of the Boot Loader
The boot loader can also be executed by holding PSEN LOW,
EA
greater than VIH (such as +5 V), and ALE HIGH (or not connected)
at the falling edge of RESET. This is the same effect as having a
non-zero status byte. This allows an application to be built that will
normally execute the end user’s code but can be manually forced
into ISP operation.
After programming the Flash, the status byte should be programmed
to zero in order to allow execution of the user’s application code
beginning at address 0000H.
13
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
V
CC
RST
XTAL2
XTAL1
V
SS
Figure 2. In-System Programming with a Minimum of Pins
In-System Programming (ISP)
The In-System Programming (ISP) is performed without removing
the microcontroller from the system. The In-System Programming
(ISP) facility consists of a series of internal hardware resources
coupled with internal firmware to facilitate remote programming of
the P89C60X2/61X2 through the serial port. This firmware is
provided by Philips and embedded within each P89C60X2/61X2
device.
The Philips In-System Programming (ISP) facility has made in-circuit
programming in an embedded application possible with a minimum
of additional expense in components and circuit board area.
The ISP function uses five pins: TxD, RxD, V
Figure 2). Only a small connector needs to be available to interface
your application to an external circuit in order to use this feature.
The V
supply should be adequately decoupled and VPP not
PP
allowed to exceed datasheet limits.
Free ISP software is available from the Embedded Systems
Academy: “FlashMagic”
1. Direct your browser to the following page:
http://www.esacademy.com/software/flashmagic/
2. Download Flashmagic
3. Execute “flashmagic.exe” to install the software
Using the In-System Programming (ISP)
The ISP feature allows for a wide range of baud rates to be used in
your application, independent of the oscillator frequency. It is also
adaptable to a wide range of oscillator frequencies. This is
accomplished by measuring the bit-time of a single bit in a received
character. This information is then used to program the baud rate in
terms of timer counts based on the oscillator frequency. The ISP
feature requires that an initial character (an uppercase U) be sent to
the P89C60X2/61X2 to establish the baud rate. The ISP firmware
provides auto-echo of received characters.
Once baud rate initialization has been performed, the ISP firmware
will only accept Intel Hex-type records. Intel Hex records consist of
ASCII characters used to represent hexadecimal values and are
summarized below:
, VCC, and VPP (see
SS
P89C60X2
P89C61X2
P89C60X2/61X2
V
PP
V
CC
TxD
RxD
:NNAAAARRDD..DDCC<crlf>
In the Intel Hex record, the “NN” represents the number of data
bytes in the record. The P89C60X2/61X2 will accept up to 16 (10H)
data bytes. The “AAAA” string represents the address of the first
byte in the record. If there are zero bytes in the record, this field is
often set to 0000. The “RR” string indicates the record type. A
record type of “00” is a data record. A record type of “01” indicates
the end-of-file mark. In this application, additional record types will
be added to indicate either commands or data for the ISP facility.
The maximum number of data bytes in a record is limited to 16
(decimal). ISP commands are summarized in Table 2.
As a record is received by the P89C60X2/61X2, the information in
the record is stored internally and a checksum calculation is
performed. The operation indicated by the record type is not
performed until the entire record has been received. Should an error
occur in the checksum, the P89C60X2/61X2 will send an “X” out the
serial port indicating a checksum error. If the checksum calculation
is found to match the checksum in the record, then the command
will be executed. In most cases, successful reception of the record
will be indicated by transmitting a “.” character out the serial port
(displaying the contents of the internal program memory is an
exception).
In the case of a Data Record (record type 00), an additional check is
made. A “.” character will NOT be sent unless the record checksum
matched the calculated checksum and all of the bytes in the record
were successfully programmed. For a data record, an “X” indicates
that the checksum failed to match, and an “R” character indicates
that one of the bytes did not properly program. It is necessary to
send a type 02 record (specify oscillator frequency) to the
P89C60X2/61X2 before programming data.
The ISP facility was designed to that specific crystal frequencies
were not required in order to generate baud rates or time the
programming pulses. The user thus needs to provide the
P89C60X2/61X2 with information required to generate the proper
timing. Record type 02 is provided for this purpose.
+5 V (+12 V tolerant)
+5 V
TxD
RxD
V
SS
SU01674
2003 Sep 1 1
14
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
Table 2. Intel-Hex Records Used by In-System Programming
RECORD TYPECOMMAND/DATA FUNCTION
00Program Data
:nnaaaa00dd....ddcc
Where:
nn= number of bytes (hex) in record
aaaa= memory address of first byte in record
dd....dd = data bytes
cc= checksum
Example:
:10008000AF5F67F0602703E0322CFA92007780C3FD
01End of File (EOF), no operation
:xxxxxx01cc
Where:
xxxxxx= required field, but value is a “don’t care”
cc= checksum
Example:
:00000001FF
03Miscellaneous Write Functions
:nnxxxx03ffssddcc
Where:
nn= number of bytes (hex) in record
xxxx= required field, but value is a “don’t care”
03= Write Function
ff= subfunction code
ss= selection code
dd= data input (as needed)
cc= checksum
Subfunction Code = 04 (Set Status Byte to 00h)
ff = 04
ss = don’t care
Example:
:020000030400F7 set status byte to 00h (device executes user code after Reset)
Subfunction Code = 05 (Program Security Bits)
ff = 05
ss = 00 program security bit 1 (inhibit writing to Flash)
01 program security bit 2 (inhibit Flash verify)
02 program security bit 3 (disable external memory)
Example:
:020000030501F5program security bit 2
Subfunction Code = 06 (Program Flash X2 bit)
ff = 06
ss = 02 program FX2 bit (dd = 80) ⇒ 6–clk. mode enabled
dd = data
Example 1:
:0300000306028072program FX2 bit (enable 6–clk. mode)
P89C60X2/61X2
2003 Sep 1 1
15
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
RECORD TYPECOMMAND/DATA FUNCTION
03 (cont.)Subfunction Code = 07 (Full Chip Erase)
Erases all blocks, security bits, and sets status byte to default values
04Display Device Data or Blank Check – Record type 04 causes the contents of the entire Flash array to be sent out
the serial port in a formatted display. This display consists of an address and the contents of 16 bytes starting with that
address. No display of the device contents will occur if security bit 2 has been programmed. Data to the serial port is
initiated by the reception of any character and terminated by the reception of any character.
General Format of Function 04
:05xxxx04sssseeeeffcc
Where:
05= number of bytes (hex) in record
xxxx= required field, but value is a “don’t care”
04= “Display Device Data or Blank Check” function code
ssss= starting address
eeee= ending address
ff= subfunction
00 = display data
01 = blank check
02 = display data in data block (valid addresses: 0001 ~ 0FFFH)
cc= checksum
Example 1:
:0500000440004FFF0069 display 4000–4FFF
Example 2:
:0500000400000FFF02E7 display data in data block (the data at address 0000 is
invalid)
P89C60X2/61X2
2003 Sep 1 1
16
Philips SemiconductorsProduct data
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
RECORD TYPECOMMAND/DATA FUNCTION
05Miscellaneous Read Functions
General Format of Function 05
:02xxxx05ffsscc
Where:
02= number of bytes (hex) in record
xxxx= required field, but value is a “don’t care”
05= “Miscellaneous Read” function code
ffss= subfunction and selection code
0000 = read signature byte – manufacturer id (15H)
0001 = read signature byte – device id # 1 (C2H)
0002 = read signature byte – device id # 2
P89C60X2 = EFh
P89C61X2 = F0h
0003 = read FX2 bit
0080 = read ROM code revision
0700 = read security bits
0701 = read status byte
cc= checksum
Example 1:
:020000050001F8read signature byte – device id # 1
Example 2:
:020000050003F6read FX2 bit (bit 7 = 0 represents 12-clk mode, bit 7 = 1
02= number of bytes (hex) in record
xxxx= required field, but value is a “don’t care”
06= ”Direct Load of Baud Rate” function code
hh= high byte of Timer 2
ll= low byte of Timer 2
cc= checksum
Example:
:02000006F500F3
P89C60X2/61X2
2003 Sep 1 1
17
Philips SemiconductorsProduct data
PROTECTION DESCRIPTION
80C51 8-bit Flash microcontroller family
64KB Flash, 512B/1024B RAM
P89C60X2/61X2
Security
The security feature protects against software piracy and prevents the contents of the FLASH from being read. The Security Lock bits are
located in FLASH. The P89C60X2/61X2 has 3 programmable security lock bits that will provide different levels of protection for the on-chip code
and data (see Table 3). Unlike the ROM and OTP versions, the security lock bits are independent. LB3 includes the security protection of LB1.
Table 3.
SECURITY LOCK BITS
Level
LB1
LB2Program verification is disabled
LB3External execution is disabled.
NOTE:
1. The security lock bits are independent.
1
MOVC instructions executed from external program memory are disabled from fetching code bytes from
internal memory.
2003 Sep 1 1
18
Loading...
+ 39 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.