16.2Power-on-reset
17 MASK OPTIONS FOR P80CL31 AND P80C51
17.1P80CL31: ROMless version
17.2P80C51: 5V standard version
18SPECIAL FUNCTION REGISTERS
OVERVIEW
19INSTRUCTION SET
20LIMITING VALUES
21DC CHARACTERISTICS FOR P80CL31 AND
P80CL51
22DC CHARACTERISTICS FOR P80C51
23AC CHARACTERISTICS
24P85CL000HFZ ‘PIGGY-BACK’
SPECIFICATION
24.1General description
24.2Feature differences/additional features with
respect to P80CL51
24.3Common specification/feature differences
between P85CL000HFZ and
P83CL410/P80CL51
25PACKAGE OUTLINES
26SOLDERING
26.1Introduction
26.2DIP
26.3QFP and VSO
27DEFINITIONS
28LIFE SUPPORT APPLICATIONS
1997 Apr 152
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
1FEATURES
• Full static 80C51 Central Processing Unit
• 8-bit CPU, ROM, RAM, I/O in a 40-lead DIP,
40-lead VSO or 44-lead QFP package
• 128 bytes on-chip RAM Data Memory
• 4 kbytes on-chip ROM Program Memory for P80CL51
• External memory expandable up to 128 kbytes: RAM up
to 64 kbytes and ROM up to 64 kbytes
• Four 8-bit ports; 32 I/O lines
• Two 16-bit Timer/Event counters
• On-chip oscillator suitable for RC, LC, quartz crystal or
ceramic resonator
• Thirteen source, thirteen vector, nested interrupt
structure with two priority levels
• Full duplex serial port (UART)
• Enhanced architecture with:
– non-page oriented instructions
– direct addressing
– four 8-byte RAM register banks
– stack depth limited only by available internal RAM
(maximum 128 bytes)
– multiply, divide, subtract and compare instructions
• Reduced power consumption through Power-down and
Idle modes
• Wake-up via external interrupts at Port 1
• Frequency range: 0 to 16 MHz (P80C51: 3.5 MHz min.)
• Supply voltage: 1.8 to 6.0 V (P80C51: 5.0 V ±10%)
• Very low current consumption
• Operating ambient temperature range: −40 to +85 °C.
P80CL31; P80CL51
2GENERAL DESCRIPTION
The P80CL31; P80CL51 (hereafter generally referred to
as the P80CLx1) is manufactured in an advanced CMOS
technology. The P80CLx1 has the same instruction set as
the 80C51, consisting of over 100 instructions:
49 one-byte, 46 two-byte, and 16 three-byte. The device
operates over a wide range of supply voltages and has low
power consumption; there are two software selectable
modes for power reduction: Idle and Power-down.
For emulation purposes, the P85CL000 (piggy-back
version) with 256 bytes of RAM is recommended.
This data sheet details the specific properties of the
P80CL31; P80CL51. For details of the 80C51 core see
“Data Handbook IC20”
2.1 Versions: P80CL31 and P80C51
The P80CL31 is the ROMless version of the P80CL51.
The mask options on the P80CL31 are fixed as follows:
• All ports have option ‘1S’ (standard, HIGH after reset)
• Oscillator option: Oscillator 3
• Power-on-reset option: OFF.
The P80C51 is a restricted-voltage range version of the
P80CL51. The operating voltage is 5.0 V ±10%.
3APPLICATIONS
The P80CLx1 is especially suited for real-time applications
such as instrumentation, industrial control, intelligent
computer peripherals and consumer products.
The P80CLx1 also functions as an arithmetic processor
having facilities for both binary and BCD arithmetic plus
bit-handling capabilities.
Fig.3 Pin configuration for DIP40 and VSO40 packages.
1997 Apr 157
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
handbook, full pagewidth
P1.1/INT3
P1.2/INT4
P1.3/INT5
P1.4/INT6
44
43
42
41
1P1.5/INT7
RST
n.c.
2
3
4
5
6
7
8
9
10
11
P1.6/INT8
P1.7/INT9
P3.0/RXD/data
P3.1/TXD/clock
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
n.c.
P1.0/INT2
40
39
P80CL31
P83CL51
DD
V
38
P0.1/AD1
P0.0/AD0
37
36
P0.3/AD3
P0.2/AD2
35
34
P80CL31; P80CL51
P0.4/AD4
33
32
P0.5/AD5
31
P0.6/AD6
30
P0.7/AD7
29
EA
n.c.
28
27
ALE
PSEN
26
25
P2.7/A15
24
P2.6/A14
23
P2.5/A13
12
13
14
15
16
SS
P3.7/RD
P3.6/WR
XTAL2
XTAL1
V
Fig.4 Pin configuration for QFP44 package.
1997 Apr 158
17
n.c.
18
19
P2.0/A8
P2.1/A9
20
21
P2.2/A10
P2.3/A11
22
MBK034
P2.4/A12
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
P80CL31; P80CL51
UART
7.2Pin description
Table 1 Pin description for DIP40 (SOT190-1), VSO40 (SOT319-2) and QFP44 (SOT307-2) packages
For more extensive description of the port pins see Chapter 10 “I/O facilities”.
PIN
SYMBOL
INT2140• Port 1: 8-bit bidirectional I/O port (P1.0 to P1.7). Port pins that have
P1.0/
P1.1/
INT3241
INT4342
P1.2/
INT5443
P1.3/
INT6544
P1.4/
INT761
P1.5/
INT872
P1.6/
INT983
P1.7/
RST94Reset: a HIGH level on this pin for two machine cycles while the oscillator
P3.0/RXD/data105• Port 3: 8-bit bidirectional I/O port (P3.0 to P3.7).
P3.1/TXD/clock117
P3.2/INT0128
INT1139
P3.3/
P3.4/T01410
P3.5/T11511
WR1612
P3.6/
RD1713
P3.7/
XTAL21814Crystal oscillator output: output of the inverting amplifier of the oscillator.
XTAL11915Crystal oscillator input: input to the inverting amplifier of the oscillator,
V
SS
P2.0 to P2.7
A8 to A15
PSEN2926Program Store Enable. Output read strobe to external Program Memory.
DIP40
VSO40
2016Ground: circuit ground potential.
21 to 2818 to 25• Port 2: 8-bit bidirectional I/O port (P2.0 to P2.7) with internal pull-ups.
QFP44
logic 1s written to them are pulled HIGH by internal pull-ups, and in this
state can be used as inputs. As inputs, Port 1 pins that are externally
pulled LOW will source current (IIL, see Chapter 21) due to the internal
pull-ups. Port 1 output buffers can sink/source 4 LS TTL loads.
• Alternative functions:
– INT2 to INT9 are external interrupt inputs.
is running resets the device.
Same characteristics as Port 1.
• Alternative functions:
– RXD/data is the serial port receiver data input (asynchronous) or data
input/output (synchronous)
– TXD/clock is the serial port receiver data output (asynchronous) or
clock output (synchronous)
INT0 and INT1 are external interrupts 0 and 1
–
– T0 and T1 are external inputs for timers 0 and 1
– WR is the external Data Memory write strobe
– RD is the external Data Memory read strobe.
Left open when external clock is used.
also the input for an externally generated clock source.
Same characteristics as Port 1.
• High-order addressing: Port 2 emits the high-order address byte
(A8 to A15) during accesses to external memory that use 16-bit
addresses (MOVX @DPTR). In this application it uses the strong internal
pull-ups when emitting logic 1s. During accesses to external memory that
use 8-bit addresses (MOVX @Ri), Port 2 emits the contents of the P2
Special Function Register.
When executing code out of external Program Memory ,PSEN is activated
twice each machine cycle. However, during each access to external Data
Memory two PSEN activations are skipped.
DESCRIPTION
1997 Apr 159
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
P80CL31; P80CL51
UART
PIN
SYMBOL
ALE3027Address Latch Enable. Output pulse for latching the low byte of the
EA3129External Access. When EA is held HIGH the CPU executes out of internal
P0.7 to P0.0
AD7 to AD0
V
DD
n.c.−6, 17, 28,39Not connected.
DIP40
VSO40
32 to 3930 to 37• Port 0: 8-bit open-drain bidirectional I/O port. As an open-drain output
4038Power supply.
QFP44
address during access to external memory. ALE is emitted at a constant
rate of1⁄6× f
(assuming MOVX instructions are not used).
program memory (unless the program counter exceeds 0FFFH). Holding
EA LOW forces the CPU to execute out of external memory regardless of
the value of the program counter.
port it can sink 8 LS TTL loads. Port 0 pins that have logic 1s written to
them float, and in that state will function as high impedance inputs.
• Low-order addressing: Port 0 is also the multiplexed low-order address
and data bus during access to external memory. The strong internal
pull-ups are used while emitting logic 1s within the low order address.
, and may be used for external timing or clocking purposes
osc
DESCRIPTION
1997 Apr 1510
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
8FUNCTIONAL DESCRIPTION OVERVIEW
This chapter gives a brief overview of the device.
The detailed functional description is in the following
chapters as follows:
The P80CLx1 is a stand-alone high-performance CMOS
microcontroller designed for use in real-time applications
such as instrumentation, industrial control, intelligent
computer peripherals and consumer products.
P80CL31; P80CL51
The P80CLx1 contains 4 kbytes Program Memory (ROM;
P80CL51 only); a static 128 bytes Data Memory (RAM);
32 I/O lines; two16-bit timer/event counters;
a thirteen-source, two priority-level, nested interrupt
structure and on-chip oscillator and timing circuit.
A standard UART serial interface is also provided.
The device has two software-selectable modes of reduced
activity for power reduction:
• Idle mode; freezes the CPU while allowing the timers,
serial I/O and interrupt system to continue functioning.
• Power-down mode; saves the RAM contents but
freezes the oscillator causing all other chip functions to
be inoperative.
8.2CPU timing
A machine cycle consists of a sequence of 6 states. Each
state lasts for two oscillator periods, thus a machine cycle
takes 12 oscillator periods or 1 µs if the oscillator
frequency (f
) is 12 MHz.
osc
The device provides hardware features, architectural
enhancements and new instructions to function as a
controller for applications requiring up to 64 kbytes of
Program Memory and/or up to 64 kbytes of Data Memory.
1997 Apr 1511
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
9MEMORY ORGANIZATION
The P80CLx1 has 4 kbytes of Program Memory (ROM;
P80CL51 only) plus 128 bytes of Data Memory (RAM) on
board.The device has separate address spaces for
Program and Data Memory (see Fig.5). Using Port latches
P0 and P2, the P80CLx1 can address a maximum of
64 kbytes of program memory and a maximum of
64 kbytes of data memory. The CPU generates both read
(RD) and write (WR) signals for external Data Memory
accesses, and the read strobe (PSEN) for external
Program Memory.
9.1Program Memory
The P80CL51 contains 4 kbytes of internal ROM. After
reset the CPU begins execution at location 0000H.
The lower 4 kbytes of Program Memory can be
implemented in either on-chip ROM or external Program
Memory.
EA pin is tied to VDD, then Program Memory fetches
If the
from addresses 0000H to 0FFFH are directed to the
P80CL31; P80CL51
internal ROM. Fetches from addresses 1000H to FFFFH
are directed to external ROM. Program Counter values
greater than 0FFFH are automatically addressed to
external memory regardless of the state of the
9.2Data Memory
The P80CLx1 contains 128 bytes of internal RAM and 25
Special Function Registers (SFR). The memory map
(Fig.5) shows the internal Data Memory space divided into
the lower 128, the upper 128, and the SFR space.
The lower 128 bytes of the internal RAM are organized as
mapped in Fig.6. The lowest 32 bytes are grouped into 4
banks of 8 registers. Program instructions refer to these
registers within a register bank as R0 through R7. Two bits
in the Program Status Word select which register bank is
in use. The next 16 bytes above the register banks form a
block of bit-addressable memory space. The 128 bits in
this area can be directly addressed by the single-bit
manipulation instructions. The remaining registers
(30H to 7FH) are directly and indirectly byte addressable.
EA pin.
handbook, full pagewidth
4095
64K
4096
INTERNAL
(EA = 1)
PROGRAM MEMORY
EXTERNAL
4095
EXTERNAL
(EA = 0)
255
127
OVERLAPPED SPACE
INTERNAL
DATA RAM
0
INTERNAL DATA MEMORY
SPECIAL
FUNCTION
REGISTERS
MLA559
64K
0
EXTERNAL
DATA MEMORY
Fig.5 Memory map.
1997 Apr 1512
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
handbook, halfpage
R7
R0
R7
R0
R7
7FH
30H
2FH
20H
1FH
18H
17H
10H
0FH
P80CL31; P80CL51
bit-addressable space
(bit addresses 0 to 7F)
4 banks of 8 registers
(R0 to R7)
R0
R7
R0
Fig.6 The lower 128 bytes of internal RAM.
9.3Special Function Registers (SFRs)
The upper 128 bytes are the address locations of the
SFRs. Figure 7 shows the SFR space. The SFRs include
the port latches, timers, peripheral control, serial I/O
registers, etc. These registers can only be accessed by
direct addressing. There are 128 directly addressable
locations in the SFR address space (SFRs with addresses
divisible by eight).
9.4Addressing
The P8xCL410 has five methods for addressing source
operands:
• Register
• Direct
• Register-indirect
• Immediate
• Base-register plus index-register-indirect.
08H
07H
0
MLA560 - 1
The first three methods can be used for addressing
destination operands. Most instructions have a
‘destination/source’ field that specifies the data type,
addressing methods and operands involved.
For operations other than MOVs, the destination operand
is also a source operand.
Access to memory addressing is as follows:
• Registers in one of the four register banks through
register, direct or register-indirect
• Internal RAM (128 bytes) through direct or
register-indirect
• Special Function Registers through direct
• External data memory through register-indirect
• Program Memory look-up tables through base-register
plus index-register-indirect.
1997 Apr 1513
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
ook, full pagewidth
REGISTER
MNEMONIC
IP1
IX1
ACC
PSW
IRQ1
IP0
BIT ADDRESS
FEFFFD FC FB FA F9 F8
F6F7F5 F4 F3 F2 F1 F0F0HB
EEEFED EC EB EA E9 E8E8HIEN1
E6E7E5 E4 E3 E2 E1 E0
D6D7D5 D4 D3 D2D1 D0
C6C7C5 C4 C3 C2C1 C0
BD BC BB BA B9 B8
DIRECT
BYTE ADDRESS (HEX)
F8H
E9H
E0H
D0H
C0H
B8H
P80CL31; P80CL51
P3
IEN0
P2
S0BUF
S0CON
P1
TH1
TH0
TL1
TL0
TMOD
TCON
PCON
DPH
DPL
SP
P0
B5 B4 B3 B2 B1 B0B6B7
AEAFAD AC AB AA A9 A8
A6A7A5 A4 A3 A2 A1 A0
9E9F9D 9C 9B 9A 99 98
969795 94 93 92 91 90
8E8F8D 8C 8B 8A 89 88
868785 84 83 82 81 80
MLA561
B0H
A8H
A0H
99H
98H
90H
8DH
8CH
8BH
8AH
89H
88H
87H
83H
82H
81H
80H
SFRs containing
directly addressable
bits
Fig.7 Special Function Register memory map.
1997 Apr 1514
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
10 I/O FACILITIES
10.1Ports
The P80CLx1 has 32 I/O lines treated as 32 individually
addressable bits or as four parallel 8-bit addressable ports.
Ports 0, 1, 2 and 3 perform the alternative functions
detailed below. To enable a port pin alternate function, the
port bit latch in its SFR must contain a logic 1.
Port 0 Provides the multiplexed low-order address and
data bus for expanding the device with standard
memories and peripherals.
Port 1 Provides the inputs for the external interrupts
INT2 to INT9.
Port 2 Provides the high-order address when expanding
the device with external Program or Data Memory.
Port 3 Pins can be configured individually to provide:
• External interrupt request inputs: INT1 and INT0
• Timer/counter inputs: T1 and T0
• Control signals to read and write to external
memories: RD and WR
• UART input and output: RXD/data and
TXD/clock.
Each port consists of a latch (SFRs P0 to P3), an output
driver and input buffer. Ports 1, 2, and 3 have internal
pull-ups Figure 8(a) shows that the strong transistor ‘p1’ is
turned on for only 2 oscillator periods after a LOW-to-HIGH
transition in the port latch. When on, it turns on ‘p3’ (a weak
pull-up) through the inverter. This inverter and ‘p3’ form a
latch which holds the logic 1. In Port 0 the pull-up ‘p1’ is
only on when emitting logic 1s for external memory
access. Writing a logic 1 to a Port 0 bit latch leaves both
output transistors switched off so that the pin can be used
as a high-impedance input.
10.2Port options
The pins of port 1, port 2 and port 3 may be individually
configured with one of the following options. These options
are also shown in Fig.8.
Option 1 Standard Port; quasi-bidirectional I/O with
pull-up. The strong booster pull-up ‘p1’ is turned
on for two oscillator periods after a
LOW-to-HIGH transition in the port latch;
Fig.8(a).
P80CL31; P80CL51
Option 3 Push-pull; output with drive capability in both
polarities. Under this option, pins can only be
used as outputs; see Fig.8(c).
10.3Port 0 options
The definition of port options for Port 0 is slightly different.
Two cases are considered. First, access to external
memory (
boundary) and second, I/O accesses.
10.3.1E
Option 1 True logic 0 and logic 1 are written as address to
Option 2 An external pull-up resistor is required for
Option 3 Not allowed for external memory accesses as
10.3.2I/O A
Option 1 When writing a logic 1 to the port latch, the
Option 2 Open-drain; quasi-directional I/O with n-channel
Option 3 Push-Pull; output with drive capability in both
10.4SET/RESET options
Individual mask selection of the post-reset state is
available with any of the above pins. The required
selection is made by appending ‘S’ or ‘R’ to Options 1, 2,
or 3 above.
Option R RESET, at reset this pin will be initialized LOW.
Option S SET, at reset this pin will be initialized HIGH.
EA = 0 or access above the built-in memory
XTERNAL MEMORY ACCESSES
the external memory (strong pull-up to be used).
external accesses.
the port can only be used as output.
CCESSES
strong pull-up ‘p1’ will be on for 2 oscillator
periods. No weak pull-up exists. Without an
external pull-up, this option can be used as a
high-impedance input.
open-drain output. Use as an output requires the
connection of an external pull-up resistor.
See Fig.8(b).
polarities. Under this option pins can only be
used as outputs. See Fig.8(c).
Option 2 Open-drain; quasi-bidirectional I/O with
n-channel open-drain output. Use as an output
requires the connection of an external pull-up
resistor; see Fig.8(b).
1997 Apr 1515
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
handbook, full pagewidth
from port latch
read port pin
input data
2 oscillator
periods
Q
strong pull-up
INPUT
BUFFER
(a) Standard
P80CL31; P80CL51
+5 V
p2
p1
n
p3
I/O pin
+5 V
from port latch
read port pin
from port latch
Q
input data
Q
n
INPUT
BUFFER
(b) Open-drain
strong pull-up
+5 V
external
pull-up
I/O pin
p1
I/O pin
n
(c) Push-pull
Fig.8 Port configuration options.
1997 Apr 1516
MGD677
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
11 TIMERS/EVENT COUNTERS
The P80CLx1 contains two16-bit timer/event counter
registers; Timer 0 and Timer 1, which can perform the
following functions:
• Measure time intervals and pulse durations
• Count events
• Generate interrupt requests.
In the ‘Timer’ operating mode the register is incremented
every machine cycle. Since a machine cycle consists of 12
oscillator periods, the count rate is1⁄12× f
In the ‘Counter’ operating mode, the register is
incremented in response to a HIGH-to-LOW transition.
Since it takes 2 machine cycles (24 oscillator periods) to
recognize a HIGH-to-LOW transition, the maximum count
1
rate is
should be held for at least one complete machine cycle.
Timer 0 and Timer 1 can be programmed independently to
operate in four modes:
Mode 0 8-bit timer or 8-bit counter each with divide-by-32
Mode 1 16-bit time-interval or event counter.
Mode 2 8-bit time-interval or event counter with automatic
Mode 3 Timer 0 establishes TL0 and TH0 as two
⁄24× f
. To ensure a given level is sampled, it
osc
prescaler.
reload upon overflow.
separate counters.
osc
.
P80CL31; P80CL51
The following functions remain active during the Idle
mode:
• Timer 0 and Timer 1
• UART
• External interrupt.
These functions may generate an interrupt or reset; thus
ending the Idle mode.
There are two ways to terminate the Idle mode:
1. Activation of any enabled interrupt will cause IDL
(PCON.0) to be cleared by hardware thus terminating
the Idle mode. The interrupt is serviced, and following
the RETI instruction, the next instruction to be
executed will be the one following the instruction that
put the device in the Idle mode. The flag bits GF0
(PCON.2) and GF1 (PCON.3) may be used to
determine whether the interrupt was received during
normal execution or during the Idle mode.
For example, the instruction that writes to PCON.0 can
also set or clear one or both flag bits. When the Idle
mode is terminated by an interrupt, the service routine
can examine the status of the flag bits.
2. The second way of terminating the Idle mode is with an
external hardware reset. Since the oscillator is still
running, the hardware reset is required to be active for
two machine cycles (24 oscillator periods) to complete
the reset operation. Reset redefines all SFRs but does
not affect the on-chip RAM.
12 REDUCED POWER MODES
There are two software selectable modes of reduced
activity for further power reduction: Idle and Power-down.
12.1Idle mode
Idle mode operation permits the external interrupts, UART,
and timer blocks to continue to function while the clock to
the CPU is halted.
Idle mode is entered by setting the IDL bit in the Power
Control Register (PCON.0, see Table 2). The instruction
that sets IDL is the last instruction executed in the normal
operating mode before the Idle mode is activated.
Once in Idle mode, the CPU status is preserved along with
the Stack Pointer, Program Counter, Program Status
Word and Accumulator. The RAM and all other registers
maintain their data during Idle mode. The status of the
external pins during Idle mode is shown in Table 3.
1997 Apr 1517
12.2Power-down mode
Operation in Power-down mode freezes the oscillator.
The internal connections which link both Idle and
Power-down signals to the clock generation circuit are
shown in Fig.9.
Power-down mode is entered by setting the PD bit in the
Power Control Register (PCON.1, see Table 2).
The instruction that sets PD is the last executed prior to
going into the Power-down mode.
Once in the Power-down mode, the oscillator is stopped.
The contents of the on-chip RAM and the SFRs are
preserved. The port pins output the value held by their
respective SFRs. ALE and
In the Power-down mode, VDD may be reduced to
minimize circuit power consumption. The supply voltage
must not be reduced until the Power-down mode is
entered, and must be restored before the hardware reset
is applied which will free the oscillator. Reset should not be
released until the oscillator has restarted and stabilized.
PSEN are held LOW.
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
12.3Wake-up from Power-down mode
When in Power-down mode the controller can be
woken-up with either the external interrupts INT2 to INT9,
or a reset operation. The wake-up operation has two basic
approaches as explained in Section 12.3.1; 12.3.2 and
illustrated in Fig.10.
12.3.1W
If any of the interrupts INT2 to INT9 are enabled, the
device can be woken-up from the Power-down mode with
the external interrupts. To ensure that the oscillator is
stable before the controller restarts, the internal clock will
remain inactive for 1536 oscillator periods. This is
controlled by an on-chip delay counter.
12.3.2W
To wake-up the P80CLx1, the RST pin must be kept HIGH
for a minimum of 24 periods. The on-chip delay counter is
inactive. The user must ensure that the oscillator is stable
before any operation is attempted.
AKE-UP USING INT2 TO INT9
AKE-UP USING RST
P80CL31; P80CL51
12.4Power Control Register (PCON)
See Tables 2 and 3. Idle and Power-down modes are
activated by software using this SFR. PCON is not
bit-addressable.
12.5Status of external pins
The status of the external pins during Idle and Power-down
mode is shown in Table 4. If the Power-down mode is
activated whilst accessing external Program Memory, the
port data that is held in the Special Function Register P2 is
restored to Port 2.
If the data is a logic 1, the port pin is held HIGH during the
Power-down mode by the strong pull-up transistor ‘p1’;
see Fig.8(a).
Table 2 Power Control Register (address 87H)
7 6 543210
SMOD−−−GF1GF0PDIDL
Table 3 Description of PCON bits
BITSYMBOLDESCRIPTION
7SMODDouble Baud rate bit; see description of UART
6, 5, 4−reserved
3 and 2GF1 and GF0 General purpose flag bits
1PDPower-down bit; setting this bit activates the Power-down mode
0IDLIdle mode bit; setting this bit activates the Idle mode
Table 4 Status of external pins during Idle and Power-down modes
MODEMEMORYALE
Idleinternal11port dataport dataport dataport dataport data
external11floatingport dataaddressport dataport data
Power-downinternal00port dataport dataport dataport dataport data
external00floatingport dataport dataport dataport data
PSENPORT 0PORT 1PORT 2PORT 3PORT 4
1997 Apr 1518
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
handbook, full pagewidth
OSCILLATOR
PD
P80CL31; P80CL51
XTAL1XTAL2
interrupts
serial ports
CLOCK
GENERATOR
timer blocks
CPU
IDL
MLA563
handbook, full pagewidth
power-down
RST pin
external
interrupt
oscillator
Fig.9 Internal clock control in Idle and Power-down mode.
delay counter
1536 periods
24 periods
MGD679
Fig.10 Wake-up operation.
1997 Apr 1519
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
UART
13 STANDARD SERIAL INTERFACE SIO0: UART
This serial port is full duplex which means that it can
transmit and receive simultaneously. It is also
receive-buffered and can commence reception of a
second byte before a previously received byte has been
read from the register. (However, if the first byte has not
been read by the time the reception of the second byte is
complete, one of the bytes will be lost). The serial port
receive and transmit registers are both accessed via the
Special Function Register S0BUF. Writing to S0BUF loads
the transmit register and reading S0BUF accesses a
physically separate receive register.
The serial port can operate in 4 modes:
Mode 0 Serial data enters and exits through RXD. TXD
outputs the shift clock. Eight bits are
transmitted/received (LSB first). The baud rate is
fixed at
Mode 1 10 bits are transmitted (through TXD) or received
(through RXD): a start bit (logic 0), 8 data bits
(LSB first), and a stop bit (logic 1). On receive,
the stop bit goes into RB8 in Special Function
Register S0CON. The baud rate is variable.
Mode 2 11 bits are transmitted (through TXD) or received
(through RXD): start bit (logic 0), 8 data bits (LSB
first), a programmable 9th data bit, and a stop bit
(logic 1). On transmit, the 9th data bit (TB8 in
S0CON) can be assigned the value of a logic 0 or
logic 1. Or, for example, the parity bit (P, in the
PSW) could be moved into TB8. On receive, the
9th data bit goes into RB8 in S0CON, while the
stop bit is ignored. The baud rate is
programmable to either1⁄32or1⁄64× f
Mode 3 11 bits are transmitted (through TXD) or received
(through RXD): a start bit (logic 0), 8 data bits
(LSB first), a programmable 9th data bit and a
stop bit (logic 1). In fact, Mode 3 is the same as
Mode 2 in all respects except baud rate.
The baud rate in Mode 3 is variable.
1
⁄12× f
osc
.
.
osc
P80CL31; P80CL51
In all four modes, transmission is initiated by any
instruction that uses S0BUF as a destination register.
Reception is initiated in Mode 0 by the condition RI = 0 and
REN = 1. Reception is initiated in the other modes by the
incoming start bit if REN = 1.
13.1Multiprocessor communications
Modes 2 and 3 have a special provision for multiprocessor
communications. In these modes, 9 data bits are received.
th
bit goes into RB8. The following bit is the stop bit.
The 9
The port can be programmed such that when the stop bit
is received, the serial port interrupt will be activated, but
only if RB8 = 1. This feature is enabled by setting bit SM2
in S0CON. One use of this feature, in multiprocessor
systems, is as follows.
When the master processor wants to transmit a block of
data to one of several slaves, it first sends out an address
byte which identifies the target slave. An address byte
differs from a data byte in that the 9
address byte and LOW in a data byte. With SM2 = 1,
no slave will be interrupted by a data byte. An address
byte, however, will interrupt all slaves, so that each slave
can examine the received byte and see if it is being
addressed. The addressed slave will clear its SM2 bit and
prepare to receive the data bytes that will be sent. The
slaves that were not being addressed leave their SM2 bits
set and go on about their business, ignoring the coming
data bytes.
SM2 has no effect in Mode 0, and in Mode 1 can be used
to check the validity of the stop bit. In a Mode 1 reception,
if SM2 = 1, the receive interrupt will not be activated unless
a valid stop bit is received.
13.2Serial Port Control and Status Register
(S0CON)
The Serial Port Control and Status Register is the Special
Function Register S0CON. The register contains not only
the mode selection bits, but also the 9
and receive (TB8 and RB8), and the serial port interrupt
bits (TI and RI).
th
bit is HIGH in an
th
data bit for transmit
1997 Apr 1520
Philips SemiconductorsProduct specification
Low voltage 8-bit microcontrollers with
P80CL31; P80CL51
UART
Table 5 Serial Port Control Register (address 98H)
76543210
SM0SM1SM2RENTB8RB8TIRI
Table 6 Description of S0CON bits
BITSYMBOLDESCRIPTION
7SM0These bits are used to select the serial port mode; see Table 7.
6SM1
5SM2Enables the multiprocessor communication feature in Modes 2 and 3. In these modes, if
SM2 = 1, then RI will not be activated if the received 9
In Mode 1, if SM2 = 1, then RI will not be activated unless a valid stop bit was received.
In Mode 0, SM2 should be a logic 0.
4RENEnables serial reception and is set by software to enable reception, and cleared by
software to disable reception.
th
3TB8Is the 9
data bit that will be transmitted in Modes 2 and 3; set or cleared by software as
desired.
th
2RB8In Modes 2 and 3, is the 9
data bit received. In Mode 1, if SM2 = 0 then RB8 is the stop
bit that was received; in Mode 0, RB8 is not used.
1TIThe transmit interrupt flag. Set by hardware at the end of the 8
at the beginning of the stop bit time in the other modes, in any serial transmission. Must
be cleared by software.
0RIThe receive interrupt flag. Set by hardware at the end of the 8
halfway through the stop bit time in the other modes, in any serial transmission (except
see SM2). Must be cleared by software.
th
data bit (RB8) is a logic 0.
th
bit time in Mode 0, or
th
bit time in Mode 0, or
Table 7 Selection of the serial port modes
SM0SM1MODEDESCRIPTIONBAUD RATE
00Mode 0Shift register
01Mode 18-bit UARTvariable
1
10Mode 29-bit UART
⁄32or1⁄64× f
11Mode 39-bit UARTvariable
1
⁄12× f
osc
osc
1997 Apr 1521
Loading...
+ 47 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.