– Clock can be stopped and resumed
– Idle Mode
– Power-down Mode
• ADC active in Idle Mode
• Second DPTR register
• ALE inhibit for EMI reduction
• Programmable I/O port pins (pseudo bi-directional,
push-pull, high impedance, open drain)
• Wake-up from Power-down by external interrupts
• Software reset bit (AUXR1.5)
• Low active reset pin
• Power-on detect reset
• Once mode
1.2CAN Related Features of the 8xC591
• CAN 2.0B active controller, supporting 11-bit Standard
and 29-bit Extended indentifiers
• 1 Mbit/s CAN bus speed with 8 MHz clock achievable
• 64 byte receive FIFO (can capture sequential Data
Frames from the
Transport Layer of higher protocols such as DeviceNet,
CANopen and OSEK)
• 13 byte transmit buffer
• EnhancedPeliCANcore(fromthe SJA1000 stand-alone
CAN2.0B controller)
1.2.1P
• Four independently configurable Screeners
(Acceptance Filters)
• Each Screener has two 32-bit specifies:
– 32-bit Match and
– 32-bit Mask
• 32-bits of Mask
addressing per
• Higher layer protocols especially supported in Standard
CAN format with:
– Up to four, 11-bit ID Screeners that also Screen the
– i.e.,Data Frames are Screenedbythe CAN ID andby
• Up to eight, 11-bit ID Screeners half of which
Screen the
• All Screeners are changeable “on the fly”
• Listen Only Mode, Self Test Mode
• Error Code Capture, Arbitration Lost Capture, readable
Error Counters
ELICAN FEATURES
two (2) Data Bytes
Data Byte content
same
per Screener
Screener
first
Data Byte
source as required by the
allows
unique
Group
also
2000 Jul 263
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
2GENERAL DESCRIPTION
The P8xC591 is a single-chip 8-bit-high-performance
microcontroller, with on-chip CAN-controller, derived from
the 80C51 microcontroller family.
Ituses thepowerful 80C51 instructionset and includesthe
successful PeliCAN functionality of the SJA1000 CAN
controller from Philips Semiconductors.
The fully static core provides extended power save
provisions as the oscillator can be stopped and easily
restarted without loss of data. The improved internal clock
prescalerof 1:1achieves a 500 nsinstruction cycle timeat
12 MHz external clock rate.
Figure 1 shows a Block Diagram of the P8xC591. The
microcontroller is manufactured in an advanced CMOS
process, and is designed for use in automotive and
general industrial applications. In addition to the 80C51
standard features, the device provides a number of
dedicated hardware functions for these applications.
Two versions of the P8xC591 will be offered:
• P83C591 (with ROM)
• P87C591 (with OTP)
The temperature range includes (max. f
• -40 to +85 °C version, for general applications
The P8xC591 combines the functions of the P87C554
(microcontroller) and the SJA1000 (stand-alone
CAN-controller) with the following enhanced features:
• Enhanced CAN receive interrupt (level sensitive)
• Extended acceptance filter
• Acceptance filter changeable “on the fly”.
The main differences between P8xC591 and P87C554
are:
• CAN-controller on chip
• 6-input ADC
• Low active Reset
• 44 leads.
= 12 MHz):
CLK
Hereafter these versions will be referred to as P8xC591.
PSEN2632Program Store Enable output: read strobe to the external Program Memory
via Ports 0 and 2. Is activated twice each machine cycle during fetches from
external Program Memory. When executing out of external Program Memory
two activations of
Memory.
PSEN is not activated (remains HIGH) during no fetches from
external Program Memory.
PSEN are skipped during each access to external Data
PSEN can sink/source 8 LSTTL inputs. It can
drive CMOS inputs without external pull-ups.
PROG2733Address Latch Enable output. Latches the low byte of the address during
ALE/
access of external memory in normal operation. It is activated every six
oscillator periods except during an external Data Memory access. ALE can
sink/source 8 LSTTL inputs. It can drive CMOS inputs without an external
pull-up. To prohibit the toggling of ALE pin (RFI noise reduction) the bit A0
(SFR: AUXR.0) must be set by software; see Table 4.
PROG: the programming pulse input; alternative function for the P87C591.
EA/V
PP
2935External Access input. If, during reset, EA is held at a TTL level HIGH the
CPU executes out of the internal Program Memory.If, during reset,
EA is held
at a TTL level LOW the CPU executes out of external Program Memory via
Port 0 and Port 2.
EA is not allowed to float. EA is latched during reset and
don’t care after reset.
: the programming supply voltage; alternative function for the P87C591.
V
PP
P0.0/AD0 to
P0.7/AD7
30 to 37 36 to 43 Port 0: 8-bit open-drain bidirectional I/O port.
During reset, Port 0 is HIGH-Impedance (Tri-State).
AD7 to AD0: Multiplexed Low-order address and Data bus for external
memory. During these accesses internal pull-ups are activated. Port 0 can
sink/source up to 8 LSTTL inputs.
AV
AV
ref+
SS
3844Analog to Digital Conversion Reference Resistor: High-end.
391Analog ground.
2000 Jul 2610
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
SYMBOL
DESCRIPTION
QFP44 PLCC44
PIN
P1.0 to P1.4
P1.5 to P1.7
40 to 44
1to3
2to6
7to9
Port 1: 8-bit I/O port with a user configurable output type. The operation of
Port 1 pins asinputs or outputs depends upon the port configuration selected.
Each port pin is configured independently.
Port 1 also provides various special functions as described below:
P1.0402RXDC: CAN Receiver input line.
P1.1413TXDC: CAN Transmit output line.
During reset, Port P1.0 and P1.1 will be asynchronously driven resistive
HIGH, P1.2 to P1.7 is High-Impedance (Tri-state).
P1.2 to P1.442 to 44 4 to 6CT0I/INT2 / CT1I/INT3 / CT2I/INT4: T2 Capture timer inputs or External
Interrupt inputs.
ADC0 to ADC2: Alternate function: Input channels to ADC.
P1.5 to P1.71 to 37 to 9
ADC3 to ADC5: Input channels to ADC:
P1.517CT3I/INT5: T2 Capture timer input or External Interrupt inputs.
P1.628SCL: Serial port clock line I
2
implemented at I
C.
P1.739SDA: Serial data clock line I
2
implemented at I
C.
2
C. Push-pull or pseudo bidrectional modes is not
2
C.Push-pull or pseudo bidrectional modes is not
Port 1 has four modes selected on a per bit basis by writing to the P1M1 and
P1M2 registers as follows:
1. Toavoid “latch-up” effectas power-on, the voltageon any pinatany time mustnot be higher orlower than V
−0.5 V.
or V
SS
2. Not implemented for P1.6 and P1.7.
2000 Jul 2611
DD
+0.5 V
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
7MEMORY ORGANIZATION
The Central Processing Unit (CPU) manipulates operands in three memory spaces as follows (see Fig.5):
• 16 Kbytes internal resp. 64 Kbytes external Program Memory
• 512 bytes internal Data Memory Main-and Auxiliary RAM
• up to 64 Kbytes external Data Memory (with 256 bytes residing in the internal Auxiliary RAM).
handbook, full pagewidth
16384
16383
0
64K
EXTERNAL
INTERNAL
(EA = 1)
PROGRAM MEMORY
EXTERNAL
(EA = 0)
255
INDIRECT ONLY
127
DIRECT AND
0
OVERLAPPED SPACE
INDIRECT
MAIN RAM
INTERNAL DATA MEMORY
SFRs
AUXILIARY
RAM
(EXTRAM = 0)
MHI005
64K
256
EXTERNAL
DATA MEMORY
Fig.5 Memory map and address space with EXTRAM = 0.
2000 Jul 2612
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
7.1Program Memory
The P8xC591 contains 16 Kbytes of on-chip Program
Memorywhich canbe extended to64 Kbytes with external
memories. When
fetches instructions from internal ROMunless theaddress
exceeds 3FFFh. Locations 4000h to FFFFh are fetched
from external Program Memory. When the
LOW, all instruction fetches are from external memory.
EA pin is latched during reset and is “don’t care” after
The
reset.
Both, for the ROM and EPROM version of the P8xC591,
precautions are implemented to protectthe deviceagainst
illegal Program Memory code reading.
7.2Addressing
The P8xC591 has five methods for addressing the
Program and Data memory:
• Register
• Direct
• Register-Indirect
• Immediate
• Base-Register plus Index-Register-Indirect.
For more details about Addressing modes please refer to
Section 22.1 “Addressing Modes”.
7.3Expanded Data RAM addressing
The P8xC591 has internal data memory that is mapped
into four separate segments: the lower 128 bytes of RAM,
upper 128 bytes of RAM, 128 bytes Special Function
Register (SFR), and 256 bytes AuxiliaryRAM (AUX-RAM)
as shown in Figure 5.
The four segments are:
1. The Lower 128 bytes of RAM (addresses 00H to 7FH)
are directly and indirectly addressable (see Fig.6).
2. The Upper 128 bytes of RAM(addresses 80H to FFH)
are indirectly addressable.
3. The Special Function Registers, SFRs, (addresses
80H to FFH) are directly addressable only. All these
SFRs are described in Table 4.
4. The 256-bytes AUX-RAM (00H - FFH) are indirectly
accessed by move external instruction, MOVX, and
within the EXTRAM bit cleared, see Table 3.
The Lower 128 bytes can be accessed by either direct or
indirect addressing. The Upper 128 bytes can be
accessed by indirect addressing only. The Upper 128
bytes occupy the same address space as the SFR. That
EA pin is held HIGH, the P8xC591
EA pin is held
means they have the same address, but are physically
separate from SFR space.
When an instruction accesses an internal location above
address 7FH, the CPU knowswhether theaccess isto the
upper 128 bytes of data RAM or to SFR space by the
addressing mode used in the instruction. Instructions that
use direct addressing access SFR space.
For example:
MOV 0A0H,#data
accesses the SFR at location 0A0H (which is P2).
Instructions that use indirect addressingaccess theUpper
128 bytes of data RAM.
For example:
MOV @ R0,#data
where R0 contains 0A0H, accesses the data byte at
address 0A0H, rather than P2 (whose address is 0A0H).
The AUX-RAM can be accessed by indirect addressing,
with EXTRAM bit cleared and MOVX instructions. This
part of memory is physically located on-chip, logically
occupies the first 256-bytes of external data memory.
With EXTRAM = 0, the AUX-RAM is indirectly addressed,
using the MOVX instruction in combination with any of the
registers R0, R1 of the selected bank or DPTR. An access
to AUX-RAM will not affectports P0,P3.6 (WR#)and P3.7
(RD#). P2 SFR is output during external addressing. For
example, with EXTRAM = 0,
MOV @ R0,#data
where R0 contains 0A0h, access the AUX-RAM at
address 0A0H rather than external memory. An access to
external data memory locations higher than FFH (i.e.,
0100H to FFFFH) willbe performed with the MOVX DPTR
instructions in the same way as in the standard 80C51, so
with P0 and P2 as data/address bus, and P3.6 and P3.7
as write and read timing signals. Refer to Table 4.
With EXTRAM = 1, MOVX @ Ri and MOVX @ DPTR will
be similar to the standard 80C51. MOVX @ Ri will provide
an 8-bit address multiplexed with data on Port 0 and any
output port pins can be used to output higher order
address bits. This is to provide the external paging
capability. MOVX @ DPTR will generate a 16-bit address.
Port 2 outputs the high-order eight address bits (the
contents of DPH) while Port 0 multiplexes the low-order
eightaddressbits (DPL) with data.MOVX@Ri and MOVX
@ DPTR will generate either read or write signals on P3.6
(#WR) and P3.7 (#RD).
The stack pointer (SP) may be located anywhere in the
256 bytes RAM (lower and upper RAM) internal data
memory. The stack cannot be located in the AUX-RAM.
2000 Jul 2613
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
Table 2 AUX-RAM Page Register (address 8EH)
76543210
-----LVADCEXTRAMAO
Table 3 Description of AUX-RAM bits
BITSYMBOLFUNCTION
7 to 3−Reserved for future use; see Note 1.
2LVADCEnable A/D low voltage operation.
LVADC
0
1
1EXTRAMInternal/External RAM (00H - FFH) access using MOVX @ RI / @ DPTR
EXTRAM
0
1
0AODisable/Enable ALE.
AO
0
1
Operating Mode
Turns off A/D charge pump.
Turns on A/D charge pump. Required for operation below 4 V.
Operating Mode
Internal AUX-RAM (00H - FH) access using MOVX @ RI / @ DPTR.
External data memory access.
Operating Mode
ALE is permitted at a constant rate of 1/6 the oscillator frequency.
ALE is active only during a MOVX or MOVC instruction.
Notes
1. Usersoftware shouldnot write ‘1’sto reserved bits.These bits maybe used infuture 80C51 familyproducts toinvoke
new features. In that case, the reset or inactive of the new bitwill be 0, and its active value will be ‘1’. The value read
from a reserved bit is indeterminate.
2. Reset value is ‘xxxxxx10B’.
2000 Jul 2614
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
handbook, full pagewidth
7Fh
(MSB)(LSB)
7F 7E 7D 7C 7B 7A 79 78
2Fh
2Eh
77 76 75 74 73 72 71 70
6F 6E 6D 6C 6B 6A 69 68
2Dh
67 66 65 64 63 62 61 60
2Ch
2Bh
5F 5E 5D 5C 5B 5A 59 58
2Ah
57 56 55 54 53 52 51 50
29h
4F 4E 4D 4C 4B 4A 49 48
28h
47 46 45 44 43 42 41 40
27h
3F 3E 3D 3C 3B 3A 39 38
26h
37 36 35 34 33 32 31 30
25h
2F 2E 2D 2C 2B 2A 29 28
24h
27 26 25 24 23 22 21 20
23h
1F 1E 1D 1C 1B 1A 19 18
22h
17 16 15 14 13 12 11 10
21h
0F 0E 0D 0C 0B 0A 09 08
20h
07 06 05 04 03 02 01 00
1Fh
18h
17h
10h
0Fh
08h
07h
00h
REGISTER BANK 3
REGISTER BANK 2
REGISTER BANK 1
REGISTER BANK 0
127
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
24
23
16
15
8
7
0
MHI006
Fig.6 Internal Main RAM bit addresses.
2000 Jul 2615
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
7.3.1SPECIAL FUNCTION REGISTERSTable 4 Special Function Register Bit Address, Symbol or Alternate Port Function
* = SFRs are bit addressable; # = SFRs are modified from or added to the 80C51 SFRs.
NAMEDESCRIPTION
ACC*AccumulatorE0HE7E6E5E4E3E2E1E000H
ADCH#A/D converter highC6Hxxxxxxxxb
ADCON#A/D controlC5HADC.1ADC.0-ADCIADCSAADR2AADR1AADR0xx000000b
AUXRAuxiliary8EH-----LVADC EXTRAMA0xxxxx110B
AUXR1AuxiliaryA2HADC8AIDLSRSTWDEWUPD0-DPS000000x0B
B*B registerF0HF7F6F5F4F3F2F1F000H
CTCON#Capture controlEBHCTN3CTP3CTN2CTP2CTN1CTP1CTN0CTP000H
CTH3#Capture high 3CFHxxxxxxxxB
CTH2#Capture high 2CEHxxxxxxxxB
CTH1#Capture high 1CDHxxxxxxxxB
CTH0#Capture high 0CCHxxxxxxxxB
CMH2#Compare high 2CBH00H
CMH1#Compare high 1CAH00H
CMH0#Compare high 0C9H00H
CTL3#Capture low 3AFHxxxxxxxxB
CTL2#Capture low 2AEHxxxxxxxxB
CTL1#Capture low 1ADhxxxxxxxxB
CTL0#Capture low 0ACHxxxxxxxxB
CML2#Compare low 2ABH00H
CML1#Compare low 1AAH00H
CML0#Compare low 0A9H00H
DPTR:Data Pointer (2 bytes):
DPHData Pointer High83h00H
DPLData Pointer Low82h00H
Single-chip 8-bit microcontroller with CAN controllerP8xC591
7.4Dual DPTR
The dual DPTR structure (see Figure 7) is a way by which
the chip will specify the address of an external data
memorylocation. There aretwo 16-bit DPTRregistersthat
address the external memory, and a single bit called DPS
= AUXR1/bit0 that allows the program code to switch
between them.
The DPS bit status should be saved by software when
switching between DPTR0 and DPTR1.
Note that bit 2is not writable and is always read as a zero.
This allows the DPS bit to be quickly toggled simply by
executing an INC AUXR1 instruction without affecting the
other bits.
DPTR Instructions
Theinstructions that refer toDPTRrefer to thedatapointer
that is currently selected using the AUXR1/bit 0 register.
The six instructions that use the DPTR are as follows:
INC DPTRIncrements the data pointer by 1
MCV DPTR, #data 16Loadsthe DPTRwith a16-bit
constant
MOV A, @ A+DPTRMove code byte relative to
DPTR to ACC
MOVX A, @ DPTRMove external RAM (16-bit
address) to ACC
MOVX @ DPTR, AMove ACC to external RAM
(16-bit address)
JMP @ A + DPTRJump indirect relative to
DPTR
The data pointer canbe accessed on a byte-by-byte basis
by specifying the low or high byte in an instruction which
accesses the SFRs. See application note AN458 for more
details.
handbook, full pagewidth
DPS
BT0
AUXR1
DPH
(83H)
DPTR1
DPTR0
DPL
(82H)
Fig.7 Dual DPTR:
EXTERNAL
DATA
MEMORY
MHI007
2000 Jul 2619
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
7.4.1AUXR1 PAGE REGISTER
Table 5 AUXR1 Page Register (address A2H)
76543210
ADC8AIDLSRSTWDEWUPD0−DSP
Table 6 Description of AUXR1 of bits
User software should not write 1s to reserved bits. Theses bits may be used in future 8051 family products to invoke
new features. Inthat case, the reset or inactive valueof the new bit will be logic 0, and its activevalue will be logic 1. The
value read from a reserved bit is indeterminate. The reset value of AUXR1 is (000000xB).
BITSYMBOLDESCRIPTION
7ADC8ADC Mode Switch. Switches between 10-bit conversion and 8-bit conversion
ADC8
6AIDLEnables the ADC during Idle mode.
5SRSTSoftware Reset.
4WDEWatchdog Timer Enable Flag.
3WUPDEnable Wake-up from Power-down.
20Reserved.
1−Reserved.
0DSPData Pointer Switch. Switches between DPRT0 and DPTR1.
ADC8
Operating Mode
0
10-bit conversion (50 machine cycles)
1
8-bit conversion (24 machine cycles)
Operating Mode
0
DPTR0
1
DPTR1
2000 Jul 2620
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
8I/O FACILITIES
The P8xC591 consists of 32 I/O Port lines with partly
multiple functions. The I/O’s are held HIGH during reset
(asynchronous, before oscillator is running).
Ports 0, 1, 2 and 3 perform the following alternative
functions:
Port 0 is the same as in the 80C51. After reset the Port
Special Function Register is set to ‘FFh’ as known
from other 80C51 derivatives. Port 0 also provides
the multiplexed low-order address and data bus
used for expanding the P8xC591 with standard
memories and peripherals.
Port 1 supports several alternative functionalities. For this
reason it has different I/O stages. Note, port P1.0
and P1.1 are Driven-High and P1.2 to P1.7 are
High-Impedance (Tri-state) after reset.
Port 2 is the same as in the 80C51. After reset the Port
Special Function Register is set to ‘FFh’ as known
from other 80C51 derivatives. Port 2 also provides
the high-order address bus when the P8xC591 is
expanded with external Program Memory and/or
external Data Memory.
Port 3 is the same as in the 80C51. During reset the Port
3Special Function Register issetto‘FFh’ as known
from other 80C51 derivatives.
A pulse of such short duration is necessary in order to
recover from a processor or system fault as fast as
possible.
Note that the short reset pulse from Timer T3 cannot
discharge the power-on reset capacitor (see Figure 8).
Consequently,when the watchdog timerisalso used to set
externaldevices, this capacitor arrangementshouldnot be
connected to the
RST pin, and adifferent circuitshould be
used to perform the power-on reset operation. A timer T3
overflow, if enabled, will force a reset condition to the
P8xC591 by an internal connection, whether the output
RST is pulled-up HIGH or not.
A reset may be performed in software by setting the
software reset bit, SRST (AUXR1.5).
This device also has a Power-on Detect Reset circuit as
transitions from VCC past V
V
CC
on-chip
resistor
V
DD
handbook, halfpage
RST
SCHMITT
TRIGGER
RST
.
CIRCUITRY
RESET
9OSCILLATOR CHARACTERISTICS
XTAL1 and XTAL2 are the input and output, respectively,
of an inverting amplifier. The pins can be configured for
use as an on-chip oscillator, as shown in the logic symbol.
To drive the device from an external clock source, XTAL1
should be driven while XTAL2 is left unconnected. There
are no requirementson the duty cycle ofthe externalclock
signal. However, minimum and maximum high and low
times specified in the data sheet must be observed.
10 RESET
A reset is accomplished by holding the
RST pin LOW for
at least two machine cycles (12 oscillator periods), while
the oscillator is running. To insure a good power-on reset,
RSTpin must be lowlongenough to allow theoscillator
the
time to start up (normally a few milliseconds) plus two
machine cycles.
RST line can also be pulled LOW internally by a
The
pull-down transistor activated by the watchdog timer T3.
Thelength of theoutputpulse from T3is3 machine cycles.
Fig.8 On-Chip Reset Configuration.
handbook, halfpage
2.2 µF
V
DD
R
RST
RST
P8xC591
MHI009
Fig.9 Power-on Reset.
overflow
timer T3
MHI008
2000 Jul 2621
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
11 LOW POWER MODES
11.1Stop Clock Mode
The static design enables the clock speed to be reduced
down to 0 MHz (stopped). When the oscillator is stopped,
the RAM and Special Function Registers retain their
values. This mode allows step-by-step utilization and
permits reduced system power consumption by lowering
the clock frequency down to any value. For lowest power
consumption the Power-down mode is suggested.
11.2Idle Mode
In the Idlemode (seeTable 7), the CPU puts itselfto sleep
while all of the on-chip peripherals stay active. The
instruction to invoke the idle mode is the last instruction
executed in the normal operating mode before the Idle
mode is activated. The CPU contents, the on-chip RAM,
andall of the specialfunctionregisters remain intact during
this mode. The Idle mode can be terminated either by any
enabled interrupt (at which time the process is picked up
at the interrupt service routine and continued), or by a
hardware reset which starts the processor in the same
manner as a Power-on reset.
11.3Power-down Mode
To save even more power, a Power-down mode (see
Table 7) can be invoked by software. In this mode, the
oscillatorisstopped and the instructionthatinvokedPower
Down is the last instruction executed. The on-chip RAM
and Special FunctionRegisters retain their values downto
2.0 Vand care mustbetaken to returnV
tothe minimum
CC
specifiedoperating voltages beforethePower-down Mode
is terminated.
A hardware reset or external interrupt can be used to exit
from Power-down. The Wake-up from Power-down bit,
WUPD (AUXR1.3) must be set in order for an interrupt to
cause a Wake-up from Power-down. Reset redefines all
the SFRs but does not change the on-chip RAM. A
Wake-up allows both the SFRs and the on-chip RAM to
retain their values.
To properly terminate Power-down the reset or external
interrupt should not be executed before V
is restored to
CC
its normal operating level and must be held active long
enough for the oscillator to restart and stabilize (normally
less than 10 ms).
Table 7 Status of external pins during Idle and Power-down modes
INT0 and INT1must beenabled and configured as level-sensitive. Holding thepin lowrestarts
the oscillator but bringing the pin back high completes the exit. Once the interrupt is serviced, the next instruction to be
executed after RETI will be the one following the instruction that put the device into Power-down.
2000 Jul 2622
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
11.3.1POWER OFF FLAG
The Power Off Flag (POF) is set by on-chip circuitry when
theV
levelon the P8xC591rises from 0to5 V. The POF
CC
bit can be set or cleared by software allowing a user to
determine if the reset is the result of a power-on or warm
after Power-down. The V
for the POF to remain unaffected by the V
11.3.2D
ESIGN CONSIDERATION
level must remain above 3 V
CC
level.
CC
• When the Idle mode is terminated by a hardware reset,
the device normally resumes program execution, from
where it left off, up to two machine cycles before the
internal reset algorithm takes control.On-chip hardware
inhibits access to internal RAM in this event, but access
to the port pins is not inhibited. To eliminate the
possibility of an unexpected write when Idle is
terminated by reset, the instruction following the one
that invokes Idle should not be one that writes to a port
pin or to external memory.
11.3.5P
OWER CONTROL REGISTER (PCON)
11.3.3ONCE
TM
MODE
The ONCETM (“On-Circuit Emulation”) Mode facilities
testing and debugging of systems without the device
having to be removed from the circuit.The ONCE Mode is
invoked by:
1. Pull ALE low while the device is in reset an
PSEN is
high,
2. Hold ALE low as
RST is deactivated.
While the device is in ONCE Mode, the Port 0 pins go into
a float state, and the other port pins and ALE and
PSEN
are weakly pulled high. The oscillator circuit remains
active.While the deviceis inthismode, anemulatoror test
CPU can be used to drive the circuit. Normal operation is
restored when a normal reset is applied.
11.3.4R
EDUCED EMI MODE
The ALE-Off bit, AO (AUXR.0) can be set to 0 disable the
ALE output. It will automatically become active when
required for external memoryaccesses and resume to the
OFF state after completing the external memory access.
Table 8 Power Control Register (address 87H)
76543210
SMOD1SMOD0POFWLEGF1GF0PDIDL
Table 9 Description of PCON bits
If logic 1s are written to PD and IDL at the same time, PD takes precedence. The reset value of PCON is (0XX00000).
BITSYMBOLDESCRIPTION
7SMOD1Double Baud rate. When set to logic 1 the baud rate is doubled when the serial port
SIO0 is being used in Modes 1, 2 and 3.
6SMOD0Double Baud rate. Selects SM0/FE for SCON.7 bit.
5POFPower Off flag.
4WLEWatchdog Load Enable. This flag must be set by software prior to loading T3
(Watchdog Timer). It is cleared when T3 is loaded.
3GF1General purpose flag bits.
2GF0
1PDPower-down mode select. Setting this bit activates Power-down mode. It can only be
set if the Watchdog timer enable bit ‘WDE’ is set to logic 0.
0IDLIdle mode select. Setting this bit activates the Idle mode.
2000 Jul 2623
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
12 CAN, CONTROLLER AREA NETWORK
Controller Area Network is the definition of a high
performance communication protocol for serial data
communication.TheCAN controller circuitry is designedto
provide a full implementation of the CAN-Protocol
according to the CAN Specification Version 2.0 B.
Microcontroller including this on-chip CAN controller are
used to build powerful local networks, both for general
industrial and automotive environments. The result is a
strongly reduced wiring harness and enhanced diagnostic
and supervisory capabilities.
TheP8xC591 includesthe same functionsknown from the
SJA1000 stand-alone CAN controller from Philips
Semiconductors with the following improvements:
• Enhanced receive interrupt
• Enhanced acceptance filter
– 8 filter for standard frame formats
– 4 filter for extended formats
– “change on the fly” feature.
12.1Features of the PeliCAN controller
12.1.1G
ENERAL CAN FEATURES
12.1.2P8
• Supports 11-bit identifier as well as 29-bit identifier
• Bit rates up to 1 Mbit/s
• Error Counters with read / write access
• Programmable Error Warning Limit
• Error Code Capture with detailed bit position
• Arbitration Lost Interrupt with detailed bit position
• Single Shot Transmission (no re-transmission)
• Listen Only Mode (no acknowledge, no active error
flags)
• Hot Plugging support (software driven bit rate detection)
• High Priority Acceptance Filters for Receive Interrupt
• Acceptance Filters with “change on the fly” feature
• Reception of “own” messages (Self Reception Request)
• Programmable CAN output driver configuration.
XC591 PELICAN FEATURES (ADDITIONAL TO
CAN 2.0B)
• CAN 2.0B protocol compatibility
• Multi-master architecture
• Bus access priority determined by the message
identifier (11 bit or 29 bit)
• Non destructive bit-wise arbitration
• Guaranteed latency time for high priority messages
• Programmable transfer rate (up to 1Mbit/s)
• Multicast and broadcast message facility
• Data length from 0 up to 8 bytes
• Powerful error handling capability
• Non-return-to-zero (NRZ) coding/decoding with
bit-stuffing
• Suitable for use in a wide range of networks including
SAE’s network classes A, B, C.
2000 Jul 2624
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
12.2PeliCAN structure
A 80C51 CPU Interface connects the PeliCAN to the internal bus of the P8xC591 microcontroller. Via five Special
Function Registers CANADR, CANDAT, CANMOD, CANSTA and CANCON the CPU has access to the PeliCAN. The
SFR will described later on.
handbook, full pagewidth
control
address/data
TRANSMIT
BUFFER
RECEIVE
FIFO
ACCEPTANCE
FILTER
INTERFACE
MANAGEMENT
LOGIC
PeliCAN Core BlockMESSAGE BUFFER
ERROR
MANAGEMENT
LOGIC
BIT
TIMING
LOGIC
BIT
STREAM
PROCESSOR
TRANSMIT
MANAGEMENT
LOGIC
MHI010
TXDC
TX
RXDC
RX
Fig.10 Block Diagram of the PeliCAN.
2000 Jul 2625
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
12.2.1INTERFACE MANAGEMENT LOGIC (IML)
The Interface Management Logic interprets commands
from the CPU, controls addressing of the CAN Registers
and provides interrupts and statusinformation tothe CPU.
Additionally it drivesthe universal interface of thePeliCAN.
12.2.2T
RANSMIT BUFFER (TXB)
The Transmit Buffer is an interface between the CPU and
the Bit Stream Processor (BSP) and is able to store a
complete CAN message which shouldbe transmittedover
the CAN network. The buffer is 13 bytes long, written by
the CPU and read out by the BSP or the CPU itself.
12.2.3R
ECEIVE BUFFER (RXB, RXFIFO)
The Receive Buffer is an interface between the
Acceptance Filter and the CPU and stores the received
and accepted messages from the CAN Bus line. The
Receive Buffer (RXB) represents a CPU-accessible
13-byte-windowof the ReceiveFIFO(RXFIFO), which has
a total length of 64 bytes. With the help of this FIFO the
CPU is able to process one message while other
messages are being received.
12.2.4A
CCEPTANCE FILTER (ACF)
12.2.7B
IT TIMING LOGIC (BTL)
The Bit Timing Logic monitors the serial CAN bus line and
handles the Bus line-related bit timing. It synchronizes to
the bit stream on the CAN Bus on a “recessive” to
“dominant” Bus line transition at the beginning of a
message (hard synchronization) and resynchronizes on
further transitions during the reception of a message (soft
synchronization). The BTL also provides programmable
time segments to compensate for the propagation delay
times and phase shifts (e.g., due to oscillator drifts) and to
define the sampling timeand thenumber of samples to be
taken within a bit time.
12.2.8T
RANSMIT MANAGEMENT LOGIC (TML)
The Transmit Management Logic provides the driver
signals for the push-pull CAN TX transistor stage.
Depending on the programmable output driver
configuration the external transistors are switched on or
off. Additionally a short circuit protection and the
asynchronous float on hardware reset is performed here.
The Acceptance Filter compares the received identifier
with the Acceptance Filter Table contents and decides
whether this message should be accepted or not. In case
of a positive acceptance test, the complete message is
stored in the RXFIFO. The ACF contains 4 independent
Acceptance Filter banks supporting extended and
standard CAN frames with “change on the fly” feature.
12.2.5B
IT STREAM PROCESSOR (BSP)
The Bit Stream Processor is a sequencer, controlling the
datastream between theTransmitBuffer,RXFIFO and the
CAN-Bus. It also performs the error detection, arbitration,
stuffing and error handling on the CAN bus.
12.2.6E
RROR MANAGEMENT LOGIC (EML)
The EML is responsible for the error confinement of the
transfer-layer modules. It gets error announcements from
the BSP and then informs the BSP and IML about error
statistics.
2000 Jul 2626
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
12.3Communication between PeliCAN controller
and CPU
A 80C51 CPU Interface connects the PeliCAN to the
internal bus of an 80C51microcontroller. SpecialFunction
Registers, allows a smart and fast access to the PeliCAN
registersand RAM area. Becauseofthe big address range
to be supported, an indirect pointer based addressing is
handbook, full pagewidth
80C51
CORE
read
write
data
address
INTERFACECAN CONTROLLER
CANADR
CANDAT
CANCON
CANSTA
CANMOD
included allowing a fast register access with address
autoincrement mode. This reduces the needed number of
Special Function Registers to an amount of 5.
• Five Special Function Registers (SFRs)
• Register address generation in auto-increment mode
• Access to the complete address range of the PeliCAN
SFRs
PeliCAN
Fig.11 CPU to CAN Interfacing.
12.3.1SPECIAL FUNCTION REGISTERS
Via the five Special Function Registers CANADR,
CANDAT, CANMOD, CANSTA and CANCON the CPU
has access to the PeliCAN Block. Note that CANCON and
CANSTA have different registers mapped depending on
the direction of the access.
2000 Jul 2627
MHI020
The PeliCAN registers may be accessed in two different
ways. The most important registers, which should support
softwarepolling orare controlling majorCAN functions are
accessible directly as separate SFRs. Other parts of the
PeliCAN Block are accessible using an indirect pointer
mechanism. In order to achieve a high data throughput
even if the indirect access is used, an address
auto-increment feature is included here.
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
Table 10 CAN Special Function Registers
SFRACCESS
CANADRRead/
Write
CANDATRead/
Write
CANMODRead/
Write
CANSTAReadStatusBSESTSRSTCSTBSDOSRBSC0
WriteInterrupt
CANCONReadInterruptBEIALIEPIWUIDOIEITIRIC3
WriteCommand---SRRCDORRBATTR
12.3.2CANADR
This read/write register defines the address of one of the
PeliCAN internal registers to be accessed via CANDAT. It
could be interpreted as a pointer to the PeliCAN.
The read andwrite access tothe PeliCAN Blockregisteris
performed using the CANDAT register.
Withthe implemented autoaddress increment modeafast
stack-like reading and writing of CAN controller internal
registers is provided. If the currently defined address
within CANADR is above or equal to 32 decimal, the
contentofCANADR is incremented automatically afterany
read or write access to CANDAT. For instance, loading a
message into the Transmit Buffer can be done by writing
the first Transmit Buffer Address (112 decimal) into
CANADR and then moving byte by byte of the message to
CANDAT. Incrementing CANADR beyond FFh resets
CANADR to 00h.
In case CANADR is below 32 decimal, there is no
automatic address incrementation performed. CANADR
keepsits valueeven if CANDATis accessed forreading or
writing. This is to allow polling of registers in the lower
address space of the PeliCAN controller.
12.3.3CANDAT R
CANDAT is implemented as a read/write register.
TheSpecial FunctionRegister CANDAT appearsas a port
to the CAN controller’s internal register (memory location)
being selected by CANADR. Reading or writing CANDAT
is effectively an access to that PeliCAN internal register,
which is selected by CANADR. CANDAT is implemented
as a read/write register.
Note that any access to this register automatically
increments CANADR if the current address within
CANADR is above or equal to 32 decimal.
12.3.4CANMOD
With a read or write access to CANMOD the Mode
Register of the PeliCAN is accessed directly. The Mode
register is located at address 00h within the PeliCAN
Block.
12.3.5CANSTA
The CANSTA SFR provides a direct access to the Status
Register of the PeliCAN as well as to the Interrupt Enable
Register, depending on the direction of the access.
Reading CANSTA is an access to the Status Register of
the PeliCAN (address 2). When writing to CANSTA the
Interrupt Enable Register is accessed (address 4).
12.3.6CANCON
The CANCON SFR provides a direct access to the
Interrupt Register of the PeliCAN as well as to the
Command register, depending on the direction of the
access.
When reading CANCON the Interrupt Register of the
PeliCAN is accessed (address 3), while writing to
CANCON means an access to the Command Register
(address 1).
ADDR
SFR
2000 Jul 2628
Philips SemiconductorsPreliminary Specification
Single-chip 8-bit microcontroller with CAN controllerP8xC591
12.4Register and Message Buffer description
12.4.1A
DDRESS LAYOUT
The PeliCAN internal registers appear to the host CPU as on-chip memory mapped peripheral registers. Because the
PeliCAN can operate in different modes (Operating / Reset, see also Mode Register), one have to distinguish between
different internal address definitions. Starting from CAN Address 128 the complete internal FIFO RAM is mapped to the
CPU Interface.
100Rx Data 2Rx Identifier 4 -Rx Data 2Rx Identifier 4Rx Data 2Rx Identifier 4
101Rx Data 3Rx Data 1-Rx Data 3Rx Data 1Rx Data 3Rx Data 1
102Rx Data 4Rx Data 2-Rx Data 4Rx Data 2Rx Data 4Rx Data 2
103Rx Data 5Rx Data 3-Rx Data 5Rx Data 3Rx Data 5Rx Data 3
104Rx Data 6Rx Data 4-Rx Data 6Rx Data 4Rx Data 6Rx Data 4
105Rx Data 7Rx Data 5-Rx Data 7Rx Data 5Rx Data 7Rx Data 5
106Rx Data 8Rx Data 6-Rx Data 8Rx Data 6Rx Data 8Rx Data 6
107(FIFO RAM)
108(FIFO RAM)