12.01.2013 Views

DATA SHEET - IEETA

DATA SHEET - IEETA

DATA SHEET - IEETA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DATA</strong> <strong>SHEET</strong><br />

Product specification<br />

Supersedes data of January 1995<br />

File under Integrated Circuits, IC18<br />

INTEGRATED CIRCUITS<br />

P8xC592<br />

8-bit microcontroller<br />

with on-chip CAN<br />

1996 Jun 27


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

CONTENTS<br />

1 FEATURES<br />

2 GENERAL DESCRIPTION<br />

3 ORDERING INFORMATION<br />

4 BLOCK DIAGRAM<br />

5 PINNING<br />

6 FUNCTIONAL DESCRIPTION<br />

7 MEMORY ORGANIZATION<br />

7.1 Program Memory<br />

7.2 Internal Data Memory<br />

7.3 External Data Memory<br />

8 I/O PORT STRUCTURE<br />

9 PULSE WIDTH MODULATED OUTPUTS<br />

(PWM)<br />

9.1 Prescaler frequency control register (PWMP)<br />

9.2 Pulse Width Register 0 (PWM0)<br />

9.3 Pulse Width Register 1 (PWM1)<br />

10 ANALOG-TO-DIGITAL CONVERTER (ADC)<br />

10.1 ADC Control register (ADCON)<br />

11 TIMERS/COUNTERS<br />

11.1 Timer 0 and Timer 1<br />

11.2 Timer T2 Capture and Compare Logic<br />

11.3 Watchdog Timer (T3)<br />

12 SERIAL I/O PORT: SIO0 (UART)<br />

13 SERIAL I/O PORT: SIO1 (CAN)<br />

13.1 On-chip CAN-controller<br />

13.2 CAN Features<br />

13.3 Interface between CPU and CAN<br />

13.4 Hardware blocks of the CAN-controller<br />

13.5 Control Segment and Message Buffer<br />

description<br />

13.6 CAN 2.0A Protocol description<br />

1996 Jun 27 2<br />

14 INTERRUPT SYSTEM<br />

14.1 Interrupt Enable and Priority Registers<br />

14.2 Interrupt Vectors<br />

14.3 Interrupt Priority<br />

15 POWER REDUCTION MODES<br />

15.1 Power Control Register (PCON)<br />

15.2 CAN Sleep Mode<br />

15.3 Idle Mode<br />

15.4 Power-down Mode<br />

16 OSCILLATOR CIRCUITRY<br />

17 RESET CIRCUITRY<br />

17.1 Power-on Reset<br />

18 INSTRUCTION SET<br />

18.1 Addressing Modes<br />

18.2 Instruction Set<br />

19 ABSOLUTE MAXIMUM RATINGS (note 1)<br />

20 DC CHARACTERISTICS<br />

21 AC CHARACTERISTICS<br />

22 CAN APPLICATION INFORMATION<br />

22.1 Latency time requirements<br />

22.2 Connecting a P8xC592 to a bus line<br />

(physical layer)<br />

23 PACKAGE OUTLINES<br />

24 SOLDERING<br />

24.1 Introduction<br />

24.2 Reflow soldering<br />

24.3 Wave soldering<br />

24.4 Repairing soldered joints<br />

25 DEFINITIONS<br />

26 LIFE SUPPORT APPLICATIONS


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

1 FEATURES<br />

• 80C51 central processing unit (CPU)<br />

• 16 kbytes on-chip ROM,<br />

externally expandible to 64 kbytes<br />

• 2 × 256 bytes on-chip RAM,<br />

externally expandible to 64 kbytes<br />

• Two standard 16-bit timers/counters<br />

• One additional 16-bit timer/counter coupled to four<br />

capture and three compare registers<br />

• 10-bit ADC with 8 multiplexed analog inputs<br />

• Two 8-bit resolution Pulse Width Modulated outputs<br />

• 15 interrupt sources with 2 priority levels<br />

(2 to 6 external interrupt sources possible)<br />

• Five 8-bit I/O ports, plus one 8-bit input port shared<br />

with analog inputs<br />

• CAN-controller (CAN = Controller Area Network)<br />

with DMA data transfer facility to internal RAM<br />

• 1 Mbit/s CAN-controller with bus failure<br />

management facility<br />

• 1 ⁄2AVDD reference voltage<br />

• Full-duplex UART compatible with the standard 80C51<br />

• On-chip Watchdog Timer (WDT)<br />

• 1.2 to 16 MHz clock frequency.<br />

2 GENERAL DESCRIPTION<br />

The P8xC592 is a single-chip 8-bit high-performance<br />

microcontroller with on-chip CAN-controller, derived from<br />

the 80C51 microcontroller family.<br />

3 ORDERING INFORMATION<br />

TYPE<br />

NUMBER<br />

1996 Jun 27 3<br />

It uses the powerful 80C51 instruction set.<br />

Figure 1 shows a block diagram of the P8xC592.<br />

The P8xC592 is manufactured in an advanced CMOS<br />

process, and is designed for use in automotive and<br />

general industrial applications. In addition to the 80C51<br />

standard features, the device provides a number of<br />

dedicated hardware functions for these applications.<br />

Two versions of the P8xC592 will be offered:<br />

• P80C592 (without ROM)<br />

• P83C592 (with ROM).<br />

Hereafter these versions will be referred to as P8xC592.<br />

The temperature range includes (max. fCLK = 16 MHz):<br />

• −40 to +85 °C version, for general applications<br />

• −40 to +125 °C version for automotive applications.<br />

The P8xC592 combines the functions of the P8xC552<br />

(microcontroller) and the PCA82C200 (Philips<br />

CAN-controller) with the following enhanced features:<br />

• 16 kbytes Program Memory<br />

• 2 × 256 bytes Data Memory<br />

• DMA between CAN Transmit/Receive Buffer and<br />

internal RAM.<br />

The main differences between P8xC592 and P8xC552<br />

are:<br />

• 16 kbytes programmable ROM (P8xC552 has 8 kbytes)<br />

• Additional 256 bytes RAM<br />

• A CAN-controller instead of the I2C-serial interface.<br />

PACKAGE TEMPERATURE<br />

NAME DESCRIPTION VERSION RANGE (°C)<br />

Without ROM<br />

P80C592FFA<br />

P80C592FHA<br />

With ROM<br />

PLCC68 plastic leaded chip carrier; 68 leads SOT188-2<br />

−40 to +85<br />

−40 to +125<br />

P83C592FFA<br />

P83C592FHA<br />

PLCC68 plastic leaded chip carrier; 68 leads SOT188-2<br />

−40 to +85<br />

−40 to +125<br />

FREQ.<br />

(MHz)<br />

1.2 to 16<br />

1.2 to 16


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

4 BLOCK DIAGRAM<br />

REF<br />

AV SS<br />

CRX1 CTX1<br />

CRX0 CTX0<br />

PWM0<br />

ADC0 to ADC7<br />

PWM1 STADC AV ref<br />

AV DD<br />

V SS<br />

V DD<br />

T0 T1 INT0 INT1<br />

(4) (4) (4) (4)<br />

(6)<br />

(2) (2)<br />

1/2AV<br />

DD<br />

XTAL1<br />

CV SS<br />

<strong>DATA</strong><br />

MEMORY<br />

AUXILIARY<br />

MEMORY<br />

PROGRAM<br />

MEMORY<br />

CAN<br />

ADC<br />

DUAL<br />

PWM<br />

CPU<br />

XTAL2<br />

256 x 8<br />

RAM<br />

256 x 8<br />

RAM<br />

16K x 8<br />

ROM<br />

(7)<br />

T0, T1<br />

TWO 16 - BIT<br />

TIMER/<br />

EVENT<br />

COUNTERS<br />

1996 Jun 27 4<br />

EA<br />

DMA - BUS<br />

80C51<br />

core<br />

excluding<br />

ROM/RAM<br />

PSEN<br />

INTERNAL BUS<br />

(4)<br />

WR<br />

P8xC592<br />

16<br />

(4)<br />

RD<br />

THREE<br />

16-BIT<br />

COMPARATORS<br />

WITH<br />

REGISTERS<br />

(1)<br />

T2<br />

16-BIT<br />

TIMER/<br />

EVENT<br />

COUNTER<br />

FOUR<br />

16-BIT<br />

CAPTURE<br />

LATCHES<br />

PARALLEL<br />

I/O PORTS<br />

&<br />

EXT. BUS<br />

AD0 to AD7<br />

T3<br />

WATCHDOG<br />

TIMER<br />

COMPARATOR<br />

OUTPUT<br />

SELECTION<br />

16<br />

8-BIT<br />

I/O<br />

PORTS<br />

SERIAL<br />

UART<br />

PORT<br />

(3)<br />

A8 to A15<br />

(4) (4) (2) (2) (2) (5)<br />

RST EW<br />

CMSR0 to CMSR5<br />

CMT0, CMT1<br />

RT2<br />

T2<br />

CT0I/INT2 to<br />

CT3I/INT5<br />

P4<br />

P5<br />

RXD<br />

TXD<br />

P3<br />

P2<br />

P1<br />

P0<br />

MGA146<br />

handbook, full pagewidth<br />

handbook, full pagewidth<br />

(1) Alternative function of Port 0.<br />

(2) Alternative function of Port 1.<br />

(3) Alternative function of Port 2.<br />

(4) Alternative function of Port 3.<br />

(5) Alternative function of Port 4.<br />

(6) Alternative function of Port 5.<br />

(7) Not present in P80C592.<br />

Fig.1 Block diagram.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

5 PINNING<br />

handbook, full pagewidth<br />

alternative function<br />

ADC0<br />

ADC1<br />

ADC2<br />

ADC3<br />

ADC4<br />

ADC5<br />

ADC6<br />

ADC7<br />

CMSR0<br />

CMSR1<br />

CMSR2<br />

CMSR3<br />

CMSR4<br />

CMSR5<br />

CMT0<br />

CMT1<br />

PORT 5<br />

PORT 4<br />

XTAL1<br />

XTAL2<br />

EA<br />

PSEN<br />

ALE<br />

PWM0<br />

PWM1<br />

CRX0<br />

CRX1<br />

REF<br />

AVSS AV DD<br />

AV<br />

ref+<br />

AV ref –<br />

STADC<br />

P8xC592<br />

MGA147 - 2<br />

Fig.2 Pin functions.<br />

1996 Jun 27 5<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

RST<br />

EW<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

CVSS VSS<br />

VDD<br />

PORT 0<br />

PORT 1<br />

PORT 2<br />

PORT 3<br />

alternative function<br />

AD0<br />

AD1<br />

AD2<br />

AD3<br />

AD4<br />

AD5<br />

AD6<br />

AD7<br />

CT0I/INT2<br />

CT1I/INT3<br />

CT2I/INT4<br />

CT3I/INT5<br />

T2<br />

RT2<br />

CTX0<br />

CTX1<br />

A8<br />

A9<br />

A10<br />

A11<br />

A12<br />

A13<br />

A14<br />

A15<br />

RXD/<strong>DATA</strong><br />

TXD/CLOCK<br />

INT0<br />

INT1<br />

T0<br />

T1<br />

WR<br />

RD<br />

LOW ORDER<br />

ADDRESS<br />

AND<br />

<strong>DATA</strong> BUS<br />

HIGH ORDER<br />

ADDRESS<br />

BUS


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

P4.3/CMSR3<br />

P4.4/CMSR4<br />

P4.5/CMSR5<br />

P4.6/CMT0<br />

P4.7/CMT1<br />

RST<br />

P1.0/CT0I/INT2<br />

P1.1/CT1I/INT3<br />

P1.2/CT2I/INT4<br />

P1.3/CT3I/INT5<br />

P1.4/T2<br />

P1.5/RT2<br />

CV SS<br />

P1.6/CTX0<br />

P1.7/CTX1<br />

P3.0/RXD<br />

P3.1/TXD<br />

10<br />

11<br />

12<br />

13<br />

14<br />

15<br />

16<br />

17<br />

18<br />

19<br />

20<br />

21<br />

22<br />

23<br />

24<br />

25<br />

26<br />

P4.2/CMSR2<br />

9<br />

27<br />

P3.2/INT0<br />

Fig.3 Pin configuration PLCC68/SOT188-2 version (P8xC592FFA; FHA;).<br />

1996 Jun 27 6<br />

P4.1/CMSR1<br />

8<br />

28<br />

P3.3/INT1<br />

P4.0/CMSR0<br />

7<br />

29<br />

P3.4/T0<br />

EW<br />

6<br />

30<br />

P3.5/T1<br />

PWM1<br />

5<br />

31<br />

P3.6/WR<br />

PWM0<br />

4<br />

32<br />

P3.7/RD<br />

STADC<br />

3<br />

33<br />

XTAL2<br />

V DD<br />

2<br />

34<br />

P5.0/ADC0<br />

1<br />

P8xC592<br />

XTAL1<br />

V<br />

SS<br />

35<br />

P5.1/ADC1<br />

68<br />

36<br />

P2.0/A08<br />

P5.2/ADC2<br />

67<br />

37<br />

P2.1/A09<br />

P5.3/ADC3<br />

66<br />

38<br />

P2.2/A10<br />

P5.4/ADC4<br />

65<br />

39<br />

P2.3/A11<br />

P5.5/ADC5<br />

64<br />

40<br />

P2.4/A12<br />

P5.6/ADC6<br />

63<br />

41<br />

P2.5/A13<br />

P5.7/ADC7<br />

62<br />

42<br />

P2.6/A14<br />

AV DD<br />

61<br />

43<br />

P2.7/A15<br />

60<br />

59<br />

58<br />

57<br />

56<br />

55<br />

54<br />

53<br />

52<br />

51<br />

50<br />

49<br />

48<br />

47<br />

46<br />

45<br />

44<br />

AV SS<br />

AV ref<br />

AV ref<br />

CRX0<br />

CRX1<br />

REF<br />

P0.0/AD00<br />

P0.1/AD01<br />

P0.2/AD02<br />

P0.3/AD03<br />

P0.4/AD04<br />

P0.5/AD05<br />

P0.6/AD06<br />

P0.7/AD07<br />

EA<br />

ALE<br />

PSEN<br />

MGA148 - 1


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 1 Pin description for single function pins (SOT188-2; see note 1)<br />

SYMBOL PIN DESCRIPTION<br />

VDD 2 Power supply, digital part (+5 V). For normal operation and power reduced modes.<br />

STADC 3 Start ADC operation. Input starting analog-to-digital conversion (note 2). This pin must not float.<br />

PWM0 4 Pulse width modulation output 0.<br />

PMW1 5 Pulse width modulation output 1.<br />

EW 6 Enable Watchdog Timer (WDT): enable for T3 Watchdog Timer and disable Power-down mode.<br />

This pin must not float.<br />

RST 15 Reset: input to reset the P8xC592 (note 3).<br />

CVSS 22 CAN ground potential for the CAN transmitter outputs.<br />

XTAL2 33 Crystal pin 2: output of the inverting amplifier that forms the oscillator.<br />

When an external clock oscillator is used this pin is left open-circuit.<br />

XTAL1 34 Crystal pin 1: input to the inverting amplifier that forms the oscillator, and input to the internal clock<br />

generator. Receives the external clock oscillator signal, when an external oscillator is used.<br />

VSS 35 Ground, digital part.<br />

PSEN 44 Program Store Enable: Read strobe to external Program Memory (active LOW).<br />

Drive: 8 × LSTTL inputs.<br />

ALE 45 Address Latch Enable: latches the Low-byte of the address during accesses to external memory<br />

(note 4). Drive: 8 × LSTTL inputs; handles CMOS inputs without an external pull-up.<br />

EA 46 External Access input. See note 5.<br />

REF 55 1 ⁄2AVDD reference voltage output respectively input (note 6).<br />

CRX1 56 Inputs from the CAN-bus line to the differential input comparator of the on-chip CAN-controller<br />

CRX0 57 (note 7).<br />

AVREF− 58 Low-end of ADC (analog-to-digital) conversion reference resistor.<br />

AVREF+ 59 High-end of ADC (analog-to-digital) conversion reference resistor (note 8).<br />

AVSS 60 Ground, analog part. For ADC, CAN receiver and reference voltage.<br />

AVDD 61 Power supply, analog part (+5 V). For ADC, CAN receiver and reference voltage.<br />

Notes<br />

1. To avoid a ‘latch up’ effect at power-on: VSS − 0.5 V < ‘voltage on any pin at any time’ < VDD + 0.5 V.<br />

2. Triggered by a rising edge. ADC operation can also be started by software.<br />

3. RST also provides a reset pulse as output when timer T3 overflows or after a CAN wake-up from Power-down.<br />

4. ALE is activated every six oscillator periods. During an external data memory access one ALE pulse is skipped.<br />

5. See Section 7.1, Table 3 for EA operation. For P83Cxxx microcontrollers specified with the option ‘ROM-code<br />

protection’, the EA pin is latched during reset and is ‘don't care’ after reset, regardless of whether the ROM-code<br />

protection is selected or not.<br />

1996 Jun 27 7


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

6. Pin 55, REF:<br />

a) Selection of input resp. output dependent of CAN Control Register bit 5 (CR.5; see Section 13.5.3 Table 32).<br />

b) If the internal reference is used, then REF should be connected to AVSS via a capacitor with a value of ≥10 nF.<br />

c) After an external reset (RST = HIGH) the internal 1 ⁄2AVDD source is activated and, REF is a reference output.<br />

d) If the CAN-controller is in the reset state, e.g. after an external reset, then the 1 ⁄2AVDD source is switched off<br />

during Power-down mode.<br />

7. CAN-bus line:<br />

a) CRX0 level > CRX1 level is interpreted as a logic 1 (recessive).<br />

b) CRX0 level < CRX1 level is interpreted as a logic 0 (dominant).<br />

8. The level of AVREF+ must be higher than that of AVREF−.<br />

Table 2 Pin description for pins with alternative functions (SOT188-2 and NO330; see note 1)<br />

SYMBOL<br />

DEFAULT ALTERNATIVE<br />

1996 Jun 27 8<br />

PIN DESCRIPTION<br />

Port 4<br />

P4.0 to P4.7 7 to 14 8-bit quasi-bidirectional I/O port.<br />

CMSR0 7 Compare and Set/Reset outputs for Timer T2.<br />

CMSR1 8<br />

CMSR2 9<br />

CMSR3 10<br />

CMSR4 11<br />

CMSR5 12<br />

CMT0 13 Compare and toggle outputs for Timer T2.<br />

CMT1 14<br />

Port 1<br />

P1.0 to P1.7 16 to 21, 23, 24 8-bit quasi-bidirectional I/O port.<br />

CT0I/INT2 16 Capture timer inputs for Timer T2,<br />

CT1I/INT3<br />

CT2I/INT4<br />

17<br />

18<br />

or<br />

External interrupt inputs.<br />

CT3I/INT5 19<br />

T2 20 T2 event input (rising edge triggered).<br />

RT2 21 T2 timer reset input (rising edge triggered).<br />

CTX0 23 CAN transmitter output 0 (note 2).<br />

CTX1 24 CAN transmitter output 1 (note 2).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

SYMBOL<br />

DEFAULT ALTERNATIVE<br />

Port 3<br />

P3.0 to P3.7 25 to 32 8-bit quasi-bidirectional I/O port.<br />

RXD 25 Serial Input Port.<br />

TXD 26 Serial Output Port.<br />

INT0 27 External interrupt inputs.<br />

INT1 28<br />

T0 29 Timer 0 external input.<br />

T1 30 Timer 1 external input.<br />

WR 31 External Data Memory Write strobe.<br />

RD 32 External Data Memory Read strobe.<br />

Port 2 (Sink/source: 1 × TTL = 4 × LSTTL inputs)<br />

P2.0 to P2.7 36 to 43 8-bit quasi-bidirectional I/O port.<br />

A08 to A15<br />

Port 0 (Sink/source: 8 × LSTTL inputs)<br />

High-order address byte for external memory.<br />

P0.7 to P0.0 47 to 54 8-bit open drain bidirectional I/O port.<br />

AD7 to AD0<br />

Port 5<br />

Multiplexed Low-order address and<br />

Data bus for external memory.<br />

P5.7 to P5.0 62 to 68, 1 8-bit input port.<br />

ADC7 to ADC0 8 input channels to ADC.<br />

Notes<br />

1. To avoid a ‘latch up’ effect at power-on: VSS − 0.5 V < ‘voltage on any pin at any time’ < VDD + 0.5 V.<br />

2. If the CAN-controller is in the reset state (e.g. after a power-up reset; CAN Control Register bit CR.0; see<br />

Section 13.5.3 Table 32), the CAN transmitter outputs are floating and the pins P1.6 and P1.7 can be used as<br />

open-drain port pins. After a power-up reset the port data is HIGH, leaving the pins P1.6 and P1.7 floating.<br />

1996 Jun 27 9<br />

PIN DESCRIPTION


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

6 FUNCTIONAL DESCRIPTION<br />

The P8xC592 functions will be described as shown in the<br />

following overview:<br />

• Memory organization<br />

• I/O Port structure<br />

• Pulse Width Modulated outputs<br />

• Analog-to-digital Converter<br />

• Timers/Counters<br />

• Serial I/O Ports<br />

• Interrupt system<br />

• Power reduction modes<br />

• Oscillator circuitry<br />

• Reset circuitry<br />

• Instruction Set.<br />

64K<br />

handbook, full pagewidth<br />

16383<br />

0<br />

16384<br />

INTERNAL<br />

(EA = 1)<br />

EXTERNAL<br />

EXTERNAL<br />

(EA = 0)<br />

PROGRAM MEMORY<br />

INDIRECT ONLY<br />

DIRECT AND<br />

INDIRECT<br />

1996 Jun 27 10<br />

255<br />

127<br />

0<br />

MAIN RAM<br />

7 MEMORY ORGANIZATION<br />

The Central Processing Unit (CPU) manipulates operands<br />

in three memory spaces (see Fig.4) as follows:<br />

• 16 kbytes internal resp. 64 kbytes external Program<br />

Memory<br />

• 512 bytes internal Data Memory MAIN- and AUXILIARY<br />

RAM<br />

• up to 64 kbytes external Data Memory<br />

(with 256 bytes residing in the internal AUXILIARY<br />

RAM).<br />

OVERLAPPED SPACE<br />

Fig.4 Memory map.<br />

SFRs<br />

INTERNAL <strong>DATA</strong> MEMORY<br />

AUXILIARY<br />

RAM<br />

MGA149<br />

64K<br />

256<br />

EXTERNAL<br />

<strong>DATA</strong> MEMORY


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

7.1 Program Memory<br />

The Program Memory of the P8xC592 consists of 16 kbytes ROM on-chip, externally expandible up to 64 kbytes.<br />

Table 3 Instruction fetch controlled by EA<br />

DURING RESET<br />

LATCHED TO:<br />

PIN EA (note 1)<br />

AFTER RESET<br />

Notes<br />

1. This implementation prevents reading of the internal program code by switching from external Program Memory<br />

during a MOVC instruction.<br />

2. By setting a security bit the internal Program Memory content is protected, which means it cannot be read out.<br />

If the security bit has been set to LOW there are no restrictions for the MOVC instruction.<br />

7.2 Internal Data Memory<br />

The internal Data Memory is physically built-up and accessible as shown in Table 4 (see Fig.5).<br />

Table 4 Internal Data Memory size and address mode<br />

Notes<br />

1. MAIN RAM can be addressed directly and indirectly as in the 80C51.<br />

2. AUXILIARY RAM (0 to 255):<br />

a) Is indirectly addressable in the same way as the external Data Memory with MOVX instructions.<br />

b) Access will not affect the ports P0, P2, P3.6 and P3.7 during internal program execution.<br />

3. SFRs = Special Function Registers.<br />

1996 Jun 27 11<br />

INSTRUCTIONS FETCHED FROM:<br />

ADDRESS<br />

LOCATION<br />

H − internal Program Memory (note 2) 0000H → 3FFFH<br />

H − external Program Memory 4000H → FFFFH<br />

L − 0000H → FFFFH<br />

− ‘don’t care’ − −<br />

INTERNAL<br />

<strong>DATA</strong> MEMORY<br />

MAIN RAM<br />

(note 1)<br />

AUXILIARY RAM<br />

(note 2)<br />

SIZE LOCATION<br />

ADDRESS MODE<br />

DIRECT INDIRECT<br />

POINTERS<br />

256 bytes 0 to 127 X X address pointers are R0 and R1 of the<br />

selected register bank<br />

128 to 255 − X<br />

256 bytes 0 to 255 − X address pointers are R0 and R1 of the<br />

selected register bank and the DPTR<br />

SFRs (note 3) 128 bytes 128 to 255 X − −


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

7.2.1 MAIN RAM<br />

Four 8-bit register banks occupy the lower RAM area,<br />

• BANK 0: location 0 to 7<br />

• BANK 1: location 8 to 15<br />

• BANK 2: location 16 to 23<br />

• BANK 4: location 24 to 31.<br />

Only one of these banks may be enabled at the same time.<br />

The next 16 bytes, locations 32 through 45, contains<br />

128 directly addressable bit locations.<br />

The stack can be located anywhere in the internal MAIN<br />

RAM address space. The stack depth is only limited by the<br />

internal RAM space available. All registers except the<br />

program counter and the four 8-bit register banks reside in<br />

the SFR address space.<br />

7.3 External Data Memory<br />

An access to external Data Memory locations higher than<br />

255 will be performed with the MOVX @DPTR instructions<br />

in the same way as in the 80C51 structure,<br />

i.e. with P0 and P2 as data/address bus and P3.6 and P3.7<br />

as Write and Read strobe signals.<br />

Note that these external Data Memory locations cannot be<br />

accessed with R0 or R1 as address pointer.<br />

1996 Jun 27 12<br />

7FH<br />

2FH<br />

2EH<br />

2DH<br />

2CH<br />

2BH<br />

2AH<br />

29H<br />

28H<br />

27H<br />

26H<br />

25H<br />

24H<br />

23H<br />

22H<br />

21H<br />

20H<br />

1FH<br />

18H<br />

17H<br />

10H<br />

0FH<br />

08H<br />

07H<br />

00H<br />

(MSB) (LSB)<br />

7F 7E 7D 7C 7B 7A 79 78<br />

77 76 75 74 73 72 71 70<br />

6F 6E 6D 6C 6B 6A 69 68<br />

67 66 65 64 63 62 61 60<br />

5F 5E 5D 5C 5B 5A 59 58<br />

57 56 55 54 53 52 51 50<br />

4F 4E 4D 4C 4B 4A 49 48<br />

47 46 45 44 43 42 41 40<br />

3F 3E 3D 3C 3B 3A 39 38<br />

37 36 35 34 33 32 31 30<br />

2F 2E 2D 2C 2B 2A 29 28<br />

27 26 25 24 23 22 21 20<br />

1F 1E 1D 1C 1B 1A 19 18<br />

17 16 15 14 13 12 11 10<br />

0F 0E 0D 0C 0B 0A 09 08<br />

07 06 05 04 03 02 01 00<br />

BANK 3<br />

BANK 2<br />

BANK 1<br />

BANK 0<br />

MGA152<br />

Fig.5 Internal MAIN RAM bit addresses.<br />

127<br />

47<br />

46<br />

45<br />

44<br />

43<br />

42<br />

41<br />

40<br />

39<br />

38<br />

37<br />

36<br />

35<br />

34<br />

33<br />

32<br />

31<br />

24<br />

23<br />

16<br />

15<br />

8<br />

7<br />

0


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

REGISTER<br />

MNEMONIC<br />

T3<br />

PWMP<br />

PWM1<br />

PWM0<br />

BIT ADDRESS<br />

FF FE FD FC FB FA F9 F8<br />

F7 F6 F5 F4 F3 F2 F1 F0<br />

EF EE ED EC EB EA E9 E8<br />

E7 E6 E5 E4 E3 E2 E1 E0<br />

DF DE DD DC DB DA D9 D8<br />

D7 D6 D5 D4 D3 D2 D1 D0<br />

CF CE CD CC CB CA C9 C8<br />

C7 C6 C5 C4 C3 C2 C1 C0<br />

Fig.6 Special Function Register memory map (a).<br />

1996 Jun 27 13<br />

IP1<br />

B<br />

RTE<br />

STE<br />

# TMH2<br />

# TML2<br />

CTCON<br />

TM2CON<br />

IEN1<br />

ACC<br />

CANADR<br />

CANDAT<br />

CANCON<br />

CANSTA<br />

PSW<br />

# CTH3<br />

# CTH2<br />

# CTH1<br />

# CTH0<br />

CMH2<br />

CMH1<br />

CMH0<br />

TM2IR<br />

# ADCH<br />

ADCON<br />

# P5<br />

P4<br />

# denotes read-only registers<br />

DIRECT<br />

BYTE<br />

ADDRESS (HEX)<br />

FFH<br />

FEH<br />

FDH<br />

FCH<br />

F8H<br />

F0H<br />

EFH<br />

EEH<br />

EDH<br />

ECH<br />

EBH<br />

EAH<br />

E8H<br />

E0H<br />

DBH<br />

DAH<br />

D9H<br />

D8H<br />

D0H<br />

CFH<br />

CEH<br />

CDH<br />

CCH<br />

CBH<br />

CAH<br />

C9H<br />

C8H<br />

C6H<br />

C5H<br />

C4H<br />

C0H<br />

MGA150<br />

SFRs containing<br />

directly addressable<br />

bits


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

REGISTER<br />

MNEMONIC<br />

BIT ADDRESS<br />

BF BE BD BC BB BA B9 B8<br />

B7 B6 B5 B4 B3 B2 B1 B0<br />

AF AE AD AC AB AA A9 A8<br />

A7 A6 A5 A4 A3 A2 A1 A0<br />

9F 9E 9D 9C 9B 9A 99 98<br />

97 96 95 94 93 92 91 90<br />

8F 8E 8D 8C 8B 8A 89 88<br />

87 86 85 84 83 82 81 80<br />

Fig.7 Special Function Register memory map (b).<br />

1996 Jun 27 14<br />

IP0<br />

P3<br />

# CTL3<br />

# CTL2<br />

# CTL1<br />

# CTL0<br />

CML2<br />

CML1<br />

CML0<br />

IEN0<br />

P2<br />

S0BUF<br />

S0CON<br />

P1<br />

TH1<br />

TH0<br />

TL1<br />

TL0<br />

TMOD<br />

TCON<br />

PCON<br />

DPH<br />

DPL<br />

SP<br />

P0<br />

# denotes read-only registers<br />

DIRECT<br />

BYTE<br />

ADDRESS (HEX)<br />

B8H<br />

B0H<br />

AFH<br />

AEH<br />

ADH<br />

ACH<br />

ABH<br />

AAH<br />

A9H<br />

A8H<br />

A0H<br />

99H<br />

98H<br />

90H<br />

8DH<br />

8CH<br />

8BH<br />

8AH<br />

89H<br />

88H<br />

87H<br />

83H<br />

82H<br />

81H<br />

80H<br />

MGA151<br />

SFRs containing<br />

directly addressable<br />

bits


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

8 I/O PORT STRUCTURE<br />

The P8xC592 has six 8-bit parallel ports: Port 0 to Port 5. In addition to the standard 8-bit parallel ports, the I/O facilities<br />

also include a number of special I/O lines. The use of a Port 1, Port 3 or Port 4 pins as an alternative function is carried<br />

out automatically provided the associated SFR bit is set HIGH.<br />

Table 5 Default Port functions<br />

PORT TYPE FUNCTION REMARKS<br />

Port 0 I/O The same as in the 80C51 Except for the additional functions of P1.6 and<br />

Port 1 I/O<br />

P1.7.<br />

Port 2 I/O<br />

Port 3 I/O<br />

Port 4 I/O Parallel l/O port Parallel I/O function is identical to Port1, 2 and 3.<br />

Port 5 I Parallel input port with an input function only May be used as normal inputs if the ADC function<br />

is inoperative.<br />

Table 6 Alternative Port functions<br />

PORT TYPE FUNCTION REMARKS<br />

Port 0 I/O Multiplexed Low-order address and<br />

Data bus for external memory (AD7 to AD0)<br />

Port 1 I/O Capture timer inputs for Timer T2<br />

(CT0I to CT3I), or<br />

External interrupt request inputs<br />

(INT2 to INT5)<br />

1996 Jun 27 15<br />

Provides the multiplexed Low-order address and<br />

data bus used for expanding the P8xC592 with<br />

standard memories and peripherals.<br />

External interrupt request inputs, if capture<br />

information is not utilized.<br />

T2 event input (T2) External counter input.<br />

T2 timer reset input (RT2) External counter reset input.<br />

CAN transmitter output 0 (CTX0) CTX0 and CTX1 outputs of the CAN interface<br />

CAN transmitter output 1 (CTX1)<br />

(note 1).<br />

Port 2 I/O High-order address byte for external memory Port 2 provides the High-order address bus when<br />

(A08 to A15)<br />

the P8xC592 is expanded with external Program<br />

Memory and/or external Data Memory.<br />

Port 3 I/O Serial Input Port (RXD) Receiver input of serial port SIO0 (UART).<br />

Serial Output Port (TXD) Transmitter output of serial port SIO0 (UART).<br />

External interrupt (INT0)<br />

External interrupt (INT1)<br />

External interrupt request inputs.<br />

Timer 0 external input (T0)<br />

Timer 1 external input (T1)<br />

Counter inputs.<br />

External data memory Write strobe (WR) Control signal to write to external Data Memory.<br />

External data memory Read strobe (RD) Control signal to read from external Data Memory.<br />

Port 4 I/O Compare and Set/Reset outputs<br />

Can be configured to provide signals indicating a<br />

(CMSR0 to CMSR5)<br />

match between Timer counter T2 and its compare<br />

Compare and toggle outputs (CMT0, CMT1) registers.<br />

Port 5 I Input channels to ADC (ADC7 to ADC0) Port 5 may be used in conjunction with the ADC<br />

interface (note 2).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Notes to the alternative Port functions<br />

1. Port lines P1.6 and P1.7 may be selected as CTX0 and CTX1 outputs of the serial port SIO1 (CAN).<br />

After reset P1.6 and P1.7 may be used as normal I/O ports, if the CAN interface is not used.<br />

2. Unused analog inputs can be used as digital inputs. As Port 5 lines may be used as inputs to the ADC, these digital<br />

inputs have an inherent hysteresis to prevent the input logic from drawing too much current from the power lines<br />

when driven by analog signals.<br />

Channel-to-channel crosstalk should be taken into consideration when both digital and analog signals are<br />

simultaneously input to Port 5 (see Chapter 20).<br />

handbook, full pagewidth<br />

Q<br />

from port latch<br />

input data<br />

read port pin<br />

2 oscillator<br />

periods<br />

INPUT<br />

BUFFER<br />

strong pull-up<br />

Fig.8 I/O buffers in the P8xC592 (P1.0 to P1.5, Ports 2, 3, and 4).<br />

9 PULSE WIDTH MODULATED OUTPUTS (PWM)<br />

Two Pulse Width Modulated (PWM) output channels are<br />

available with the P8xC592. These channels provide<br />

output pulses of programmable length and interval.<br />

The repetition frequency is defined by an 8-bit prescaler<br />

PWMP which generates the clock for the counter.<br />

Both the prescaler and counter are common to both PWM<br />

channels. The 8-bit counter counts modulo 255 i.e. from<br />

0 to 254 inclusive. The value of the 8-bit counter is<br />

compared to the contents of two registers:<br />

PWM0 and PWM1.<br />

Provided the contents of either of these registers is greater<br />

than the counter value, the output of PWM0 or PWM1 is<br />

set LOW. If the contents of these register are equal to, or<br />

less than the counter value, the output will be HIGH. The<br />

pulse-width-ratio is therefore defined by the contents of the<br />

register PWM0 and PWM1. The pulse-width-ratio is in the<br />

range of 0 to 255 ⁄255 and may be programmed in<br />

increments of 1 ⁄255.<br />

1996 Jun 27 16<br />

p1<br />

n<br />

p2<br />

I1<br />

p3<br />

+5 V<br />

I/O PIN<br />

PORT<br />

1, 2, 3 or 4<br />

MGA153<br />

The repetition frequency fPWM, at the PWMn outputs is<br />

given by:<br />

f PWM<br />

f CLK<br />

=<br />

-------------------------------------------------------------<br />

2 × ( PWMP + 1)<br />

× 255<br />

When using an oscillator frequency of 16 MHz, for<br />

example, the above formula would give a repetition<br />

frequency range of 123 Hz to 31.4 kHz.<br />

By loading the PWM registers with either 00H or FFH, the<br />

PWM outputs can be retained at a constant HIGH or LOW<br />

level respectively. When loading FFH to the PWM<br />

registers, the 8-bit counter will never actually reach this<br />

(FFH) value.<br />

Both output pins PWMn are driven by push-pull drivers,<br />

and are not shared with any other function.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

9.1 Prescaler frequency control register (PWMP)<br />

Table 7 Prescaler frequency control register (address FEH)<br />

7 6 5 4 3 2 1 0<br />

PWMP.7 PWMP.6 PWMP.5 PWMP.4 PWMP.3 PWMP.2 PWMP.1 PWMP.0<br />

Table 8 Description of PWMP bits<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

PWMP.7<br />

to<br />

PWMP.0<br />

9.2 Pulse Width Register 0 (PWM0)<br />

Table 9 Pulse Width Register (address FCH)<br />

Table 10 Description of PWM0 bits<br />

9.3 Pulse Width Register 1 (PWM1)<br />

Table 11 Pulse width register (address FDH)<br />

Table 12 Description of PWM1 bits<br />

Prescaler division factor.<br />

The Prescaler division factor = (PWMP) + 1.<br />

7 6 5 4 3 2 1 0<br />

PWM0.7 PWM0.6 PWM0.5 PWM0.4 PWM0.3 PWM0.2 PWM0.1 PWM0.0<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

PWM0.7<br />

to<br />

PWM0.0<br />

Pulse width ratio.<br />

7 6 5 4 3 2 1 0<br />

PWM1.7 PWM1.6 PWM1.5 PWM1.4 PWM1.3 PWM1.2 PWM1.1 PWM1.0<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

PWM1.7<br />

to<br />

PWM1.0<br />

LOW/HIGH ratio of PWMn signals<br />

Pulse width ratio.<br />

LOW/HIGH ratio of PWMn signals<br />

1996 Jun 27 17<br />

( PWMn)<br />

= -----------------------------------------<br />

255– ( PWMn)<br />

( PWMn)<br />

=<br />

-----------------------------------------<br />

255– ( PWMn)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

I<br />

N<br />

T<br />

E<br />

R<br />

N<br />

A<br />

L<br />

B<br />

U<br />

S<br />

Fig.9 Functional diagram of Pulse Width Modulated outputs.<br />

1996 Jun 27 18<br />

f clk<br />

PWMP<br />

10 ANALOG-TO-DIGITAL CONVERTER (ADC)<br />

PRESCALER 8-BIT COUNTER<br />

The analog input circuitry consists of an 8-input analog<br />

multiplexer and an ADC with 10-bit resolution. The analog<br />

reference voltage and analog power supplies are<br />

connected via separate input pins. The conversion takes<br />

50 machine cycles i.e. 37.5 μs at 16 MHz oscillator<br />

frequency. The input voltage swing is from 0 V to AVDD.<br />

The ADC is controlled using the ADCON control register.<br />

Register bits ADCON.0 to ADCON.2 select the input<br />

channels of the analog multiplexer (see Fig.10).<br />

The completion of the 10-bit analog-to-digital conversion is<br />

flagged by ADCI in the ADCON register and the result is<br />

stored in the SFR ADCH (upper 8-bits) and the 2 lower bits<br />

(ADC.1 and ADC.0) in register ADCON.<br />

An analog-to-digital conversion in progress is unaffected<br />

by an external or software ADC start. The result of a<br />

completed conversion remains unchanged provided<br />

ADCI = HIGH. While ADCI or ADCS are HIGH, a new ADC<br />

START will be blocked and consequently lost. An<br />

analog-to-digital conversion already in progress is aborted<br />

when the Idle or Power-down mode is entered.<br />

1/2<br />

PWM0<br />

8-BIT COMPARATOR<br />

8-BIT COMPARATOR<br />

PWM1<br />

OUTPUT<br />

BUFFER<br />

OUTPUT<br />

BUFFER<br />

PWM0<br />

PWM1<br />

MGA154<br />

The result of a completed conversion (ADCI = HIGH)<br />

remains unaffected during the Idle mode.<br />

The LOW-to-HIGH transition of STADC is recognized at<br />

the end of a machine cycle and the conversion<br />

commences at the beginning of the next cycle. When a<br />

conversion is initiated by software, the conversion starts at<br />

the beginning of the machine cycle following the<br />

instruction that sets ADCS.<br />

The next two machine cycles are used to initiate the<br />

converter. At the end of this first cycle, the ADCS status<br />

flag is set to HIGH while the conversion is in progress.<br />

Sampling of the analog input commences at the end of the<br />

second cycle.<br />

During the next eight machine cycles, the voltage at the<br />

previously selected pin of Port 5 is sampled and this input<br />

voltage should be stable in order to obtain a useful sample.<br />

In any case, the input voltage slew rate must be less than<br />

10 V/ms (5 V conversion range) in order to prevent an<br />

undefined result. The conversion takes four machine<br />

cycles per bit.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

10.1 ADC Control register (ADCON)<br />

Table 13 ADC Control register (address C5H)<br />

7 6 5 4 3 2 1 0<br />

ADC.1 ADC.0 ADEX ADCI ADCS AADR2 AADR1 AADR0<br />

Table 14 Description of the ADCON bits<br />

BIT SYMBOL FUNCTION<br />

7 ADC.1 Bit 1 of ADC converted value.<br />

6 ADC.0 Bit 0 of ADC converted value.<br />

5 ADEX Enable external start of conversion by STADC. If ADEX is:<br />

LOW, then conversion cannot be started externally by STADC (only by software by setting ADCS)<br />

HIGH, then conversion can be started externally by a rising edge on STADC or externally.<br />

4 ADCI ADC interrupt flag. This flag is set when an analog-to-digital conversion result is ready to be read.<br />

If enabled, an interrupt is invoked. The flag must be cleared by software.<br />

It cannot be set by software (see Table 15).<br />

3 ADCS ADC start and status. Setting this bit starts an analog-to-digital conversion. It may be set by<br />

software or by the external signal STADC. The ADC logic ensures that this signal is HIGH while the<br />

ADC is busy. On completion of the conversion, ADCS is reset at the same time the interrupt flag<br />

ADCI is set. ADCS can not be reset by software (see Table 15).<br />

2 AADR2 Analog input select. This binary coded address selects one of the eight analog port pins of P5 to be<br />

1<br />

0<br />

AADR1<br />

AADR0<br />

input to the converter. It can only be changed when ADCI and ADCS are both LOW. AADR2 is the<br />

MSB. (e.g. 100B selects the analog input channel ADC4)<br />

Table 15 ADCI and ADCS operating modes<br />

If ADCI is cleared by software while ADCS is set at the same time a new analog-to-digital conversion with the same<br />

channel-number may be started. It is recommended to reset ADCI before ADCS is set.<br />

ADCI ADCS OPERATION<br />

0 0 ADC not busy, a conversion can be started.<br />

0 1 ADC busy, start of a new conversion is blocked.<br />

1 X (don’t care) Conversion completed; see note 1.<br />

Note<br />

1. Start of a new conversion requires ADCI = 0.<br />

1996 Jun 27 19


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

ADC0<br />

ADC1<br />

ADC2<br />

ADC3<br />

ADC4<br />

ADC5<br />

ADC6<br />

ADC7<br />

ANALOG INPUT<br />

MULTIPLEXER<br />

1996 Jun 27 20<br />

10-BIT A/D<br />

CONVERTER<br />

ADCON 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7<br />

INTERNAL BUS<br />

Fig.10 Functional diagram of analog input.<br />

ADCH<br />

STADC<br />

analog reference<br />

supply (analog part)<br />

ground (analog part)<br />

MGA155


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

11 TIMERS/COUNTERS<br />

The P8xC592 contains:<br />

• Three 16-bit timer/event counters:<br />

Timer 0, Timer 1 and Timer T2<br />

• One 8-bit timer, T3 (Watchdog WDT).<br />

11.1 Timer 0 and Timer 1<br />

Timer 0 and Timer 1 may be programmed to carry out the<br />

following functions:<br />

• Measure time intervals and pulse durations<br />

• Count events<br />

• Generate interrupt requests.<br />

Timer 0 and Timer 1 can be programmed independently to<br />

operate in 3 modes:<br />

Mode 0 8-bit timer or 8-bit counter each with divide-by-32<br />

prescaler.<br />

Mode 1 16-bit timer-interval or event counter.<br />

Mode 2 8-bit timer-interval or event counter with<br />

automatic reload upon overflow.<br />

Timer 0 can be programmed to operate in an additional<br />

mode as follows:<br />

Mode 3 one 8-bit time-interval or event counter and one<br />

8-bit timer-interval counter.<br />

When Timer 0 is in Mode 3, Timer 1 can be programmed<br />

to operate in Modes 0, 1 or 2 but cannot set an interrupt<br />

flag or generate an interrupt. However, the overflow from<br />

Timer 1 can be used to pulse the Serial Port baud-rate<br />

generator.<br />

The frequency handling range of these counters with a<br />

16 MHz crystal is as follows:<br />

• In the timer function, the timer is incremented at a<br />

frequency of 1.33 MHz ( 1 ⁄12 of the oscillator frequency)<br />

• 0 Hz to an upper limit of 0.66 MHz ( 1 ⁄24 of the oscillator<br />

frequency) when programmed for external inputs.<br />

Both internal and external inputs can be gated to the<br />

counter by a second external source for directly measuring<br />

pulse durations. When configured as a counter, the<br />

register is incremented on every falling edge on the<br />

corresponding input pin, T0 or T1.<br />

The earliest moment, when the incremented register value<br />

can be read is during the second machine cycle following<br />

the machine cycle within which the incrementing pulse<br />

occurred.The counters are started and stopped under<br />

software control. Each one sets its interrupt request flag<br />

1996 Jun 27 21<br />

when it overflows from all HIGHs to all LOWs<br />

(or automatic reload value), with the exception of Mode 3<br />

as previously described.<br />

11.2 Timer T2 Capture and Compare Logic<br />

Timer T2 is a 16-bit timer/counter which has capture and<br />

compare facilities (see Fig.11).<br />

The 16-bit timer/counter is clocked via a prescaler with a<br />

programmable division factor of 1, 2, 4 or 8. The input of<br />

the prescaler is clocked with 1 ⁄12 of the oscillator<br />

frequency, or by an external source connected to the T2<br />

input, or it is switched off. The maximum repetition rate of<br />

the external clock source is 1 ⁄12fCLK, twice that of Timer 0<br />

and Timer 1. The prescaler is incremented on a rising<br />

edge. It is cleared if its division factor or its input source is<br />

changed, or if the timer/counter is reset.<br />

T2 is readable ‘on the fly’, without any extra read latches;<br />

this means that software precautions have to be taken<br />

against misinterpretation at overflow from least to most<br />

significant byte while T2 is being read. T2 is not loadable<br />

and is reset by the RST signal or at the positive edge of the<br />

input signal RT2, if enabled. In the Idle mode the<br />

timer/counter and prescaler are reset and halted.<br />

T2 is connected to four 16-bit Capture Registers: CT0,<br />

CT1, CT2 and CT3. A rising or falling edge on the inputs<br />

CT0I, CT1I, CT2I or CT3I (alternative function of Port 1)<br />

results in loading the contents of T2 into the respective<br />

Capture Registers and an interrupt request.<br />

Using the Capture Register CTCON, these inputs may<br />

invoke capture and interrupt request on a positive edge, a<br />

negative edge or on both edges. If neither a positive nor a<br />

negative edge is selected for capture input, no capture or<br />

interrupt request can be generated by this input.<br />

The contents of the Compare Registers CM0, CM1 and<br />

CM2 are continually compared with the counter value of<br />

Timer T2. When a match occurs, an interrupt may be<br />

invoked. A match of CM0 sets the bits 0 to 5 of Port 4, a<br />

CM1 match resets these bits and a CM2 match toggles bits<br />

6 and 7 of Port 4, provided these functions are enabled by<br />

the STE/RTE registers. A match of CM0 and CM1 at the<br />

same time results in resetting bits 0 to 5 of Port 4. CM0,<br />

CM1 and CM2 are reset by the RST signal.<br />

Port 4 can be read and written by software without<br />

affecting the toggle, set and reset signals. At a byte<br />

overflow of the least significant byte, or at a 16-bit overflow<br />

of the timer/counter, an interrupt sharing the same<br />

interrupt vector is requested. Either one or both of these<br />

overflows can be programmed to request an interrupt.<br />

All interrupt flags must be reset by software.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

off<br />

f CLK<br />

T2<br />

RT2<br />

T2ER<br />

S<br />

S<br />

S<br />

S<br />

S<br />

S<br />

TG<br />

TG<br />

S<br />

R<br />

T<br />

STE<br />

TG<br />

external reset<br />

enable<br />

= set<br />

= reset<br />

= toggle<br />

= toggle status<br />

CT0I INT<br />

R<br />

R<br />

R<br />

R<br />

R<br />

R<br />

T<br />

T<br />

RTE<br />

CT0<br />

CTI0<br />

1/12 PRESCALER<br />

T2 COUNTER<br />

P4.0<br />

P4.1<br />

P4.2<br />

P4.3<br />

P4.4<br />

P4.5<br />

P4.6<br />

P4.7<br />

I/O port 4<br />

CT1I INT<br />

CT1<br />

CTI1<br />

T2 SFR address: TML2 = lower 8 bits<br />

TMH2 = higher 8 bits<br />

1996 Jun 27 22<br />

COMP<br />

CM0 (S)<br />

CT2I INT<br />

CT2<br />

INT<br />

CTI2<br />

Fig.11 Block diagram of Timer T2 configuration.<br />

8-bit overflow interrupt<br />

16-bit overflow interrupt<br />

COMP<br />

CM1 (R)<br />

INT<br />

CT3I INT<br />

CT3<br />

COMP<br />

CM2 (T)<br />

CTI3<br />

MGA156<br />

INT


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

11.2.1 COUNTER CONTROL REGISTER (TM2CON)<br />

Table 16 Counter Control register (address EAH)<br />

7 6 5 4 3 2 1 0<br />

T2IS1 T2IS0 T2ER T2B0 T2P1 T2P0 T2MS1 T2MS0<br />

Table 17 Description of the TM2CON bits<br />

BIT SYMBOL FUNCTION<br />

7 T2IS1 Timer 2 16-bit overflow interrupt select.<br />

6 T2IS0 Timer 2 byte overflow interrupt select.<br />

5 T2ER Timer 2 external reset enable.<br />

4 T2B0 Timer 2 byte overflow interrupt flag.<br />

3 T2P1 Timer 2 prescaler select (see Table 18).<br />

2 T2P0<br />

1 T2MS1 Timer 2 mode select (see Table 19).<br />

0 T2MS0<br />

Table 18 Timer 2 prescaler select<br />

T2P1 T2P0 T2 CLOCK<br />

0 0 Clock source<br />

0 1 1 ⁄2 Clock source<br />

1 0 1<br />

⁄4 Clock source<br />

1 1 1 ⁄8 Clock source<br />

11.2.2 CAPTURE CONTROL REGISTER (CTCON)<br />

Table 20 Capture Control register (address EBH)<br />

Table 21 Description of the CTCON bits<br />

1996 Jun 27 23<br />

Table 19 Timer 2 mode select<br />

T2MS1 T2MS0 MODE<br />

0 0 Timer T2 is halted<br />

0 1 T2 clock source = 1 ⁄12fCLK.<br />

1 0 Test mode; do not use<br />

1 1 T2 clock source = pin T2<br />

7 6 5 4 3 2 1 0<br />

CTN3 CTP3 CTN2 CTP2 CTN1 CTP1 CTN0 CTP0<br />

FUNCTION<br />

BIT SYMBOL<br />

CAPTURE INTERRUPT ON<br />

7 CTN3 CT3I negative edge<br />

6 CTP3 CT3I positive edge<br />

5 CTN2 CT2I negative edge<br />

4 CTP2 CT2I positive edge<br />

3 CTN1 CT1I negative edge<br />

2 CTP1 CT1I positive edge<br />

1 CTN0 CT0I negative edge<br />

0 CTP0 CT0I positive edge


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

11.2.3 TIMER INTERRUPT FLAG REGISTER (TM2IR)<br />

Table 22 Timer Interrupt Flag register (address C8H)<br />

7 6 5 4 3 2 1 0<br />

T2OV CMI2 CMI1 CMI0 CTI3 CTI2 CTI1 CTI0<br />

Table 23 Description of the TM2IR bits (see notes 1 and 2)<br />

BIT SYMBOL FUNCTION<br />

7 T2OV T2: 16-bit overflow interrupt flag<br />

6 CMI2 CM2: interrupt flag<br />

5 CMI1 CM1: interrupt flag<br />

4 CMI0 CM0: interrupt flag<br />

3 CTI3 CT3: interrupt flag<br />

2 CTI2 CT2: interrupt flag<br />

1 CTI1 CT1: interrupt flag<br />

0 CTI0 CT0: interrupt flag<br />

Notes<br />

1. Interrupt Enable IEN1 is used to enable/disable Timer 2 interrupts (see Section 14.1.2).<br />

2. Interrupt Priority Register IP1 is used to determine the Timer 2 interrupt priority (see Section 14.1.4).<br />

11.2.4 SET ENABLE REGISTER (STE)<br />

Table 24 Set Enable register (address EEH)<br />

7 6 5 4 3 2 1 0<br />

TG47 TG46 SP45 SP44 SP43 SP42 SP41 SP40<br />

Table 25 Description of the STE bits (see notes 1 and 2)<br />

BIT SYMBOL FUNCTION<br />

7 TG47 if HIGH then P4.7 is reset on the next toggle, if LOW P4.7 is set on the next toggle<br />

6 TG46 if HIGH then P4.6 is reset on the next toggle, if LOW P4.6 is set on the next toggle<br />

5 SP45 if HIGH then P4.5 is set on a match of CM0 and T2<br />

4 SP44 if HIGH then P4.4 is set on a match of CM0 and T2<br />

3 SP43 if HIGH then P4.3 is set on a match of CM0 and T2<br />

2 SP42 if HIGH then P4.2 is set on a match of CM0 and T2<br />

1 SP41 if HIGH then P4.1 is set on a match of CM0 and T2<br />

0 SP40 if HIGH then P4.0 is set on a match of CM0 and T2<br />

Notes<br />

1. If STE.n is LOW then P4.n is not affected by a match of CM0 and T2 (n = 0, 1, 2, 3, 4, 5).<br />

2. STE.6 and STE.7 are read only.<br />

1996 Jun 27 24


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

11.2.5 RESET/TOGGLE ENABLE REGISTER (RTE)<br />

Table 26 Reset/Toggle Enable register (address EFH)<br />

7 6 5 4 3 2 1 0<br />

TP47 TP46 RP45 RP44 RP43 RP42 RP41 RP40<br />

Table 27 Description of the RTE bits (note 1)<br />

BIT SYMBOL FUNCTION<br />

7 TP47 if HIGH then P4.7 toggles on a match of CM2 and T2<br />

6 TP46 if HIGH then P4.6 toggles on a match of CM2 and T2<br />

5 RP45 if HIGH then P4.5 is reset on a match of CM1 and T2<br />

4 RP44 if HIGH then P4.4 is reset on a match of CM1 and T2<br />

3 RP43 if HIGH then P4.3 is reset on a match of CM1 and T2<br />

2 RP42 if HIGH then P4.2 is reset on a match of CM1 and T2<br />

1 RP41 if HIGH then P4.1 is reset on a match of CM1 and T2<br />

0 RP40 if HIGH then P4.0 is reset on a match of CM1 and T2<br />

Note<br />

1. If RTE.n is LOW then P4.n is not affected by a match of CM1 and T2 or CM2 and T2.<br />

For more information, refer to the 8051-based “8-bit Microcontrollers Data Handbook IC20”.<br />

1996 Jun 27 25


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

11.3 Watchdog Timer (T3)<br />

In addition to Timer T2 and the standard timers (Timer 0<br />

and Timer 1), a Watchdog Timer (WDT) comprising an<br />

11-bit prescaler and an 8-bit timer (T3) is also provided<br />

(see Fig.12).<br />

The timer T3 is incremented every 1.5 ms, derived from<br />

the oscillator frequency of 16 MHz by the following<br />

formula:<br />

f timer<br />

=<br />

f CLK<br />

-------------------------<br />

12 × 2048<br />

When a timer T3 overflow occurs, the microcontroller is<br />

reset and a reset-output-pulse is generated at pin RST.<br />

This short output pulse (3 machine cycles) may be<br />

suppressed if the RST pin is connected to a capacitor.<br />

To prevent a system reset (by an overflow of the WDT), the<br />

user program has to reload T3 within periods that are<br />

shorter than the programmed Watchdog time interval.<br />

If the processor suffers a hardware/software malfunction,<br />

the software will fail to reload the timer. This failure will<br />

produce a reset upon overflow thus preventing the<br />

processor running out of control.<br />

handbook, full pagewidth<br />

1/12 f CLK<br />

EW<br />

write<br />

T3<br />

PRESCALER<br />

11-BIT<br />

CLEAR<br />

Fig.12 Functional diagram of T3 Watchdog Timer.<br />

1996 Jun 27 26<br />

The Watchdog Timer can only be reloaded if the condition<br />

flag WLE = PCON.4 has been previously set by software.<br />

At the moment the counter is loaded the condition flag is<br />

automatically cleared.<br />

The timer interval between the timer's reloading and the<br />

occurrence of a reset depends on the reloaded value. For<br />

example, this may range from 1.5 ms to 0.375 s when<br />

using an oscillator frequency of 16 MHz.<br />

In the Idle state the Watchdog Timer and reset circuitry<br />

remain active.<br />

The Watchdog Timer (WDT) is controlled by the Enable<br />

Watchdog pin (EW) (see Table 28).<br />

TIMER T3 (8-BIT)<br />

LOAD<br />

Table 28 EW controlling WDT and Power-down mode<br />

PIN EW WDT POWER-DOWN MODE<br />

LOW enabled disabled<br />

HIGH disabled enabled<br />

INTERNAL BUS<br />

LOADEN<br />

INTERNAL BUS<br />

internal<br />

reset<br />

overflow<br />

CLEAR<br />

WLE PD<br />

LOADEN<br />

PCON.4 PCON.1<br />

V DD<br />

P<br />

R RST<br />

RST<br />

MGA157


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

12 SERIAL I/O PORT: SIO0 (UART)<br />

The Serial Port SIO0 is a full duplex (UART) serial I/O port<br />

i.e. it can transmit and receive simultaneously. This Serial<br />

Port is also receive-buffered. It can commence reception<br />

of a second byte before the previously received byte has<br />

been read from the receive register. However, if the first<br />

byte has still not been read by the time reception of the<br />

second byte is complete, one of these (first or second)<br />

bytes will be lost. The SIO0 receive and transmit registers<br />

are both accessed via the S0BUF SFR. Writing to S0BUF<br />

loads the transmit register, and reading S0BUF accesses<br />

to a physically separate receive register. SIO0 can operate<br />

in 4 modes:<br />

Mode 0 Serial data is transmitted and received through<br />

RXD. TXD outputs the shift clock. 8 data bits are<br />

transmitted/received (LSB first). The baud rate is<br />

fixed at 1 ⁄12 of the oscillator frequency.<br />

Mode 1 10 bits are transmitted via TXD or received<br />

through RXD: a start bit (0), 8 data bits (LSB first),<br />

and a stop bit (1). On receive, the stop bit is put<br />

into RB8 of the S0CON SFR. The baud rate is<br />

variable.<br />

Mode 2 11 bits are transmitted through TXD or received<br />

through RXD: a start bit (0), 8 data bits (LSB first),<br />

a programmable 9 th data bit, and a stop bit (1).<br />

On transmit, the 9 th data bit (TB8 in S0CON) can<br />

be assigned the value of 0 or 1. With nominal<br />

software, TB8 can be the parity bit (P in PSW).<br />

During a receive, the 9 th data bit is stored in RB8<br />

(S0CON), and the stop bit is ignored. The baud<br />

rate is programmable to either 1 ⁄32 or 1 ⁄64 of the<br />

oscillator frequency.<br />

Mode 3 11 bits are transmitted through TXD or received<br />

through RXD: a start bit (0), 8 data bits (LSB first),<br />

a programmable 9 th data bit, and a stop bit (1).<br />

Mode 3 is the same as Mode 2 except for the<br />

baud rate which is variable in Mode 3.<br />

In all four modes, transmission is initiated by any<br />

instruction that writes to the S0BUF SFR.<br />

Reception is initiated in Mode 0 when RI = 0 and REN = 1.<br />

In the other three modes, reception is initiated by the<br />

incoming start bit provided that REN = 1.<br />

Modes 2 and 3 are provided for multiprocessor<br />

communications. In these modes, 9 data bits are received<br />

with the 9 th bit written to RB8 (S0CON). The 9 th bit is<br />

followed by the stop bit. The port can be programmed so<br />

that with receiving the stop bit, the Serial Port interrupt will<br />

be activated if, and only if RB8 = 1.<br />

1996 Jun 27 27<br />

This feature is enabled by setting bit SM2 in S0CON. This<br />

feature may be used in multiprocessor systems.<br />

For more information about how to use the UART in<br />

combination with the registers S0CON, PCON, IE, SBUF<br />

and the Timer register, refer to the 8051-based<br />

“8-bit Microcontrollers Data Handbook IC20”.<br />

13 SERIAL I/O PORT: SIO1 (CAN)<br />

SIO1 (CAN) provides the CAN (Controller Area Network)<br />

serial-bus data communication interface. SIO1 (CAN)<br />

replaces the SIO1 (I 2 C) serial interface as provided in the<br />

microcontroller derivative P8xC552.<br />

13.1 On-chip CAN-controller<br />

CAN is the definition of a high performance<br />

communication protocol for serial data communication.<br />

The P8xC592 on-chip CAN-controller is a full<br />

implementation of the CAN 2.0A protocol. With the<br />

P8xC592 powerful local networks can be built, both for<br />

automotive and general industrial environments. This<br />

results in a much reduced wiring harness and enhanced<br />

diagnostic and supervisory capabilities.<br />

13.2 CAN Features<br />

• Multi-master architecture<br />

• Bus access priority determined by the message<br />

identifier<br />

• 2032 message identifier (211 standard frame CAN 2.0A)<br />

• Guaranteed latency time for high priority messages<br />

• Powerful error handling capability<br />

• Data length from 0 up to 8 bytes<br />

• Multicast and broadcast message facility<br />

• Non destructive bit-wise arbitration<br />

• Non-return-to-zero (NRZ) coding/decoding with<br />

bit-stuffing<br />

• Programmable transfer rate (up to 1 Mbit/s)<br />

• Programmable output driver configuration<br />

• Suitable for use in a wide range of networks including<br />

the SAE's network classes A, B and C<br />

• DMA providing high-speed on-chip data exchange<br />

• Bus failure management facility<br />

• 1 ⁄2AVDD reference voltage.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.3 Interface between CPU and CAN<br />

The internal interface between the P8xC592's CPU and<br />

on-chip CAN-controller is achieved via the following four<br />

SFRs (see Fig.13):<br />

• CANADR, to point to a register of the CAN-controller<br />

• CANDAT, to read or write data<br />

• CANCON, to read interrupt flags and to write commands<br />

• CANSTA, to read status information and to write DMA<br />

pointer.<br />

Additionally, the DMA-logic allows a high-speed data<br />

exchange between the CAN-controller and the CPU's<br />

on-chip MAIN RAM. For more information, see<br />

Section 13.5.15 “Handling of the CPU-CAN interface”.<br />

13.4 Hardware blocks of the CAN-controller<br />

The P8xC592 CAN-controller contains all necessary<br />

hardware for high performance serial network<br />

communications (see Fig.14 and Table 29).<br />

handbook, full pagewidth<br />

CPU<br />

MAIN<br />

RAM<br />

internal<br />

bus 4 special function<br />

registers<br />

DMA bus<br />

1996 Jun 27 28<br />

It controls the communication flow through the area<br />

network using the CAN-protocol. The CAN-controller<br />

meets the following automotive requirements:<br />

• Short message length<br />

• Bus access priority, determined by the message<br />

identifier<br />

• Powerful error handling capability<br />

• Configuration flexibility to allow area network expansion<br />

• Guaranteed latency time for urgent messages;<br />

– The latency time defines the period between the<br />

initiation (Transmission Request) and the start of the<br />

transmission on the bus. The latency time strongly<br />

depends on a large variety of bus-related conditions.<br />

In the case of a message being transmitted on the<br />

bus and one distortion, the latency time can be up to<br />

149 bit times (worst case). For more information see<br />

Chapter 22 “CAN application information”.<br />

DBH<br />

CANADR<br />

DAH<br />

CANDAT<br />

D9H<br />

CANCON<br />

CANSTA<br />

D8H<br />

DMA<br />

LOGIC<br />

Fig.13 Interface between CPU and CAN-controller.<br />

ADDRESS<br />

<strong>DATA</strong><br />

CAN<br />

CONTROLLER<br />

MGA158


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

address<br />

data<br />

INTERFACE<br />

MANAGEMENT<br />

LOGIC<br />

TRANSMIT<br />

BUFFER<br />

ON - CHIP<br />

RECEIVE<br />

BUFFER 0<br />

RECEIVE<br />

BUFFER 1<br />

Fig.14 Block diagram of the P8xC592 on-chip CAN-controller.<br />

Table 29 Hardware blocks of the CAN-controller (see Fig.14)<br />

NAME BLOCK DESCRIPTION<br />

Interface Management Logic IML Interprets commands from the CPU, allocates the message buffers<br />

(TBF, RBF0 and RBF1) and provides interrupts and status information to the<br />

microcontroller.<br />

Transmit Buffer TBF 10 bytes memory into which the CPU writes messages which are to be<br />

transmitted over the CAN network.<br />

Receive Buffers (0 and 1) RBF0 RBF0 and RBF1 are each 10 bytes memories which are alternatively used to<br />

RBF1 store messages received from the CAN network.<br />

The CPU can process one message while another is being received.<br />

Bit Stream Processor BSP Is a sequencer, controlling the data stream between the Transmit Buffer,<br />

Receive Buffers (parallel data) and the CAN-bus (serial data).<br />

Bit Timing Logic BTL Synchronizes the CAN-controller to the bitstream on the CAN-bus.<br />

Transceiver Control Logic TCL Controls the output driver.<br />

Error Management Logic EML Performs the error confinement according to the CAN-protocol.<br />

1996 Jun 27 29<br />

BIT TIMING<br />

LOGIC<br />

TRANSCEIVER<br />

LOGIC<br />

CAN<br />

CONTROLLER<br />

ERROR<br />

MANAGEMENT<br />

LOGIC<br />

BIT STREAM<br />

PROCESSOR<br />

2<br />

2<br />

MGA159<br />

CRX0<br />

and<br />

CRX1<br />

CTX0<br />

and<br />

CTX1


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5 Control Segment and Message Buffer<br />

description<br />

The CAN-controller appears to the CPU as a<br />

memory-mapped peripheral, guaranteeing the<br />

independent operation of both parts.<br />

13.5.1 ADDRESS ALLOCATION<br />

The address area of the CAN-controller consists of the<br />

Control Segment and the message buffers. The Control<br />

Segment is programmed during an initialization down-load<br />

in order to configure communication parameters (e.g. bit<br />

timing). The communication over the CAN-bus is also<br />

controlled via this segment by the CPU. A message which<br />

is to be transmitted, must be written to the Transmit Buffer.<br />

ADDRESS<br />

handbook, 00H full pagewidth 0 CONTROL<br />

01H 1 COMMAND<br />

02H 2 STATUS<br />

03H 3 INTERRUPT<br />

04H 4 ACCEPTANCE CODE<br />

05H 5 ACCEPTANCE MASK<br />

06H 6 BUS TIMING 0<br />

07H 7 BUS TIMING 1<br />

08H 8 OUTPUT CONTROL<br />

09H 9 TEST<br />

0AH 10 IDENTIFIER,<br />

0BH 11 RTR BIT, <strong>DATA</strong> LENGTH CODE<br />

0CH 12 BYTE 1<br />

0DH 13 BYTE 2<br />

0EH 14 BYTE 3<br />

0FH 15 BYTE 4<br />

10H 16 BYTE 5<br />

11H 17 BYTE 6<br />

12H 18 BYTE 7<br />

13H 19 BYTE 8<br />

14H 20 IDENTIFIER,<br />

15H 21 RTR BIT, <strong>DATA</strong> LENGTH CODE<br />

16H 22 BYTE 1<br />

17H 23 BYTE 2<br />

18H 24 BYTE 3<br />

19H 25 BYTE 4<br />

1AH 26 BYTE 5<br />

1BH 27 BYTE 6<br />

1CH 28 BYTE 7<br />

1DH 29 BYTE 8<br />

control segment<br />

descriptor<br />

data field<br />

1996 Jun 27 30<br />

After a successful reception the CPU may read the<br />

message from the Receive Buffer and then release it for<br />

further use.<br />

13.5.2 CONTROL SEGMENT LAYOUT<br />

The exchange of status, control and command signals<br />

between the CPU and the CAN-controller is performed in<br />

the control segment. The layout of this segment is shown<br />

in Fig.15. After an initial down-load, the contents of the<br />

registers Acceptance Code, Acceptance Mask,<br />

Bus Timing 0, Bus Timing 1 and Output Control should not<br />

be changed. These registers may only be accessed when<br />

the Reset Request bit in the Control Register is set HIGH<br />

(see Tables 30, 31 and 32).<br />

transmit buffer<br />

IDENTIFIER,<br />

RTR BIT, <strong>DATA</strong> LENGTH CODE<br />

BYTE 1<br />

BYTE 2<br />

BYTE 3<br />

BYTE 4<br />

BYTE 5<br />

BYTE 6<br />

BYTE 7<br />

BYTE 8<br />

Fig.15 CAN-controller internal address allocation.<br />

descriptor<br />

data field<br />

MGA160 - 1<br />

receive buffer 0 or 1


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 30 CPU/CAN Register map<br />

BIT<br />

7 6 5 4 3 2 1 0<br />

Control Segment<br />

ADDRESS 0: CONTROL REGISTER<br />

TM S RA OIE EIE TIE RIE RR<br />

ADDRESS 1: COMMAND REGISTER<br />

RX0A RX1A WUM SLP COS RRB AT TR<br />

ADDRESS 2: STATUS REGISTER<br />

BS ES TS RS TCS TBS DO RBS<br />

ADDRESS 3: INTERRUPT REGISTER<br />

Reserved Reserved Reserved WUI OI EI TI RI<br />

ADDRESS 4: ACCEPTANCE CODE REGISTER<br />

AC.7 AC.6 AC.5 AC.4 AC.3 AC.2 AC.1 AC.0<br />

ADDRESS 5: ACCEPTANCE MASK REGISTER<br />

AM.7 AM.6 AM.5 AM.4 AM.3 AM.2 AM.1 AM.0<br />

ADDRESS 6: BUS TIMING REGISTER 0<br />

SJW.1 SJW.0 BRP.5 BRP.4 BRP.3 BRP.2 BRP.1 BRP.0<br />

ADDRESS 7: BUS TIMING REGISTER 1<br />

SAM TSEG2.2 TSEG2.1 TESG2.0 TSEG1.3 TSEG1.2 TSEG1.1 TSEG1.0<br />

ADDRESS 8: OUTPUT CONTROL REGISTER<br />

OCTP1 OCTN1 OCPOL1 OCTP0 OCTN0 OCPOL0 OCMODE1 OCMODE0<br />

ADDRESS 9: TEST REGISTER (note 1)<br />

Reserved Reserved Map Internal Connect RX Connect TX Access Normal Float Output<br />

Register Buffer 0 Buffer CPU Internal Bus RAM Driver<br />

CPU<br />

Connect<br />

1996 Jun 27 31


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Transmit Buffer<br />

ADDRESS 10: IDENTIFIER<br />

ID.10 ID.9 ID.8 ID.7 ID.6 ID.5 ID.4 ID.3<br />

ADDRESS 11: RTR, <strong>DATA</strong> LENGTH CODE<br />

ID.2 ID.1 ID.0 RTR DLC.3 DLC.2 DLC.1 DLC.0<br />

ADDRESS 12 TO 19: BYTES 1 TO 8<br />

Data Data Data Data Data Data Data Data<br />

Receive Buffer 0 and 1<br />

ADDRESS 20: IDENTIFIER<br />

ID.10 ID.9 ID.8 ID.7 ID.6 ID.5 ID.4 ID.3<br />

ADDRESS 21: RTR, <strong>DATA</strong> LENGTH CODE<br />

ID.2 ID.1 ID.0 RTR DLC.3 DLC.2 DLC.1 DLC.0<br />

ADDRESS 22 TO 29: BYTES 1 TO 8<br />

Data Data Data Data Data Data Data Data<br />

Note<br />

1. The Test Register is used for production testing only.<br />

13.5.3 CONTROL REGISTER (CR)<br />

The contents of the Control Register are used to change the behaviour of the CAN-controller. Control bits may be set or<br />

reset by the CPU which uses the Control Register as a read/write memory.<br />

Table 31 Control Register (address 0)<br />

7 6 5 4 3 2 1 0<br />

TM S RA OIE EIE TIE RIE RR<br />

Table 32 Description of the CR bits<br />

BIT<br />

7 6 5 4 3 2 1 0<br />

BIT SYMBOL FUNCTION<br />

7 TM Test Mode (note 1).If the value of TM is:<br />

HIGH (enabled), then the CAN-controller enters Test Mode (normal operations<br />

impossible).<br />

LOW (disabled), then the CAN-controller is in normal operating mode.<br />

6 S Sync (note 2). If the value of S is:<br />

HIGH (2 edges), then bus-line transitions from recessive-to-dominant and vice-versa<br />

are used for resynchronization (see Sections 13.5.20 and 13.6).<br />

LOW (1 edge), then the only transitions from recessive-to-dominant are used for<br />

resynchronization.<br />

1996 Jun 27 32


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

BIT SYMBOL FUNCTION<br />

5 RA Reference Active (notes 2). If the value of RA is:<br />

Notes to the description of the CR bits<br />

1. The test mode is intended for factory testing and not for customer use.<br />

2. A modification of the bits Reference Active and Sync is only possible with Reset Request = HIGH (present). It is<br />

allowed to set these bits while Reset Request is changed from a HIGH level to a LOW level. After an external reset<br />

(pin RST = HIGH) the Reference Active bit is set HIGH (output), the Sync bit is undefined.<br />

3. During an external reset (RST = HIGH) or when the Bus Status bit is set HIGH (Bus-OFF), the IML forces the<br />

Reset Request HIGH (present). After the Reset Request bit is set LOW (absent) the CAN-controller will wait for:<br />

a) One occurrence of the Bus-Free signal (11 recessive bits, see Section 13.6.9.6), if the preceding reset (Reset<br />

Request = HIGH) has been caused by an external reset or a CPU initiated reset.<br />

b) 128 occurrences of Bus-Free, if the preceding reset (Reset Request = HIGH) has been caused by a<br />

CAN-controller initiated Bus-OFF, before re-entering the Bus-On mode, see Section 13.6.9.<br />

c) When Reset Request is set HIGH (present), for whatever reason, the Control, Command, Status and Interrupt<br />

bits are affected, see Table 40. The registers at addresses 4 to 8 are only accessible when the Reset Request is<br />

set HIGH (present).<br />

1996 Jun 27 33<br />

HIGH (output), then the pin REF is an 1 ⁄2AVDD reference output.<br />

4 OIE<br />

LOW (input), then a reference voltage may be input.<br />

Overrun Interrupt Enable. If the value of OIE is:<br />

HIGH (enabled) and the Data Overrun bit is set (see Section 13.5.5) then the CPU<br />

receives an Overrun Interrupt signal.<br />

LOW (disabled), then the CPU receives no Overrun Interrupt signal from the<br />

CAN-controller.<br />

3 EIE Error Interrupt Enable. If the value of EIE is:<br />

HIGH (enabled) and the Error or Bus Status change (see Section 13.5.5) then the CPU<br />

receives an Error Interrupt signal.<br />

LOW (disabled), then the CPU receives no Error Interrupt signal.<br />

2 TIE Transmit Interrupt Enable. If the value of TIE is:<br />

HIGH (enabled) and when a message has been successfully transmitted or the<br />

Transmit Buffer is accessible again, (e.g. after an Abort Transmission command), then<br />

the CAN-controller transmits a Transmit Interrupt signal to the CPU.<br />

LOW (disabled), then there is no transmission of the Transmit Interrupt signal by the<br />

CAN-controller to the CPU.<br />

1 RIE Receive Interrupt Enable. If the value of RIE is:<br />

HIGH (enabled) and when a message has been received without errors, then the<br />

CAN-controller transmits a Receive Interrupt signal to the CPU.<br />

LOW (disabled), then there is no transmission of the Receive Interrupt signal by the<br />

CAN-controller to the CPU.<br />

0 RR Reset Request (note 3). If the value of RR is:<br />

HIGH (present), then detection of a Reset Request results in the CAN-controller<br />

aborting the current transmission/reception of a message entering the reset state<br />

synchronously to the system clock (tSCL, see Section 13.5.9).<br />

LOW (absent), on the HIGH-to-LOW transition of the Reset Request bit, the<br />

CAN-controller returns to its normal operating state.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

REF<br />

CRX0<br />

CRX1<br />

0<br />

1 S0<br />

0<br />

1<br />

1996 Jun 27 34<br />

S1<br />

RX0<br />

RX1<br />

P8xC592<br />

single-ended<br />

wake-up<br />

differential<br />

wake-up<br />

Fig.16 Configurable CAN receiver.<br />

1<br />

0 S2<br />

RX0 ACTIVE<br />

RX1 ACTIVE<br />

REFERENCE ACTIVE<br />

1/2 AV DD - VOLTAGE<br />

WAKE-UP MODE<br />

WAKE-UP<br />

(bus active signal)<br />

COMP OUT<br />

MGA161


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.4 COMMAND REGISTER (CMR)<br />

A command bit initiates an action within the transfer layer of the CAN-controller. The Command Register appears to the<br />

CPU as a read/write memory, except for the bits CMR.0 (TR) to CMR.3 (COS), which return a HIGH if being read.<br />

Table 33 Command Register (address 1)<br />

7 6 5 4 3 2 1 0<br />

RX0A RX1A WUM SLP COS RRB AT TR<br />

Table 34 Description of the CMR bits<br />

BIT SYMBOL FUNCTION<br />

7 RX0A RX0 Active. See Table 35; note 1.<br />

6 RX1A RX1 Active. See Table 35; note 1.<br />

5 WUM Wake-up Mode (note 2). If the value of WUM is:<br />

HIGH (single ended), then the difference of the RX signals to the internal reference voltage 1 ⁄2AVDD<br />

is used for wake up.<br />

4 SLP<br />

LOW (differential), then the differential signal between RX0 and RX1 is used for wake up.<br />

Sleep (note 3). If the value of SLP is:<br />

HIGH (sleep), then the CAN-controller enters sleep mode if no CAN interrupt is pending and there<br />

is no bus activity.<br />

LOW (wake up), then the CAN-controller functions normally.<br />

3 COS Clear Overrun Status (note 4). If the value of COS is:<br />

HIGH (clear), then the Data Overrun status bit is set to LOW (see Table 37).<br />

LOW (no action), then there is no action.<br />

2 RRB Release Receive Buffer (note 5). If the value of RRB is:<br />

HIGH (released), then the Receive Buffer attached to the CPU is released.<br />

LOW (no action), then there is no action.<br />

1 AT Abort Transmission (note 6). If the value of AT is:<br />

HIGH (present) and if not already in progress, a pending Transmission Request is cancelled.<br />

LOW (absent), then there is no action.<br />

0 TR Transmission Request (note 7). If the value of TR is:<br />

HIGH (present), then a message shall be transmitted.<br />

LOW (absent), then there is no action.<br />

1996 Jun 27 35


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Notes to the description of the CMR bits<br />

1. The RX0/RX1 Active bits, if being read, reflect the status of the respective switches (see Fig.16). It is recommended<br />

to change the switches only during the reset state (Reset Request = HIGH).<br />

2. The Wake-Up Mode bit should be set at the same time as the Sleep bit. The differential wake up mode is useful if<br />

both bus wires are fully functioning; it minimizes the amount of wake ups due to noise. The single ended wake up<br />

mode is recommended if a wake up must be possible even if one bus wire is already or may become disturbed<br />

(see Fig.16).<br />

3. The CAN-controller will enter sleep mode, if the Sleep bit is set HIGH (sleep) there is no bus activity and no interrupt<br />

is pending. The CAN-controller will wake up after the Sleep bit is set LOW (wake up) or when there is bus activity.<br />

On wake up, a Wake-Up Interrupt (see Section 13.5.6) is generated (see also Chapter 15). A CAN-controller which<br />

is sleeping and then awaken by bus activity will not be able to receive this message until it detects a Bus-Free signal<br />

(see Section 13.6.9.6). The Sleep bit, if read, reflects the status of the CAN-controller.<br />

4. This command bit is used to acknowledge the Data Overrun condition signalled by the Data Overrun status bit.<br />

Command is given only after releasing both receive buffers. The stored messages have to be rejected. The<br />

command bit is set simultaneously with setting of the Release Receive Buffer command bit the second time.<br />

5. After reading the contents of the Receive Buffer (RBF0 or RBF1) the CPU must release this buffer by setting Release<br />

Receive Buffer bit HIGH (released). This may result in another message becoming immediately available.<br />

To prevent the RRB command being executed only once, the minimum wait time between two successive RRB<br />

commands is 3 system clock cycles (tSCL, see Section 13.5.9).<br />

6. The Abort Transmission bit is used when the CPU requires the suspension of the previously requested transmission,<br />

e.g. to transmit an urgent message. A transmission already in progress is not stopped. In order to see if the original<br />

message had been either transmitted successfully or aborted, the Transmission Complete Status bit should be<br />

checked. This should be done after the Transmit Buffer Access bit has been set HIGH (released) or a Transmit<br />

Interrupt has been generated (see Section 13.5.6).<br />

7. If the Transmission Request bit was set HIGH in a previous command, it cannot be cancelled by setting the<br />

Transmission Request bit LOW (absent). Cancellation of the requested transmission may be performed by setting<br />

the Abort Transmission bit HIGH (present).<br />

Table 35 Combination of bits RX0A and RX1A (see Fig.16)<br />

CONTROL<br />

RX0A RX1A<br />

RX0 RX1<br />

1 1 CRX0 CRX1<br />

1 0 CRX0 1 ⁄2AVDD<br />

0 1 1 ⁄2AVDD CRX1<br />

0 0 No action<br />

1996 Jun 27 36


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.5 STATUS REGISTER (SR)<br />

The contents of the Status Register reflects the status of the CAN-controller. The Status Register appears to the CPU<br />

as a read only memory.<br />

Table 36 Status Register (address 2)<br />

7 6 5 4 3 2 1 0<br />

BS ES TS RS TCS TBS DO RBS<br />

Table 37 Description of the SR bits<br />

BIT SYMBOL FUNCTION<br />

7 BS Bus Status (note 1). If the value of BS is:<br />

HIGH (Bus-OFF), then the CAN-controller is not involved in bus activities.<br />

LOW (Bus-ON), then the CAN-controller is involved in bus activities.<br />

6 ES Error Status. If the value of ES is:<br />

HIGH (error), then at least one of the Error Counters (see Section 13.6.10) has reached the<br />

CPU Warning limit.<br />

LOW (ok), then both Error Counters have not reached the warning limit.<br />

5 TS Transmit Status (note 2). If the value of TS is:<br />

HIGH (transmit), then the CAN-controller is transmitting a message.<br />

LOW (idle), then no message is transmitted.<br />

4 RS Receive Status (note 2). If the value of RS is:<br />

HIGH (receive), then the CAN-controller is receiving a message.<br />

LOW (idle), then no message is received.<br />

3 TCS Transmission Complete Status (note 3). If the value of TCS is:<br />

HIGH (complete), then last requested transmission has been successfully completed.<br />

LOW (incomplete), then previously requested transmission is not yet completed.<br />

2 TBS Transmit Buffer Access (note 3). If the value of TBS is:<br />

HIGH (released), then the CPU may write a message into the TBF.<br />

LOW (locked), then the CPU cannot access the Transmit Buffer. A message is either waiting for<br />

transmission or is in the process of being transmitted.<br />

1 DO Data Overrun (note 4). If the value of DO is:<br />

HIGH (overrun), then both Receive Buffers are full and the first byte of another message should be<br />

stored.<br />

LOW (absent), then no data overrun has occurred since the Clear Overrun command was given.<br />

0 RBS Receive Buffer Status (note 5). If the value of RBS is<br />

HIGH (full), then this bit is set when a new message is available.<br />

LOW (empty), then no message has become available since the last Release Receive Buffer<br />

command bit was set.<br />

1996 Jun 27 37


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Notes to the description of the SR bits<br />

1. When the Bus Status bit is set HIGH (Bus-OFF), the CAN-controller will set the Reset Request bit HIGH (present).<br />

It will stay in this state until the CPU sets the Reset Request bit LOW (absent). Once this is completed the<br />

CAN-controller will wait the minimum protocol-defined time (128 occurrences of the Bus-Free signal) before setting<br />

the Bus Status bit LOW (Bus-ON), the Error Status bit LOW (ok) and resetting the Error Counters. During Bus-OFF<br />

the output drivers are switched off (floating); external transceiver circuits should output a recessive level in this case.<br />

2. If both the Receive Status and Transmit Status bits are LOW (idle) the CAN-bus is idle.<br />

3. If the CPU tries to write to the Transmit Buffer when the Transmit Buffer Access bit is LOW (locked), the written bytes<br />

will not be accepted and will be lost without this being signalled. The Transmission Complete Status bit is set LOW<br />

(incomplete) whenever the Transmission Request bit is set HIGH (present). If an Abort Transmission command is<br />

issued, the Transmit Buffer will be released. If the message, which was requested and then aborted, was not<br />

transmitted, the Transmission Complete Status bit will remain LOW.<br />

4. If Data Overrun = HIGH (overrun) is detected, the currently received message is dropped. A transmitted message,<br />

granted acceptance, is also stored in a Receive Buffer. This occurs because it is not known if the CAN-controller will<br />

lose arbitration and so become a receiver of the message. If no Receive Buffer is available, Data Overrun is<br />

signalled. However, this transmitted and accepted message does neither cause a Receive Interrupt nor set the<br />

Receive Buffer Status bit to HIGH (full). Also, a Data Overrun does not cause the transmission of an Overload Frame<br />

(see Sections 13.6.1 and 13.6.5).<br />

5. If the command bit Release Receive Buffer is set HIGH (released) by the CPU, the Receive Buffer Status bit is set<br />

LOW (empty) by IML. When a new message is stored in any of the receive buffers, the Receive Buffer Status bit is<br />

set HIGH (full) again.<br />

1996 Jun 27 38


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.6 INTERRUPT REGISTER (IR)<br />

The Interrupt Register allows the identification of an interrupt source. When one or more bits of this register are set, a<br />

CAN interrupt (SI01) will be indicated to the CPU. All bits are reset by the CAN-controller after this register is read by the<br />

CPU. This register appears to the CPU as a read only memory.<br />

Table 38 Interrupt Register (address 3)<br />

7 6 5 4 3 2 1 0<br />

− − − WUI OI EI TI RI<br />

Table 39 Description of the IR bits<br />

BIT SYMBOL FUNCTION<br />

7 − Reserved.<br />

6 − Reserved.<br />

5 − Reserved.<br />

4 WUI Wake-Up Interrupt. The value of WUI is set to:<br />

HIGH (set), when the sleep mode is left. See Section 13.5.4.<br />

LOW (reset), by a read access of the Interrupt Register by the CPU.<br />

3 OI Overrun Interrupt (note 1). The value of OI is set to:<br />

HIGH (set), if both Receive Buffers contain a message and the first byte of another message should<br />

be stored (passed acceptance), and the Overrun Interrupt Enable is HIGH (enabled).<br />

LOW (reset), by a read access of the Interrupt Register by the CPU.<br />

2 EI Error Interrupt. The value of EI is set to:<br />

HIGH (set), on a change of either the Error Status or Bus Status bits, if the Error Interrupt Enable is<br />

HIGH (enabled). See Section 13.5.5.<br />

LOW (reset), by a read access of the Interrupt Register by the CPU.<br />

1 TI Transmit Interrupt. The value of TI is set to:<br />

HIGH (set), on a change of the Transmit Buffer Access from LOW to HIGH (released) and<br />

Transmit Interrupt Enable is HIGH (enabled).<br />

LOW (reset), after a read access of the Interrupt Register by the CPU.<br />

0 RI Receive Interrupt (note 2). The value of RBS is set to:<br />

HIGH (set), when a new message is available in the Receive Buffer and the Receive Interrupt<br />

Enable bit is HIGH (enabled).<br />

LOW (reset) automatically by a read access of Interrupt Register by the CPU.<br />

Notes<br />

1. Overrun Interrupt bit (if enabled) and Data Overrun bit (see Section 13.5.5) are set at the same time.<br />

2. Receive Interrupt bit (if enabled) and Receive Buffer Status bit (see Section 13.5.5) are set at the same time.<br />

1996 Jun 27 39


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 40 Effects of setting the Reset Request bit HIGH (present)<br />

TYPE BIT SYMBOL FUNCTION EFFECT<br />

Control CR.7 TM Test Mode LOW (disabled)<br />

CR.5 RA Reference Active HIGH (output); note 1<br />

Command CMR.7 RX0A RX0 Active HIGH (RX0 = CRX0); note 1<br />

CMR.6 RX1A RX1 Active HIGH (RX1 = CRX1); note 1<br />

CMR.4 SLP Sleep LOW (wake-up)<br />

CMR.3 COS Clear Overrun Status HIGH (clear)<br />

CMR.2 RRB Release Receive Buffer HIGH (released)<br />

CMR.1 AT Abort Transmission LOW (absent)<br />

CMR.0 TR Transmission Request LOW (absent)<br />

Status SR.7 BS Bus Status LOW (Bus-On); note 1<br />

SR.6 ES Error Status LOW (no error); note 1<br />

SR.5 TS Transmit Status LOW (idle)<br />

SR.4 RS Receive Status LOW (idle)<br />

SR.3 TCS Transmission Complete Status HIGH (complete)<br />

SR.2 TBS Transmit Buffer Access HIGH (released)<br />

SR.1 DO Data Overrun LOW (absent)<br />

SR.0 RBS Receive Buffer Status LOW (empty)<br />

Interrupt IR.3 OI Overrun Interrupt LOW (reset)<br />

IR.1 TI Transmit Interrupt LOW (reset)<br />

IR.0 RI Receive Interrupt LOW (reset)<br />

Note<br />

1. Only after an external reset; see note 5 to Table 37 “Description of the SR bits”.<br />

1996 Jun 27 40


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.7 ACCEPTANCE CODE REGISTER (ACR)<br />

The Acceptance Code Register is part of the acceptance<br />

filter of the CAN-controller. This register can be accessed<br />

(read/write), if the Reset Request bit is set HIGH (present).<br />

When a message is received which passes the<br />

acceptance test and if there is an empty Receive Buffer,<br />

then the respective Descriptor and Data Field<br />

(see Fig.15) are sequentially stored in this empty buffer.<br />

In the event that there is no empty Receive Buffer, the<br />

Data Overrun bit is set HIGH (overrun); see<br />

Sections 13.5.5 and 13.5.6.<br />

Table 41 Acceptance Code Register (address 4)<br />

Table 42 Description of the ACR bits<br />

1996 Jun 27 41<br />

When the complete message has been correctly received<br />

the following occurs:<br />

• The Receive Buffer Status bit is set HIGH (full)<br />

• If the Receive Interrupt Enable bit is set HIGH (enabled),<br />

the Receive Interrupt is set HIGH (set).<br />

During transmission of a message which passes the<br />

acceptance test, the message is also written to its own<br />

Receive Buffer. If no Receiver Buffer is available, Data<br />

Overrun is signalled because it is not known at the start of<br />

a message whether the CAN-controller will lose arbitration<br />

and so become a receiver of the message.<br />

7 6 5 4 3 2 1 0<br />

AC.7 AC.6 AC.5 AC.4 AC.3 AC.2 AC.1 AC.0<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

AC.7<br />

to<br />

AC.0<br />

13.5.8 ACCEPTANCE MASK REGISTER (AMR)<br />

Acceptance Code. The Acceptance Code bits (AC.7 to AC.0) and the eight most significant<br />

bits of the message's Identifier (ID.10 to ID.3) must be equal to those bit positions which are<br />

marked relevant by the Acceptance Mask bits (AM.7 to AM.0).<br />

The acceptance is given, if the following equation is satisfied:<br />

(ID10 ... ID.3) = [(AC.7 ... AC.0) or (AM.7 ... AM.0)] = 1111 1111 B.<br />

The Acceptance Mask Register is part of the acceptance<br />

filter of the CAN-controller.<br />

This register can be accessed (read/write) if the Reset<br />

Request bit is set HIGH (present).<br />

Table 43 Acceptance Mask Register (address 5)<br />

Table 44 Description of the AMR bits<br />

The Acceptance Mask Register qualifies which of the<br />

corresponding bits of the acceptance code are ‘relevant’ or<br />

‘don't care’ for acceptance filtering.<br />

7 6 5 4 3 2 1 0<br />

AM.7 AM.6 AM.5 AM.4 AM.3 AM.2 AM.1 AM.0<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

AM.7<br />

to<br />

AM.0<br />

Acceptance Mask. If the Acceptance Mask bit is:<br />

HIGH (don’t care), then this bit position is ‘don’t care’ for the acceptance of a message.<br />

LOW (relevant), then this bit position is ‘relevant’ for acceptance filtering.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.9 BUS TIMING REGISTER 0 (BTR0)<br />

The contents of Bus Timing Register 0 defines the values<br />

of the Baud Rate Prescaler (BRP) and the Synchronization<br />

Jump Width (SJW).<br />

Table 45 Bus Timing Register 0 (address 6)<br />

Table 46 Description of the BTR0 bits<br />

1996 Jun 27 42<br />

This register can be accessed (read/write) if the Reset<br />

Request bit is set HIGH (present).<br />

For further information on bus timing, see<br />

Sections 13.5.10 and 13.5.18.<br />

7 6 5 4 3 2 1 0<br />

SJW.1 SJW.0 BRP.5 BRP.4 BRP.3 BRP.2 BRP.1 BRP.0<br />

BIT SYMBOL FUNCTION<br />

7 SJW.1 Synchronization Jump Width. To compensate for phase shifts between clock oscillators of different<br />

6 SJW.0 bus controllers, any bus controller must resynchronize on any relevant signal edge of the current<br />

transmission. The synchronization jump width defines the maximum number of clock cycles a bit<br />

period may be shortened or lengthened by one resynchronization:<br />

tSJW = tSCL ( 2SJW.1 + ˙˙ SJW.0 + 1).<br />

5 BRP.5 Baud Rate Prescaler. The period of the system clock tSCL is programmable and determines the<br />

4 BRP.4 individual bit timing.The system clock is calculated using the following equation:<br />

3 BRP.3 tSCL =<br />

2tCLK ( 32BRP.5 + 16BRP.4 + 8BRP.3 + 4BRP.2 + 2BRP.1 + BRP.0 + 1)<br />

.<br />

2 BRP.2 Where tCLK = time period of the P8xC592 oscillator.<br />

1 BRP.1<br />

0 BRP.0


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.10 BUS TIMING REGISTER 1(BTR1)<br />

The contents of Bus Timing Register 1 defines the length<br />

of the bit period, the location of the sample point and the<br />

number of samples to be taken at each sample point.<br />

Table 47 Bus Timing Register 1 (address 7)<br />

Table 48 Description of the BTR1 bits<br />

1996 Jun 27 43<br />

This register can be accessed (read/write) if the Reset<br />

Request bit is set HIGH (present).For further information<br />

on bus timing, see Sections 13.5.9 and 13.5.18.<br />

7 6 5 4 3 2 1 0<br />

SAM TSEG2.2 TSEG2.1 TSEG2.0 TSEG1.3 TSEG1.2 TSEG1.1 TSEG1.0<br />

BIT SYMBOL FUNCTION<br />

7 SAM Sampling. If the bit SAM is:<br />

HIGH (3 samples), then three samples are taken. This is recommended for slow/medium speed<br />

buses (SAE class A and B) where filtering of spikes on the bus-line is beneficial<br />

(see Section 13.5.19.6)<br />

LOW (1 sample), the bus is sampled once.<br />

This is recommended for high speed buses (SAE class C).<br />

6 TSEG2.2 Time Segment 1 (TSEG1) and Time Segment 2 (TSEG2).<br />

5 TSEG2.1 TSEG1 determines the number of clock cycles per bit period and the location of the sample point<br />

4 TSEG2.0 tTSEG1 = tSCL ( 8TSEG1.3 + 4TSEG1.2 + 2TSEG1.1 + TSEG1.0 + 1)<br />

.<br />

3 TSEG1.3<br />

TSEG2 determines the number of clock cycles per bit period and the location of the sample point:<br />

2<br />

1<br />

TSEG1.2<br />

TSEG1.1<br />

tTSEG2 =<br />

tSCL ( 4TSEG2.2 + 2TSEG2.1 + TSEG2.0 + 1)<br />

.<br />

0 TSEG1.0


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.11 OUTPUT CONTROL REGISTER (OCR)<br />

The Output Control Register allows, under software<br />

control, the set-up of different output driver configurations.<br />

This register can be accessed (read/write) if the Reset<br />

Request bit is set HIGH (present). If the CAN-controller is<br />

in the sleep mode (Sleep = HIGH) a recessive level is<br />

output on the CTX0 and CTX1 pins. If the CAN-controller<br />

Table 49 Output Control Register (address 8)<br />

Table 50 Description of the OCR bits<br />

Table 51 Description of the Output Mode bits<br />

1996 Jun 27 44<br />

is in the reset state (Reset Request = HIGH) the output<br />

drivers are floating.<br />

Tables 50 and 51, show the relationship between the bits<br />

of the Output Control Register and the two serial output<br />

pins CTX0 and CTX1 of the P8xC592 CAN-controller,<br />

connected to the serial bus (see Fig.14).<br />

7 6 5 4 3 2 1 0<br />

OCTP1 OCTN1 OCPOL1 OCTP0 OCTN0 OCPOL0 OCMODE1 OCMODE0<br />

BIT SYMBOL FUNCTION<br />

7 OCTP1 See Tables 51 and 52.<br />

6 OCTN1<br />

5 OCPOL1<br />

4 OCTP0<br />

3 OCTN0<br />

2 OCPOL0<br />

1 OCMODE1 Output Mode.<br />

0 OCMODE0 These bits select the output mode; see Table 51.<br />

OCMODE1 OCMODE0 DESCRIPTION<br />

1 0 Normal Output Mode. The bit sequence (TXD) is sent via CTX0, CTX1. TXD is the data<br />

bit to be transmitted. The voltage levels on the output driver pins CTX0 and CTX1 depend<br />

on both the driver characteristic programmed by OCTPx, OCTNx (float, pull-up, pull-down,<br />

push-pull) and the output polarity programmed by OCPOLx (see Fig.17).<br />

1 1 Clock Output Mode. For the CTX0 pin this is the same as in Normal Output Mode<br />

(CTX0: bit sequence). However, the data stream to CTX1 is replaced by the transmit clock<br />

(TXCLK). The rising edge of the transmit clock (non-inverted) marks the beginning of a bit<br />

period. The clock pulse width is tSCL.<br />

0 0 Bi-phase Output Mode. In contrast to Normal Output Mode the bit representation is time<br />

variant and toggled. If the bus controllers are galvanically decoupled from the bus-line by a<br />

transformer, the bit stream is not allowed to contain a DC component. This is achieved by<br />

the following scheme. During recessive bits all outputs are deactivated (floating). Dominant<br />

bits are sent alternately on CTX0 and CTX1, i.e. the first dominant bit is sent on CTX0, the<br />

second is sent on CTX1, and the third one is sent on CTX0 again, etc.<br />

0 1 Test Output Mode. For the CTX0 pin this is the same as in Normal Output Mode<br />

(CTX0: bit sequence). To measure the delay time of the transmitter and receiver this mode<br />

connects the output of the input comparator (COMP OUT) with the input of the output driver<br />

CTX1. This mode is used for production testing only.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 52 Output pin set-up<br />

DRIVE OCTPx OCTNx OCPOLx TXD TPx (1) TNx (2) CTXx (3)<br />

Float 0 0 0 0 OFF OFF float<br />

0 0 0 1 OFF OFF float<br />

0 0 1 0 OFF OFF float<br />

0 0 1 1 OFF OFF float<br />

Pull-down 0 1 0 0 OFF ON LOW<br />

0 1 0 1 OFF OFF float<br />

0 1 1 0 OFF OFF float<br />

0 1 1 1 OFF ON LOW<br />

Pull-up 1 0 0 0 OFF OFF float<br />

1 0 0 1 ON OFF HIGH<br />

1 0 1 0 ON OFF HIGH<br />

1 0 1 1 OFF OFF float<br />

Push/Pull 1 1 0 0 OFF ON LOW<br />

1 1 0 1 ON OFF HIGH<br />

1 1 1 0 ON OFF HIGH<br />

1 1 1 1 OFF ON LOW<br />

Notes<br />

1. TPx is the on-chip output transistor x, connected to VDD; x=0or1.<br />

2. TNx is the on-chip output transistor x, connected to CVSS; x = 0 or 1.<br />

3. CTXx is the serial output level on CTX0 or CTX1. It is required that the output level on the CAN-bus is dominant with<br />

TXD = 0 and recessive with TXD = 1, see Section 13.6.1.1 “Bit representation”.<br />

handbook, full pagewidth<br />

OCPOL0<br />

OCPOL1<br />

OCMODE0<br />

OCMODE1<br />

TXD<br />

TXCLK<br />

OCTP1 OCTP0<br />

OUTPUT<br />

CONTROL<br />

LOGIC<br />

OCTN1 OCTN0<br />

1996 Jun 27 45<br />

V DD<br />

CV SS<br />

V DD<br />

CV SS<br />

TP0<br />

TN0<br />

TP1<br />

TN1<br />

MGA162<br />

Fig.17 Configurable CAN Transmitter.<br />

CTX0<br />

CTX1


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.12 TEST REGISTER (TR)<br />

The Test Register is used for production testing only.<br />

Table 53 Test Register (address 9)<br />

7 6 5 4 3 2 1 0<br />

Reserved Reserved Map Internal<br />

Register<br />

13.5.13 TRANSMIT BUFFER LAYOUT<br />

The global layout of the Transmit Buffer is shown in Fig.15. This buffer serves to store a message from the CPU to be<br />

transmitted by the CAN-controller. It is subdivided into Descriptor and Data Field. The Transmit Buffer can be written to<br />

and read from by the CPU.<br />

13.5.13.1 Descriptor<br />

Connect RX<br />

Buffer 0<br />

CPU<br />

Table 54 Descriptor Byte 1 Register (DSCR1, address 10)<br />

Table 55 Descriptor Byte 2 Register (DSCR2, address 11)<br />

Table 56 Description of the ID.n bits in DSCR1 and DSCR2<br />

1996 Jun 27 46<br />

Connect TX<br />

Buffer CPU<br />

Access<br />

Internal Bus<br />

Normal<br />

RAM<br />

Connect<br />

Float Output<br />

Driver<br />

7 6 5 4 3 2 1 0<br />

ID.10 ID.9 ID.8 ID.7 ID.6 ID.5 ID.4 ID.3<br />

7 6 5 4 3 2 1 0<br />

ID.2 ID.1 ID.0 RTR DLC.3 DLC.2 DLC.1 DLC.0<br />

BIT SYMBOL FUNCTION<br />

DSCR1<br />

7 ID.10 Identifier. The Identifier consists of 11 bits (ID.10 to ID.0). ID.10 is the most significant<br />

6<br />

5<br />

4<br />

ID.9<br />

ID.8<br />

ID.7<br />

bit, which is transmitted first on the bus during the arbitration process. The Identifier acts<br />

as the messages' name, used in a receiver for acceptance filtering, and also determines<br />

the bus access priority during the arbitration process. The lower the binary value of the<br />

Identifier the higher the priority. This is due to the larger number of leading dominant bits<br />

3 ID.6 during arbitration (see Section 13.6.7).<br />

2 ID.5<br />

1 ID.4<br />

0<br />

DSCR2<br />

ID.3<br />

7 ID.2 Identifier. See DSCR1.<br />

6 ID.1<br />

5 ID.0


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 57 Description of the other DSCR2 bits<br />

BIT SYMBOL FUNCTION<br />

4 RTR Remote Transmission Request. If the RTR bit is:<br />

HIGH (remote), then the Remote Frame will be transmitted by the CAN-controller.<br />

LOW (data), then the Data Frame will be transmitted by the CAN-controller.<br />

3 DLC.3 Data Length Code (DLC). The number of bytes (Data Byte Count) in the Data Field of a message is<br />

2 DLC.2 coded by the Data Length Code. At the start of a Remote Frame transmission the Data Length Code<br />

1<br />

0<br />

DLC.1<br />

DLC.0<br />

is not considered due to the RTR bit being HIGH (remote). This forces the number of<br />

transmitted/received data bytes to be a logic 0. Nevertheless, the Data Length Code must be<br />

specified correctly to avoid bus errors, if two CAN-controllers start a Remote Frame transmission<br />

simultaneously. The range of the Data Byte Count is 0 to 8 bytes and coded as follows:<br />

Data Byte Count = 8DLC.3 + 4DLC.2 + 2DLC.1 + DLC.0.<br />

For reasons of compatibility no Data Byte Counts other than 0,1,2,....8 should be used.<br />

13.5.13.2 Data Field<br />

The number of transferred data bytes is determined by the<br />

Data Length Code. The first bit transmitted is the most<br />

significant bit of data byte 1 at address 12.<br />

13.5.14 RECEIVE BUFFER LAYOUT<br />

The layout of the Receive Buffer and the individual bytes<br />

correspond to the definitions given for the Transmit Buffer<br />

layout, except that the addresses start at 20 instead of 10<br />

(see Fig.15).<br />

Table 58 The SFRs between CPU and CAN<br />

Reserved bits are read as HIGH. R = Read; W = Write; R/W = Read/Write.<br />

ADDRESS ACCESS<br />

1996 Jun 27 47<br />

13.5.15 HANDLING OF THE CPU-CAN INTERFACE<br />

Via the four special registers CANADR, CANDAT,<br />

CANCON and CANSTA the CPU has access to the<br />

CAN-controller and also to the DMA-logic. Note that<br />

CANCON and CANSTA have different meanings for a<br />

Read and Write access.<br />

BIT<br />

7 6 5 4 3 2 1 0<br />

CANADR<br />

DBH<br />

CANDAT<br />

R/W DMA Reserved AutoInc CANA4 CANA3 CANA2 CANA1 CANA0<br />

DAH R/W CAND7 CAND6 CAND5 CAND4 CAND3 CAND2 CAND1 CAND0<br />

CANCON; Do not use a RMW instruction<br />

D9H R Reserved Reserved Reserved WUI OI EI TI RI<br />

W RX0A RX1A WUM SLP COS RRB AT TR<br />

CANSTA; The bit addresses of CANSTA (7 to 0) are DFH to D8H; do not use a RMW instruction<br />

DFH to D8H R BS ES TS RS TCS TBS DO RBS<br />

W RAMA7 RAMA6 RAMA5 RAMA4 RAMA3 RAMA2 RAMA1 RAMA0


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.15.1 Special Function Register CANADR<br />

CANADR is implemented as a read/write register.<br />

Table 59 SFR CANADR (address DBH)<br />

7 6 5 4 3 2 1 0<br />

DMA − AutoInc CANA4 CANA3 CANA2 CANA1 CANA0<br />

Table 60 Description of the CANADR bits<br />

BIT SYMBOL FUNCTION<br />

7 DMA DMA-logic controlled via bit CANADR.7 (see Section 13.5.17).<br />

6 − Reserved.<br />

5 AutoInc Auto Address Increment mode controlled via bit CANADR.5 (see Section 13.5.16).<br />

4 CANA4 The five least significant bits CANADR.4 to CANADR.0 define the address of one of the<br />

3<br />

2<br />

1<br />

CANA3<br />

CANA2<br />

CANA1<br />

CAN-controller internal registers to be accessed via CANDAT. For instance, after an external<br />

hardware (e.g. power-on) reset CANADR contains the value 64H, and hence the CPU accesses<br />

(read/write) the Acceptance Code register of the CAN-controller, via the SFR CANDAT.<br />

0 CANA0<br />

13.5.15.2 Special Function Register CANDAT<br />

CANDAT is implemented as a read/write register.<br />

Table 61 SFR CANDAT (address DAH)<br />

7 6 5 4 3 2 1 0<br />

CAND7 CAND6 CAND5 CAND4 CAND3 CAND2 CAND1 CAND0<br />

Table 62 Description of the CANADR bits<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

CAND7<br />

to<br />

CAND0<br />

The SFR CANDAT appears as a port to the CAN-controller internal register (memory location) being<br />

selected by CANADR. Reading or writing CANDAT is effectively an access to that CAN-controller<br />

internal register, which is selected by CANADR.<br />

1996 Jun 27 48


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.15.3 Special Function Register CANCON<br />

Table 63 SFR CANCON in Read access (address D9H)<br />

7 6 5 4 3 2 1 0<br />

− − − WUI OI EI TI RI<br />

Table 64 Description of the CANCON bits in Read access<br />

When reading CANCON the Interrupt Register of the CAN-controller is accessed.<br />

BIT SYMBOL FUNCTION<br />

7 − Reserved; bits are read as HIGH.<br />

6 −<br />

5 −<br />

4 WUI Wake-Up Interrupt (see Table 39).<br />

3 OI Overrun Interrupt (see Table 39).<br />

2 EI Error Interrupt (see Table 39).<br />

1 TI Transmit Interrupt (see Table 39).<br />

0 RI Receive Interrupt (see Table 39).<br />

Table 65 SFR CANCON in Write access (address D9H)<br />

7 6 5 4 3 2 1 0<br />

RX0A RX1A WUM SLP COS RRB AT TR<br />

Table 66 Description of the CANCON bits in Write access<br />

When writing to CANCON then the Command Register of the CAN-controller is accessed.<br />

BIT SYMBOL FUNCTION<br />

7 RX0A RX0 Active (see Table 34).<br />

6 RX1A RX1 Active (see Table 34).<br />

5 WUM Wake-Up Mode (see Table 34).<br />

4 SLP Sleep (see Table 34).<br />

3 COS Clear Overrun Status (see Table 34).<br />

2 RRB Release Receive Buffer (see Table 34).<br />

1 AT Abort Transmission (see Table 34).<br />

0 TR Transmission Request (see Table 34).<br />

1996 Jun 27 49


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.15.4 Special Function Register CANSTA<br />

CANSTA is implemented as a bit-addressable read/write register.<br />

The bit addresses of CANSTA (7 to 0) are DFH to D8H.<br />

Table 67 SFR CANCON in Read access (address DFH to D8H)<br />

7 6 5 4 3 2 1 0<br />

BS ES TS RS TCS TBS DO RBS<br />

Table 68 Description of the CANCON bits in Read access<br />

When reading CANSTA the Status Register of the CAN-controller is accessed.<br />

BIT SYMBOL FUNCTION<br />

7 BS Bus Status (see Table 37).<br />

6 ES Error Status (see Table 37).<br />

5 TS Transmit Status (see Table 37).<br />

4 RS Receive Status (see Table 37).<br />

3 TCS Transmission Complete Status (see Table 37).<br />

2 TBS Transmit Buffer Access (see Table 37).<br />

1 DO Data Overrun (see Table 37).<br />

0 RBS Receive Buffer Status (see Table 37).<br />

Table 69 SFR CANCON in Write access (address DFH to D8H)<br />

7 6 5 4 3 2 1 0<br />

RAMA7 RAMA6 RAMA5 RAMA4 RAMA3 RAMA2 RAMA1 RAMA0<br />

Table 70 Description of the CANSTA bits in Write access<br />

Writing to CANSTA sets the address of the on-chip MAIN RAM (internal Data Memory) for a subsequent DMA transfer.<br />

BIT SYMBOL FUNCTION<br />

7<br />

to<br />

0<br />

RAMA7<br />

to<br />

RAMA0<br />

1996 Jun 27 50<br />


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.16 AUTO ADDRESS INCREMENT<br />

With the Auto Address Increment mode a fast stack-like<br />

reading and writing of CAN-controller internal registers is<br />

provided. If the bit CANADR.5 (AutoInc) is HIGH, the<br />

content of CANADR is incremented automatically after any<br />

read or write access to CANDAT. For instance, loading a<br />

message into the Transmit Buffer can be done by writing<br />

2AH into CANADR and then moving byte by byte of the<br />

message to CANDAT. Incrementing CANADR beyond<br />

XX111111B resets the bit CANADR.5 (AutoInc)<br />

automatically (CANADR = XX000000B).<br />

13.5.17 HIGH SPEED DMA<br />

The DMA-logic allows you to transfer a complete message<br />

(up to 10 bytes) between CAN-controller and MAIN RAM<br />

in 2 instruction cycles at maximum; up to 4 bytes are<br />

transferred in 1 instruction cycle. The performance of the<br />

CPU is strongly enhanced because this very fast transfer<br />

is carried out in the background.<br />

A DMA transfer is achieved by first writing the RAM<br />

address (00H to FFH) into CANSTA and then setting the<br />

TX- or RX-Buffer address in CANDR and the bit<br />

CANADR.7 (DMA) simultaneously; the RAM address<br />

points to the location of the first byte to be transferred.<br />

Setting the DMA bit causes an automatic evaluation of the<br />

Data Length Code and then the transfer; for a TX-DMA<br />

transfer the Data Length Code is expected at the location<br />

‘RAM address +1’.<br />

In order to program a TX-DMA transfer the value 8AH<br />

(address 10) has to be written into CANADR. Then a<br />

complete message, consisting of the 2-byte Descriptor<br />

and the Data Field (0 to 8 bytes), starting at location<br />

‘RAM address’ is transferred to the TX-Buffer.<br />

The RX-DMA transfer is very versatile. By writing a value<br />

in the range of 94H (address 20) up to 9DH (address 29)<br />

into CANADR the whole or a part of the received message,<br />

starting at the specified address, is transferred to the<br />

internal Data Memory. This allows e.g. to transfer the bytes<br />

of the Data Field only.<br />

After a successful DMA transfer the DMA-bit is reset.<br />

During a DMA transfer the CPU can process the next<br />

instruction. However, an access to the Data Memory,<br />

1996 Jun 27 51<br />

CANADR, CANDAT, CANCON or CANSTA is not allowed.<br />

After having set the DMA-bit, every interrupt is disabled<br />

until the end of the transfer. Note, that disadvantageous<br />

programming may lead to an interrupt response time of at<br />

most 10 instruction cycles. The shortest interrupt response<br />

time is achieved by using 2 consecutive 1-cycle<br />

instructions directly after setting the DMA-bit.<br />

During the reset state (bit Reset Request is HIGH) a DMA<br />

transfer is not possible.<br />

13.5.18 BUS TIMING/SYNCHRONIZATION<br />

The Bus Timing Logic (BTL) monitors the serial bus-line<br />

via the on-chip input comparator and performs the<br />

following functions (see Section 13.4):<br />

• Monitors the serial bus-line level<br />

• Adjusts the sample point, within a bit period<br />

(programmable)<br />

• Samples the bus-line level using majority logic<br />

(programmable, 1 or 3 samples)<br />

• Synchronization to the bit stream:<br />

– hard synchronization at the start of a message<br />

– resynchronization during transfer of a message.<br />

The configuration of the BTL is performed during the<br />

initialization of the CAN-controller. The BTL uses the<br />

following three registers:<br />

• Control Register (Sync)<br />

• Bus Timing Register 0<br />

• Bus Timing Register 1.<br />

13.5.19 BIT TIMING<br />

A bit period is built up from a number of system clock<br />

cycles (tSCL), see Section 13.5.9.<br />

One bit period is the result of the addition of the<br />

programmable segments TSEG1 and TSEG2 and the<br />

general segment SYNCSEG.<br />

13.5.19.1 Synchronization Segment (SYNCSEG)<br />

The incoming edge of a bit is expected during this state;<br />

this state corresponds to one system clock cycle (1 × tSCL).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

transmit point<br />

SYNC.SEG<br />

t SYNCSEG<br />

1 clock cycle (t )<br />

SCL<br />

(a) As defined by the CAN-protocol.<br />

(b) As implemented in the P8xC592's on-chip CAN-controller.<br />

13.5.19.2 Time Segment 1 (TSEG1)<br />

This segment determines the location of the sampling<br />

point within a bit period, which is at the end of TSEG1.<br />

TSEG1 is programmable from 1 to 16 system clock cycles<br />

(see Section 13.5.10).<br />

t TSEG1<br />

The correct location of the sample point is essential for the<br />

correct functioning of a transmission. The following points<br />

must be taken into consideration:<br />

• A Start-Of-Frame (see Section 13.6.2) causes all<br />

CAN-controllers to perform a ‘hard synchronization’<br />

(see Section 13.5.20) on the first recessive-to-dominant<br />

edge.<br />

During arbitration, however, several CAN-controllers<br />

may simultaneously transmit. Therefore it may require<br />

twice the sum of bus-line, input comparator and the<br />

output driver delay times until the bus is stable.<br />

This is the propagation delay time.<br />

1996 Jun 27 52<br />

nominal bit time<br />

PROP.SEG PHASE SEG1 PHASE SEG2<br />

(a)<br />

t (one bit period)<br />

(b)<br />

Fig.18 Bit period.<br />

sample point<br />

sample point<br />

t TSEG2<br />

MGA163<br />

• To avoid sampling at an incorrect position, it is<br />

necessary to include an additional synchronization<br />

buffer on both sides of the sample point.<br />

The main reasons for incorrect sampling are:<br />

– Incorrect synchronization due to spikes on the<br />

bus-line<br />

– Slight variations in the oscillator frequency of each<br />

CAN-controller in the network, which results in a<br />

phase error.<br />

• Time Segment 1 consists of the segment for<br />

compensation of propagation delays and the<br />

synchronization buffer segment directly before the<br />

sample point (see Fig.18).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.19.3 Time Segment 2 (TSEG2)<br />

This time segment provides:<br />

• Additional time at the sample point for calculation of the<br />

subsequent bit levels (e.g. arbitration)<br />

• Synchronization buffer segment directly after the<br />

sample point.<br />

TSEG2 is programmable from 1 to 8 system clock cycles<br />

(see Section 13.5.10).<br />

13.5.19.4 Synchronisation Jump Width (SJW)<br />

SJW defines the maximum number of clock cycles (tSCL) a<br />

period may be reduced or increased by one<br />

resynchronization. SJW is programmable from 1 to 4<br />

system clock cycles, see Section 13.5.2.<br />

13.5.19.5 Propagation Delay Time (tprop)<br />

The Propagation Delay Time is:<br />

tprop = 2 × ( physical bus delay<br />

+ input comparator delay<br />

+ output driver delay)<br />

.<br />

tprop is rounded up to the nearest multiple of tSCL.<br />

13.5.19.6 Bit Timing Restrictions<br />

Restrictions on the configuration of the bit timing are based<br />

on internal processing. The restrictions are:<br />

• tTSEG2 ≥ 2tSCL<br />

• tTSEG2 ≥ tSJW<br />

• tTSEG1 ≥ tSEG2<br />

• tTSEG1 ≥ tSJW + tprop.<br />

The three sample mode (SAM = HIGH) has the effect of<br />

introducing a delay of one system clock cycle on the<br />

bus-line. This must be taken into account for the correct<br />

calculation of TSEG1 and TSEG2:<br />

• tTSEG1 ≥ tSJW + tprop + 2tSCL<br />

• tTSEG2 ≥ 3tSCL.<br />

13.5.20 SYNCHRONIZATION<br />

Synchronization is performed by a state machine which<br />

compares the incoming edge with its actual bit timing and<br />

adapts the bit timing by hard synchronization or<br />

resynchronization.<br />

1996 Jun 27 53<br />

This type of synchronization occurs only at the beginning<br />

of a message.<br />

The CAN-controller synchronizes on the first incoming<br />

recessive-to-dominant edge of a message (being the<br />

leading edge of a message's Start-Of-Frame bit;<br />

see Section 13.6.2.<br />

Resynchronization occurs during the transmission of a<br />

message's bit stream to compensate for:<br />

• Variations in individual CAN-controller oscillator<br />

frequencies<br />

• Changes introduced by switching from one transmitter<br />

to another (e.g. during arbitration).<br />

As a result of resynchronization either tTSEG1 may be<br />

increased by up to a maximum of tSJW or tTSEG2 may be<br />

decreased by up to a maximum of tSJW:<br />

• tTSEG1 ≤ tSCL [(TSEG1 + 1) + (SJW + 1)]<br />

• tTSEG2 ≥ tSCL [(TSEG2 + 1) − (SJW + 1)].<br />

TSEG1, TSEG2 and SJW are the programmed numerical<br />

values.<br />

The phase error (e) of an edge is given by the position of<br />

the edge relative to SYNCSEG, measured in system clock<br />

cycles (tSCL).<br />

The value of the phase error is defined as:<br />

• e = 0, if the edge occurs within SYNCSEG<br />

• e > 0, if the edge occurs within TSEG1<br />

• e < 0, if the edge occurs within TSEG2.<br />

The effect of resynchronization is:<br />

• The same as that of a hard synchronization, if the<br />

magnitude of the phase error (e) is less or equal to the<br />

programmed value of tSJW<br />

• To increase a bit period by the amount of tSJW, if the<br />

phase error is positive and the magnitude of the phase<br />

error is larger than tSJW<br />

• To decrease a bit period by the amount of tSJW, if the<br />

phase error is negative and the magnitude of the phase<br />

error is larger than tSJW.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.5.20.1 Synchronization Rules<br />

The synchronization rules are as follows:<br />

• Only one synchronization within one bit time is used.<br />

• An edge is used for synchronization only if the value<br />

detected at the previous sample point differs from the<br />

bus value immediately after the edge.<br />

• Hard synchronization is performed whenever there is a<br />

recessive-to-dominant edge during Bus-Idle<br />

(see Section 13.6.6).<br />

• All other edges (recessive-to-dominant and optionally<br />

dominant-to recessive edges if the Sync bit is set HIGH<br />

(see Section 13.5.3) which are candidates for<br />

resynchronization will be used with the following<br />

exception:<br />

– A transmitting CAN-controller will not perform a<br />

resynchronization as a result of a<br />

recessive-to-dominant edge with positive phase<br />

error, if only these edges are used for<br />

resynchronization. This ensures that the delay times<br />

of the output driver and input comparator do not<br />

cause a permanent increase in the bit time.<br />

13.6 CAN 2.0A Protocol description<br />

13.6.1 FRAME TYPES<br />

The P8xC592's CAN-controller supports the four different<br />

CAN-protocol frame types for communication:<br />

• Data Frame, to transfer data<br />

• Remote Frame, request for data<br />

• Error Frame, globally signal a (locally) detected error<br />

condition<br />

• Overload Frame, to extend delay time of subsequent<br />

frames (an Overload Frame is not initiated by the<br />

P8xC592 CAN-controller).<br />

13.6.1.1 Bit representation<br />

There are two logical bit representations used in the<br />

CAN-protocol:<br />

• A recessive bit on the bus-line appears only if all<br />

connected CAN-controllers send a recessive bit at that<br />

moment.<br />

• Dominant bits always overwrite recessive bits i.e. the<br />

resulting bit level on the bus-line is dominant.<br />

1996 Jun 27 54<br />

13.6.2 <strong>DATA</strong> FRAME<br />

A Data Frame carries data from a transmitting<br />

CAN-controller to one or more receiving ones.<br />

A Data Frame is composed of seven different bit-fields:<br />

• Start-Of-Frame<br />

• Arbitration Field<br />

• Control Field<br />

• Data Field (may have a length of zero)<br />

• CRC Field (CRC = Cyclic Redundancy Code)<br />

• Acknowledge Field<br />

• End-Of-Frame.<br />

13.6.2.1 Start-Of-Frame bit<br />

Signals the start of a Data Frame or Remote Frame.<br />

It consists of a single dominant bit use for hard<br />

synchronization of a CAN-controller in receive mode.<br />

13.6.2.2 Arbitration Field<br />

Consists of the message Identifier and the RTR bit. In the<br />

case of simultaneous message transmissions by two or<br />

more CAN-controllers the bus access conflict is solved by<br />

bit-wise arbitration, which is active during the transmission<br />

of the Arbitration Field.<br />

13.6.2.3 Identifier<br />

This 11-bit field is used to provide information about the<br />

message, as well as the bus access priority. It is<br />

transmitted in the order ID.10 to ID.0 (LSB). The situation<br />

that the seven most significant bits (ID.10 to ID.4) are all<br />

recessive must not occur.<br />

An Identifier does not define which particular<br />

CAN-controller will receive the frame because a CAN<br />

based communication network does not differentiate<br />

between a point-to-point, multicast or broadcast<br />

communication.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.2.4 RTR bit<br />

A CAN-controller, acting as a receiver for certain<br />

information may initiate the transmission of the respective<br />

data by transmitting a Remote Frame to the network,<br />

addressing the data source via the Identifier and setting<br />

the RTR bit HIGH (remote; recessive bus level). If the data<br />

source simultaneously transmits a Data Frame containing<br />

the requested data, it uses the same Identifier. No bus<br />

access conflict occurs due to the RTR bit being set LOW<br />

(data; dominant bus level) in the Data Frame.<br />

13.6.2.5 Control Field<br />

This field consists of six bits. It includes two reserved bits<br />

(for future expansions of the CAN-protocol), transmitted<br />

with a dominant bus level, and is followed by the Data<br />

Length Code (4 bits).<br />

The number of bytes (destuffed; number of data bytes to<br />

be transmitted/received) in the Data Field is indicated by<br />

the Data Length Code. Admissible values of the Data<br />

Length Code, and hence the number of bytes in the<br />

(destuffed) Data Field, are {0, 1, ...., 8}. A logic 0 (logic 1)<br />

in the Data Length Code is transmitted as dominant<br />

(recessive) bus level, respectively.<br />

13.6.2.6 Data Field<br />

The data, stored within the Data Field of the Transmit<br />

Buffer, are transmitted according to the Data Length Code.<br />

Conversely, data of a received Data Frame will be stored<br />

in the Data Field of a Receive Buffer. The Data Field can<br />

contain from 0 up to 8 bytes. The most significant bit of the<br />

first data byte (lowest address) is transmitted/received<br />

first.<br />

13.6.2.7 Cyclic Redundancy Code Field (CRC)<br />

The CRC Field consists of the CRC Sequence (15 bits)<br />

and the CRC Delimiter (1 recessive bit). The Cyclic<br />

Redundancy Code (CRC) encloses the destuffed bit<br />

stream of the Start-Of-Frame, Arbitration Field, Data Field<br />

and CRC Sequence. The most significant bit of the CRC<br />

Sequence is transmitted/received first. This frame check<br />

sequence, implemented in the CAN-controller is derived<br />

from a cyclic redundancy code best suited for frames with<br />

a total bit count of less than 127 bits, see Section 13.6.8.3.<br />

With Start-Of-Frame (dominant bit) included in the code<br />

word, any rotation of the code word can be detected by the<br />

absence of the CRC Delimiter (recessive bit).<br />

1996 Jun 27 55<br />

13.6.2.8 Acknowledge Field (ACK)<br />

The Acknowledge Field consists of two bits, the<br />

Acknowledge Slot and the Acknowledge Delimiter, which<br />

are transmitted with a recessive level by the transmitter of<br />

the Data Frame. All CAN-controllers having received the<br />

matching CRC Sequence, report this by overwriting the<br />

transmitter's recessive bit in the Acknowledge Slot with a<br />

dominant bit. Thereby a transmitter, still monitoring the bus<br />

level recognizes that at least one receiver within the<br />

network has received a complete and correct message<br />

(i.e. no error was found). The Acknowledge Delimiter<br />

(recessive bit) is the second bit of the Acknowledge Field.<br />

As a result, the Acknowledge Slot is surrounded by two<br />

recessive bits: the CRC Delimiter and the Acknowledge<br />

Delimiter.<br />

All nodes within a CAN network may use all the information<br />

coming to the network by all CAN-controllers (shared<br />

memory concept). Therefore, acknowledgement and error<br />

handling are defined to provide all information in a<br />

consistent way throughout this shared memory. Hence,<br />

there is no reason to discriminate different receivers of a<br />

message in the acknowledge field. If a node is<br />

disconnected from the network due to bus failure, this<br />

particular node is no longer part of the shared memory. To<br />

identify a ‘lost node’ additional and application specific<br />

precautions are required.<br />

13.6.2.9 End-Of-Frame<br />

Each Data Frame or Remote Frame is delimited by the<br />

End-Of-Frame bit sequence which consists of seven<br />

recessive bits (exceeds the bit stuff width by two bits).<br />

Using this method a receiver detects the end of a frame<br />

independent of a previous transmission error because the<br />

receiver expects all bits up to the end of the CRC<br />

Sequence to be coded by the method of bit-stuffing, see<br />

Section 13.6.7.3. The bit-stuffing logic is deactivated<br />

during the End-Of-Frame sequence.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

INTER-FRAME SPACE<br />

or OVERLOAD FRAME<br />

1996 Jun 27 56<br />

<strong>DATA</strong> FRAME<br />

INTER-FRAME<br />

SPACE<br />

recessive level<br />

dominant level<br />

ACKNOWLEDGE<br />

FIELD:<br />

ACK Slot<br />

ACK Delimiter<br />

START - OF-<br />

FRAME<br />

MGA164<br />

END - OF -<br />

FRAME<br />

CONTROL FIELD:<br />

Reserved bits<br />

Data Length Code<br />

ARBITRATION<br />

FIELD:<br />

Identifier<br />

RTR bit<br />

CRC FIELD:<br />

CRC Sequence<br />

CRC Delimiter<br />

<strong>DATA</strong> FIELD:<br />

0 to 8 bytes<br />

Fig.19 Data Frame.<br />

handbook, full pagewidth


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.3 REMOTE FRAME<br />

A CAN-controller acting as a receiver for certain<br />

information may initiate the transmission of the respective<br />

data by transmitting a Remote Frame to the network,<br />

addressing the data source via the Identifier and setting<br />

the RTR bit HIGH (remote; recessive bus level). The<br />

Remote Frame is similar to the Data Frame with the<br />

following exceptions:<br />

• RTR bit is set HIGH<br />

• Data Length Code is ignored<br />

• No Data Field contained.<br />

Note that the value of the Data Length Code should be the<br />

one of the corresponding Data Frame, although it is<br />

ignored for a Remote Frame.<br />

A Remote Frame is composed of six different bit fields:<br />

• Start-of-Frame<br />

• Arbitration Field<br />

• Control Field<br />

• CRC Field<br />

• Acknowledge Field<br />

• End-Of-Frame.<br />

See Section 13.6.2 for more detailed explanation of the<br />

Remote Frame bit fields.<br />

13.6.4 ERROR FRAME<br />

The Error Frame consists of two different fields:<br />

• The first field, accomplished by the superimposing of<br />

Error Flags contributed from different CAN-controllers<br />

• The second field is the Error Delimiter.<br />

13.6.4.1 Error Flag<br />

There are two forms of an Error Flag:<br />

• Active Error Flag, consists of six consecutive<br />

dominant bits.<br />

• Passive Error Flag, consists of six consecutive<br />

recessive bits unless it is overwritten by dominant bits<br />

from other CAN-controllers.<br />

An error-active CAN-controller (see Section 13.6.9)<br />

detecting an error condition signals this by transmission of<br />

an Active Error Flag. This Error Flag's form violates the<br />

bit-stuffing rule (see Section 13.6.7) applied to all fields,<br />

1996 Jun 27 57<br />

from Start-Of-Frame to CRC Delimiter, or destroys the<br />

fixed form of the fields Acknowledge Field or<br />

End-Of-Frame (see Fig.20).<br />

Consequently, all other CAN-controllers detect an error<br />

condition and start transmission of an Error Flag.<br />

Therefore the sequence of dominant bits, which can be<br />

monitored on the bus, results from a superposition of<br />

different Error Flags transmitted by individual<br />

CAN-controllers. The total length of this sequence varies<br />

between six (minimum) and twelve (maximum) bits.<br />

An error-passive CAN-controller (see Section 13.6.9)<br />

detecting an error condition tries to signal this by<br />

transmission of a Passive Error Flag. The error-passive<br />

CAN-controller waits for six consecutive bits with identical<br />

polarity, beginning at the start of the Passive Error Flag.<br />

The Passive Error Flag is complete when these six<br />

identical bits have been detected.<br />

13.6.4.2 Error Delimiter<br />

The Error Delimiter consists of eight recessive bits and has<br />

the same format as the Overload Delimiter. After<br />

transmission of an Error Flag, each CAN-controller<br />

monitors the bus-line until it detects a transition from a<br />

dominant-to-recessive bit level. At this point in time, every<br />

CAN-controller has finished sending its Error Flag and has<br />

additionally sent the first out of the 8 recessive bits of the<br />

Error Delimiter. Afterwards all CAN-controllers transmit the<br />

remaining recessive bits. After this event and an<br />

Intermission Field all error-active CAN-controllers within<br />

the network can start a transmission simultaneously.<br />

If a detected error is signalled during transmission of a<br />

Data Frame or Remote Frame, the current message is<br />

spoiled and a retransmission of the message is initiated.<br />

If a CAN-controller monitors any deviation of the Error<br />

Frame, a new Error Frame will be transmitted. Several<br />

consecutive Error Frames may result in the CAN-controller<br />

becoming error-passive and leaving the network<br />

unblocked.<br />

In order to terminate an Error Flag correctly, an<br />

error-passive CAN-controller requires the bus to be<br />

Bus-Idle (see Section 13.6.6) for at least three bit periods<br />

(if there is a local error at an error-passive-receiver).<br />

Therefore a CAN-bus should not be 100% permanently<br />

loaded.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

<strong>DATA</strong> FRAME ERROR FRAME<br />

handbook, full pagewidth<br />

13.6.5 OVERLOAD FRAME<br />

The Overload Frame consists of two fields:<br />

• The Overload Flag<br />

• The Overload Delimiter.<br />

1 ERROR<br />

FLAG<br />

superimposing of<br />

ERROR FLAGs<br />

The transmission of an Overload Frame may only start:<br />

• Condition 1; during the first bit period of an expected<br />

Intermission Field.<br />

• Condition 2; one bit period after detecting the dominant<br />

bit during Intermission Field.<br />

The P8xC592's on-chip CAN-controller will never initiate<br />

transmission of a condition 1 Overload Frame and will only<br />

react on a transmitted condition 2 Overload Frame,<br />

according to the CAN-protocol. No more than two<br />

Overload Frames are generated to delay a Data Frame or<br />

a Remote Frame. Although the overall form of the<br />

Overload Frame corresponds to that of the Error Frame,<br />

an Overload Frame does not initiate or require the<br />

retransmission of the preceding frame.<br />

Fig.20 Error Frame.<br />

1996 Jun 27 58<br />

ERROR DELIMITER<br />

13.6.5.1 Overload Flag<br />

INTER-FRAME SPACE<br />

or OVERLOAD FRAME<br />

MGA165<br />

The Overload Flag consists of six dominant bits and has a<br />

similar format to the Error Flag.<br />

There are two conditions in the CAN-protocol which lead<br />

to the transmission of an Overload Flag:<br />

• Condition 1; receiver circuitry requires more time to<br />

process the current data before receiving the next frame<br />

(receiver not ready).<br />

• Condition 2; detection of a dominant bit during<br />

Intermission Field (see Section 13.6.6).<br />

The Overload Flag's form corrupts the fixed form of the<br />

Intermission Field. All other CAN-controllers detecting the<br />

overload condition also transmit an Overload Flag<br />

(condition 2).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.5.2 Overload Delimiter<br />

The Overload Delimiter consists of eight recessive bits and<br />

takes the same form as the Error Delimiter. After<br />

transmission of an Overload Flag, each CAN-controller<br />

monitors the bus-line until it detects a transition from a<br />

dominant-to-recessive bit level. At this point in time, every<br />

CAN-controller has finished sending its Overload Flag and<br />

all CAN-controllers start simultaneously transmitting seven<br />

more recessive bits.<br />

13.6.6 INTER-FRAME SPACE<br />

Data Frames and Remote Frames are separated from<br />

preceding frames (all types) by an Inter-Frame Space,<br />

consisting of an Intermission Field and a Bus-Idle.<br />

Error-passive CAN-controllers also send a Suspend<br />

Transmission (see Section 13.6.9) after transmission of a<br />

message. Overload Frames and Error Frames are not<br />

preceded by an Inter-Frame Space.<br />

13.6.6.1 Intermission Field<br />

The Intermission Field consists of three recessive bits.<br />

During an Intermission period, no frame transmissions will<br />

be started by the P8xC592's on-chip CAN-controller. An<br />

Intermission is required to have a fixed time period to allow<br />

a CAN-controller to execute internal processes prior to the<br />

next receive or transmit task.<br />

13.6.6.2 Bus-Idle<br />

The Bus-Idle time may be of arbitrary length (min. 0 bit).<br />

The bus is recognized to be free and a CAN-controller<br />

having information to transmit may access the bus. The<br />

detection of a dominant bit level during Bus-Idle on the bus<br />

is interpreted as the Start-Of-Frame.<br />

13.6.7 BUS ORGANIZATION<br />

Bus organization is based on five basic rules described in<br />

the following subsections.<br />

13.6.7.1 Bus Access<br />

CAN-controllers only start transmission during the<br />

Bus-Idle state. All CAN-controllers synchronize on the<br />

leading edge of the Start-Of-Frame<br />

(hard synchronization).<br />

13.6.7.2 Bus Arbitration<br />

If two or more CAN-controllers simultaneously start<br />

transmitting, the bus access conflict is solved by a bit-wise<br />

arbitration process during transmission of the Arbitration<br />

Field.<br />

1996 Jun 27 59<br />

During arbitration every transmitting CAN-controller<br />

compares its transmitted bit level with the monitored bus<br />

level. Any CAN-controller which transmits a recessive bit<br />

and monitors a dominant bus level immediately becomes<br />

the receiver of the higher-priority message on the bus<br />

without corrupting any information on the bus. Each<br />

message contains an unique Identifier and a RTR bit<br />

describing the type of data within the message. The<br />

Identifier together with the RTR bit implicitly define the<br />

message's bus access priority. During arbitration the most<br />

significant bit of the Identifier is transmitted first and the<br />

RTR bit last. The message with the lowest binary value of<br />

the Identifier and RTR bit has the highest priority. A Data<br />

Frame has higher priority than a Remote Frame due to its<br />

RTR bit having a dominant level.<br />

For every Data Frame there is an unique transmitter. For<br />

reasons of compatibility with other CAN-bus controllers,<br />

use of the Identifier bit pattern ID = 1111111XXXXB<br />

(X being bits of arbitrary level) is forbidden.<br />

The number of available different Identifiers:<br />

211 24 ( – ) =<br />

2032.<br />

13.6.7.3 Coding/Decoding<br />

The following bit fields are coded using the bit-stuffing<br />

technique:<br />

• Start-Of-Frame<br />

• Arbitration Field<br />

• Control Field<br />

• Data Field<br />

• CRC Sequence.<br />

When a transmitting CAN-controller detects five<br />

consecutive bits of identical polarity to be transmitted, a<br />

complementary (stuff) bit is inserted into the transmitted<br />

bit-stream.<br />

When a receiving CAN-controller has monitored five<br />

consecutive bits with identical polarity in the received bit<br />

streams of the above described bit fields, it automatically<br />

deletes the next received (stuff) bit. The level of the<br />

deleted stuff bit has to be the complement of the previous<br />

bits; otherwise a Stuff Error will be detected and signalled<br />

(see Section 13.6.8).<br />

The remaining bit fields or frames are of fixed form and are<br />

not coded or decoded by the method of bit-stuffing.<br />

The bit-stream in a message is coded according to the<br />

Non-Return-to-Zero (NRZ) method, i.e. during a bit period,<br />

the bit level is held constant, either recessive or dominant.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.7.4 Error Signalling<br />

A CAN-controller which detects an error condition,<br />

transmits an Error Flag. Whenever a Bit Error, Stuff Error,<br />

Form Error or an Acknowledgement Error is detected,<br />

transmission of an Error Flag is started at the next bit.<br />

Whenever a CRC Error is detected, transmission of an<br />

Error Flag starts at the bit following the Acknowledge<br />

Delimiter, unless an Error Flag for another error condition<br />

has already started. An Error Flag violates the bit-stuffing<br />

law or corrupts the fixed form bit fields. A violation of the<br />

bit-stuffing law affects any CAN-controller which detects<br />

the error condition. These devices will also transmit an<br />

Error Flag.<br />

An error-passive CAN-controller (see Section 13.6.9)<br />

which detects an error condition, transmits a Passive Error<br />

Flag. A Passive Error Flag is not able to interrupt a current<br />

message at different CAN-controllers but this type of Error<br />

Flag may be ignored (overwritten) by other<br />

CAN-controllers. After having detected an error condition,<br />

an error-passive CAN-controller will wait for six<br />

consecutive bits with identical polarity and when<br />

monitoring them, interpret them as an Error Flag.<br />

After transmission of an Error Flag, each CAN-controller<br />

monitors the bus-line until it detects a transition from a<br />

dominant-to-recessive bit level. At this point in time, every<br />

CAN-controller has finished transmitting its Error Flag and<br />

all CAN-controllers start transmitting seven additional<br />

recessive bits (Error Delimiter, see Section 13.6.4).<br />

The message format of a Data Frame or Remote Frame is<br />

defined in such a way that all detectable errors can be<br />

signalled within the message transmission time and<br />

therefore it is very simple for the CAN-controllers to<br />

associate an Error Frame to the corresponding message<br />

and to initiate retransmission of the corrupted message. If<br />

a CAN-controller monitors any deviation of the fixed form<br />

of an Error Frame, it transmits a new Error Frame.<br />

13.6.7.5 Overload Signalling<br />

Some CAN-controllers (but not the one on-chip of the<br />

P8xC592) require to delay the transmission of the next<br />

Data Frame or Remote Frame by transmitting one or more<br />

Overload Frames. The transmission of an Overload Frame<br />

must start during the first bit of an expected Intermission<br />

Field. Transmission of Overload Frames which are<br />

reactions on a dominant bit during an expected<br />

Intermission Field, start one bit after this event.<br />

Though the format of Overload Frame and Error Frame are<br />

identical, they are treated differently. Transmission of an<br />

Overload Frame during Intermission Field does not initiate<br />

1996 Jun 27 60<br />

the retransmission of any previous Data Frame or Remote<br />

Frame. If a CAN-controller which transmitted an Overload<br />

Frame monitors any deviation of its fixed form, it transmits<br />

an Error Frame.<br />

13.6.8 ERROR DETECTION<br />

The processes described in Sections 13.6.8.1 to 13.6.10.3<br />

are implemented in the P8xC592's on-chip CAN-controller<br />

for error detection.<br />

13.6.8.1 Bit Error<br />

A transmitting CAN-controller monitors the bus on a<br />

bit-by-bit basis. If the bit level monitored is different from<br />

the transmitted one, a Bit Error is signalled.<br />

The exceptions being:<br />

• During the Arbitration Field, a recessive bit can be<br />

overwritten by a dominant bit. In this case, the<br />

CAN-controller interprets this as a loss of arbitration.<br />

• During the Acknowledge Slot, only the receiving<br />

CAN-controllers are able to recognize a Bit Error.<br />

13.6.8.2 Stuff Error<br />

The following bit fields are coded using the bit-stuffing<br />

technique:<br />

• Start-Of-Frame<br />

• Arbitration Field<br />

• Control Field<br />

• Data Field<br />

• CRC Sequence.<br />

There are two possible ways of generating a Stuff Error:<br />

• A disturbance generates more than the allowed five<br />

consecutive bits with identical polarity. These errors are<br />

detected by all CAN-controllers.<br />

• A disturbance falsifies one or more of the five bits<br />

preceding the stuff bit. This error situation is not<br />

recognized as a Stuff Error by the receivers. Therefore,<br />

other error detection processes may detect this error<br />

condition such as:<br />

– CRC check, format violation at the receiving<br />

CAN-controllers, or<br />

– Bit Error detection by the transmitting CAN-controller.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.8.3 CRC Error<br />

To ensure the validity of a transmitted message all<br />

receivers perform a CRC check. Therefore, in addition to<br />

the (destuffed) information digits (Start-Of-Frame up to<br />

Data Field), every message includes some control digits<br />

(CRC Sequence; generated by the transmitting<br />

CAN-controller of the respective message) used for error<br />

detection.<br />

The code used by all CAN-controllers is a (shortened)<br />

BCH code, extended by a parity check and has the<br />

following attributes:<br />

• 127 bits as maximum length of the code.<br />

• 112 bits as maximum number of information digits<br />

(max. 83 bits are used by the CAN-controller).<br />

• Length of the CRC Sequence amounts to 15 bits.<br />

• Hamming distance d = 6.<br />

As a result, ‘(d−1)’ random errors are detectable (some<br />

exceptions exist).<br />

The CRC Sequence is determined (calculated) by the<br />

following procedure:<br />

1. The destuffed bit stream consisting of Start-Of-Frame<br />

up to the Data Field (if present) is interpreted as<br />

polynomial with coefficients 0 or 1.<br />

2. This polynomial is divided (modulo-2) by the following<br />

generator polynomial, which includes a parity check:<br />

fx () x14 x9 x8 x6 x5 x4 x2 = ( + + + + + + + x + 1)<br />

(x + 1) = 1100010110011001 B.<br />

3. The remainder of this polynomial division is the<br />

CRC Sequence.<br />

Burst errors are detected up to a length of 15<br />

[degree of f(x)]. Multiple errors (number of disturbed bits at<br />

least d = 6) are not detected with a residual error<br />

probability of 2 by CRC check only.<br />

15 – 3 10 5 – ( × )<br />

13.6.8.4 Form Error<br />

Form Errors result from violations of the fixed form of the<br />

following bit fields:<br />

• CRC Delimiter<br />

• Acknowledge Delimiter<br />

• End-Of-Frame<br />

• Error Delimiter<br />

• Overload Delimiter.<br />

During the transmission of these bit fields an error<br />

condition is recognized if a dominant bit level instead of a<br />

recessive one is detected.<br />

1996 Jun 27 61<br />

13.6.8.5 Acknowledgement Error<br />

This is detected by a transmitter whenever it does not<br />

monitor a dominant bit during the Acknowledge Slot.<br />

13.6.8.6 Error detection by an Error Flag from<br />

another CAN-controller<br />

The detection of an error is signalled by transmitting an<br />

Error Flag. An Active Error Flag causes a Stuff Error, a Bit<br />

Error or a Form Error at all other CAN-controllers.<br />

13.6.8.7 Error Detection Capabilities<br />

Errors which occur at all CAN-controllers (global errors)<br />

are 100% detected. For local errors, i.e. for errors<br />

occurring at some CAN-controllers only, the shortened<br />

BCH code, extended by a parity check, has the following<br />

error detection capabilities:<br />

• Up to five single Bit Errors are 100% detected, even if<br />

they are distributed randomly within the code.<br />

• All single Bit Errors are detected if their total number<br />

(within the code) is odd.<br />

• The residual error probability of the CRC check amounts<br />

to (3 × 10−5 ). As an error may be detected not only by<br />

CRC check but also by other detection processes<br />

described above the residual error probability is several<br />

magnitudes less than (3 × 10−5 ).<br />

13.6.9 ERROR CONFINEMENT DEFINITIONS<br />

13.6.9.1 Bus-OFF<br />

A CAN-controller which has too many unsuccessful<br />

transmissions, relative to the number of successful<br />

transmissions, will enter the Bus-OFF state. It remains in<br />

this state, neither receiving nor transmitting messages<br />

until the Reset Request bit is set LOW (absent) and both<br />

Error Counters set to 0 (see Section 13.6.10).<br />

13.6.9.2 Acknowledge<br />

A CAN-controller which has received a valid message<br />

correctly, indicates this to the transmitter by transmitting a<br />

dominant bit level on the bus during the Acknowledge Slot,<br />

independent of accepting or rejecting the message.<br />

13.6.9.3 Error-Active<br />

An error-active CAN-controller in its normal operating state<br />

is able to receive and to transmit normally and also to<br />

transmit an Active Error Flag (see Section 13.6.10).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

13.6.9.4 Error-Passive<br />

An error-passive CAN-controller may transmit or receive<br />

messages normally. In the case of a detected error<br />

condition it transmits a Passive Error Flag instead of an<br />

Active Error Flag. Hence the influence on bus activities by<br />

an error-active CAN-controller (e.g. due to a malfunction)<br />

is reduced.<br />

13.6.9.5 Suspend Transmission<br />

After an error-passive CAN-controller has transmitted a<br />

message, it sends eight recessive bits after the<br />

Intermission Field and then checks for Bus-Idle. If during<br />

Suspend Transmission another CAN-controller starts<br />

transmitting a message the suspended CAN-controller will<br />

become the receiver of this message; otherwise being in<br />

Bus-Idle it may start to transmit a further message.<br />

13.6.9.6 Start-Up<br />

A CAN-controller which either was switched off or in the<br />

Bus-OFF state, must run a Start-Up routine in order to:<br />

• Synchronize with other available CAN-controllers before<br />

starting to transmit. Synchronization is achieved, when<br />

11 recessive bits, equivalent to Acknowledge Delimiter,<br />

End-Of-Frame and Intermission Field, have been<br />

detected (Bus-Free).<br />

• Wait for other CAN-controllers without passing into the<br />

Bus-OFF state (due to a missing acknowledge), if there<br />

is no other CAN-controller currently available.<br />

13.6.10 AIMS OF ERROR CONFINEMENT<br />

13.6.10.1 Distinction of short and long disturbances<br />

The CPU must be informed when there are long<br />

disturbances and when bus activities have returned to<br />

normal operation. During long disturbances, a<br />

CAN-controller enters the Bus-OFF state and the CPU<br />

may use default values.<br />

Minor disturbances of bus activities will not effect a<br />

CAN-controller. In particular, a CAN-controller does not<br />

enter the Bus-OFF state or inform the CPU of a short bus<br />

disturbance.<br />

1996 Jun 27 62<br />

13.6.10.2 Detection and localization of hardware<br />

disturbances and defects<br />

The rules for error confinement are defined by the<br />

CAN-protocol specification (and implemented in the<br />

P8xC592's on-chip CAN-controller), in such a way that the<br />

CAN-controller, being nearest to the error-locus, reacts<br />

with a high probability the quickest (i.e. becomes<br />

error-passive or Bus-OFF). Hence errors can be localized<br />

and their influence on normal bus activities is minimized.<br />

13.6.10.3 Error Confinement<br />

All CAN-controllers contain a Transmit Error Counter and<br />

a Receive Error Counter, which registers errors during the<br />

transmission and the reception of messages, respectively.<br />

If a message is transmitted or received correctly, the count<br />

is decreased. In the event of an error, the count is<br />

increased. The Error Counters have an non-proportional<br />

method of counting: an error causes a larger counter<br />

increase than a correctly transmitted/received message<br />

causes the count to decrease. Over a period of time this<br />

may result in an increase in error counts, even if there are<br />

fewer corrupted messages than uncorrupted ones. The<br />

level of the Error Counters reflect the relative frequency of<br />

disturbances. The ratio of increase/decrease depends on<br />

the acceptable ratio of invalid/valid messages on the bus<br />

and is hardware implemented to eight.<br />

If one of the Error Counters exceeds the Warning Limit of<br />

96 error points, indicating a significant accumulation of<br />

error conditions, this is signalled by the CAN-controller<br />

(Error Status, Error Interrupt).<br />

A CAN-controller operates in the error-active mode until it<br />

exceeds 127 error points on one of its Error Counters. At<br />

this value it will enter the error-passive state. A transmit<br />

error which exceeds 255 error points results in the<br />

CAN-controller entering the Bus-OFF state.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

14 INTERRUPT SYSTEM<br />

External events and the real-time-driven on-chip<br />

peripherals require service by the CPU asynchronous to<br />

the execution of any particular section of code. To tie the<br />

asynchronous activities of these functions to normal<br />

program execution a multiple-source, two-priority-level,<br />

nested interrupt system is provided. Interrupt response<br />

latency is from 2.25 μs to7.5μs when using a 16 MHz<br />

crystal. The latency time strongly depends on the<br />

sequence of instructions executed directly after an<br />

interrupt request. During a CAN-DMA transfer the interrupt<br />

system is disabled (see Section 13.5.17). The P8xC592<br />

acknowledges interrupt requests from fifteen sources as<br />

follows:<br />

• INT0 and INT1: externally via pins 27 and 28<br />

respectively<br />

• Timer 0 and Timer 1: from the two internal counters<br />

– If the capture function remains unused and the<br />

Capture Register contents are ‘don't care’ then the<br />

corresponding input pins ‘CTnI’, with ‘n = 0 ... 3’, may<br />

be used as positive and/or negative edge triggered<br />

external interrupts INT2 to INT5. But note that they<br />

can not terminate the Idle mode because the Timer 2<br />

is switched off then<br />

• Timer T2, 8 separate interrupts:<br />

– 4 capture interrupts<br />

– 3 compare interrupts<br />

– an overflow interrupt<br />

• ADC end-of-conversion interrupt<br />

• CAN-controller interrupt<br />

• UART serial I/O port interrupt.<br />

Each interrupt vectors to a separate location in Program<br />

Memory for its service program. Each source can be<br />

individually enabled or disabled by a corresponding bit in<br />

the IEN0 or IEN1 register, moreover each interrupt may be<br />

programmed to a HIGH or LOW priority level using a<br />

corresponding bit in the IP0 or IP1 register. Also all<br />

enabled sources can be globally disabled or enabled. Both<br />

external interrupts can be programmed to be<br />

level-activated or transition-activated, and an active LOW<br />

level allows ‘wire-ORing’ of several interrupt sources to the<br />

input pin.<br />

1996 Jun 27 63


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

interrupt<br />

interrupt enable registers<br />

sources source enable global enable<br />

INT0<br />

CT0I<br />

INT1<br />

CT1I<br />

CT2I<br />

CT3I<br />

EXTERNAL<br />

INTERRUPT<br />

REQUEST 0<br />

CAN<br />

SERIAL<br />

PORT 1<br />

ADC<br />

TIMER 0<br />

OVERFLOW<br />

TIMER 2<br />

CAPTURE 0<br />

TIMER 2<br />

COMPARE 0<br />

EXTERNAL<br />

INTERRUPT<br />

REQUEST 1<br />

TIMER 2<br />

CAPTURE 1<br />

TIMER 2<br />

COMPARE 1<br />

TIMER 1<br />

OVERFLOW<br />

TIMER 2<br />

CAPTURE 2<br />

TIMER 2<br />

COMPARE 2<br />

UART<br />

SERIAL<br />

PORT 0<br />

T<br />

R<br />

TIMER 2<br />

CAPTURE 3<br />

TIMER T2<br />

OVERFLOW<br />

Fig.21 Interrupt system.<br />

1996 Jun 27 64<br />

interrupt priority<br />

registers<br />

a1<br />

a2<br />

b1<br />

b2<br />

c1<br />

c2<br />

d1<br />

d2<br />

e1<br />

e2<br />

f1<br />

f2<br />

g1<br />

g2<br />

h1<br />

h2<br />

i1<br />

i2<br />

j1<br />

j2<br />

k1<br />

k2<br />

l1<br />

l2<br />

m1<br />

m2<br />

n1<br />

n2<br />

o1<br />

o2<br />

a1<br />

b1<br />

c1<br />

d1<br />

e1<br />

f1<br />

g1<br />

h1<br />

i1<br />

j1<br />

k1<br />

l1<br />

m1<br />

n1<br />

o1<br />

a2<br />

b2<br />

c2<br />

d2<br />

e2<br />

f2<br />

g2<br />

h2<br />

i2<br />

j2<br />

k2<br />

l2<br />

m2<br />

n2<br />

o2<br />

polling hardware<br />

SOURCE<br />

IDENTIFICATION<br />

SOURCE<br />

IDENTIFICATION<br />

MGA166<br />

high<br />

priority<br />

interrupt<br />

request<br />

vector<br />

low<br />

priority<br />

interrupt<br />

request<br />

vector


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

14.1 Interrupt Enable and Priority Registers<br />

14.1.1 INTERRUPT ENABLE REGISTER 0 (IEN0)<br />

Table 71 Interrupt Enable register 0 (address A8H)<br />

7 6 5 4 3 2 1 0<br />

EA EAD ES1 ES0 ET1 EX1 ET0 EX0<br />

Table 72 Description of the IEN0 bits<br />

BIT SYMBOL FUNCTION<br />

7 EA General enable/disable control. If bit EA is:<br />

LOW, then no interrupt is enabled.<br />

HIGH, then any individually enabled interrupt will be accepted.<br />

6 EAD Enable ADC interrupt.<br />

5 ES1 Enable SIO1 (CAN) interrupt.<br />

4 ES0 Enable SIO0 (UART) interrupt.<br />

3 ET1 Enable Timer 1 interrupt.<br />

2 EX1 Enable External 1 interrupt.<br />

1 ET0 Enable Timer 0 interrupt.<br />

0 EX0 Enable External 0 interrupt.<br />

14.1.2 INTERRUPT ENABLE REGISTER 1 (IEN1)<br />

Table 73 Interrupt Enable register 0 (address E8H)<br />

7 6 5 4 3 2 1 0<br />

ET2 ECM2 ECM1 ECM0 ECT3 ECT2 ECT1 ECT0<br />

Table 74 Description of the IEN1 bits<br />

Logic 0 = interrupt disabled; Logic 1 = interrupt enabled.<br />

BIT SYMBOL FUNCTION<br />

7 ET2 Enable T2 overflow interrupt(s).<br />

6 ECM2 Enable T2 comparator 2 interrupt.<br />

5 ECM1 Enable T2 comparator 1 interrupt.<br />

4 ECM0 Enable T2 comparator 0 interrupt.<br />

3 ECT3 Enable T2 capture register 3 interrupt.<br />

2 ECT1 Enable T2 capture register 2 interrupt.<br />

1 ECT1 Enable T2 capture register 1 interrupt.<br />

0 ECT0 Enable T2 capture register 0 interrupt.<br />

1996 Jun 27 65


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

14.1.3 INTERRUPT PRIORITY REGISTER 0 (IP0)<br />

Table 75 Interrupt Priority register 0 (address B8H)<br />

7 6 5 4 3 2 1 0<br />

− PAD PS1 PS0 PT1 PX1 PT0 PX0<br />

Table 76 Description of the IP0 bits<br />

BIT SYMBOL FUNCTION<br />

7 − Not used.<br />

6 PAD ADC interrupt priority level.<br />

5 PS1 SIO1 (CAN) interrupt priority level.<br />

4 PS0 SIO0 (UART) interrupt priority level.<br />

3 PT1 Timer 1 interrupt priority level.<br />

2 PX1 External interrupt 1 priority level.<br />

1 PT0 Timer 0 interrupt priority level.<br />

0 PX0 External interrupt 0 priority level.<br />

14.1.4 INTERRUPT PRIORITY REGISTER 1 (IP1)<br />

Table 77 Interrupt Priority register 1 (address F8H)<br />

7 6 5 4 3 2 1 0<br />

PT2 PCM2 PCM1 PCM0 PCT3 PCT2 PCT1 PCT0<br />

Table 78 Description of the IP1 bits<br />

Logic 0 = low priority; Logic 1 = high priority.<br />

BIT SYMBOL FUNCTION<br />

7 PT2 T2 overflow interrupt(s) priority level.<br />

6 PCM2 T2 comparator 2 priority interrupt level.<br />

5 PCM1 T2 comparator 1 priority interrupt level.<br />

4 PCM0 T2 comparator 0 priority interrupt level.<br />

3 PCT3 T2 capture register 3 priority interrupt level.<br />

2 PCT2 T2 capture register 2 priority interrupt level.<br />

1 PCT1 T2 capture register 1 priority interrupt level.<br />

0 PCT0 T2 capture register 0 priority interrupt level.<br />

1996 Jun 27 66


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

14.2 Interrupt Vectors<br />

The vector indicates the Program Memory location where<br />

the appropriate interrupt service routine starts<br />

(see Table 79).<br />

Table 79 Interrupt vectors<br />

SOURCE BIT VECTOR<br />

External 0 X0 0003H<br />

Timer 0 overflow T0 000BH<br />

External 1 X1 0013H<br />

Timer 1 overflow T1 001BH<br />

Serial I/O 0 (UART) S0 0023H<br />

Serial I/O 1 (CAN) S1 002BH<br />

T2 capture 0 CT0 0033H<br />

T2 capture 1 CT1 003BH<br />

T2 capture 2 CT2 0043H<br />

T2 capture 3 CT3 004BH<br />

ADC completion ADC 0053H<br />

T2 compare 0 CM0 005BH<br />

T2 compare 1 CM1 0063H<br />

T2 compare 2 CM2 006BH<br />

T2 overflow T2 0073H<br />

handbook, full pagewidth<br />

XTAL2<br />

OSCILLATOR<br />

1996 Jun 27 67<br />

PD<br />

XTAL1<br />

sleep<br />

14.3 Interrupt Priority<br />

Each interrupt source can be either high priority or low<br />

priority. If both priorities are requested simultaneously, the<br />

processor will branch to the high priority vector. If there are<br />

simultaneous requests from sources of the same priority,<br />

then interrupts will be serviced in the following order:<br />

X0, S1, ADC, T0, CT0, CM0, X1, CT1, CM1, T1, CT2,<br />

CM2, S0, CT3, T2.<br />

A low priority interrupt routine can only be interrupted by a<br />

high priority interrupt. A high priority interrupt routine can<br />

not be interrupted.<br />

15 POWER REDUCTION MODES<br />

The P8xC592 has three software-selectable modes to<br />

reduce power consumption. These are:<br />

• Sleep mode, affecting the CAN-controller only<br />

• Idle mode, affecting the<br />

– CPU (halted)<br />

– Timer 2 (stopped and reset)<br />

– PWM0, PWM1 (reset, output = HIGH)<br />

– ADC (aborted if in progress)<br />

• Power-down mode, affecting the whole P8xC592<br />

device.<br />

CLOCK<br />

GENERATOR<br />

IDL<br />

interrupts<br />

serial ports<br />

timer blocks<br />

Fig.22 Internal Sleep, Idle and Power-down clock configuration.<br />

CAN<br />

CPU<br />

T2<br />

PWM<br />

ADC<br />

MGA167


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

15.1 Power Control Register (PCON)<br />

Table 80 Power Control Register (address 87H)<br />

7 6 5 4 3 2 1 0<br />

SMOD − − WLE GF1 GF0 PD IDL<br />

Table 81 Description of the PCON bits<br />

BIT SYMBOL FUNCTION<br />

7 SMOD Double baud rate bit. When set to logic 1 the baud rate is doubled when the serial port<br />

SIO0 is being used in Modes 1, 2 and 3.<br />

6 − Reserved.<br />

5 −<br />

4 WLE Watchdog Load Enable. This flag must be set by software prior to loading T3<br />

(Watchdog timer). It is cleared when T3 is loaded.<br />

3 GF1 General purpose flag bits.<br />

2 GF0<br />

1 PD Power-down bit. Setting this bit activates Power-down mode (note 1). It can only be set<br />

if input EW is HIGH.<br />

0 IDL Idle mode bit. Setting this bit activates the Idle mode (note 1).<br />

Note<br />

1. If PD and IDL are set to HIGH at the same time, PD takes precedence. The reset value of PCON is 0XX00000B.<br />

15.2 CAN Sleep Mode<br />

In order to reduce power consumption of the P8xC592 the<br />

CAN-controller may be switched off (disconnecting the<br />

internal clock) by setting the CAN Command Register bit 4<br />

(Sleep) HIGH. The CAN-controller leaves this Sleep mode<br />

by detecting either activity on the CAN-bus (dominant<br />

bit-level on CRX0/CRX1; see Chapter 5, Table 1) or by<br />

setting the Sleep bit to LOW. As the CPU can not only write<br />

to the Sleep bit, but can also read it, the CAN-controller<br />

status can be determined directly.<br />

15.3 Idle Mode<br />

The instruction that sets bit PCON.0 to HIGH is the last<br />

one executed in the normal operating mode before Idle<br />

mode is activated.<br />

Once in the Idle mode, the CPU status is preserved in its<br />

entirety: the Stack Pointer, Program Counter, Program<br />

Status Word, Accumulator, RAM and all other registers<br />

maintain their data during Idle mode. The status of the<br />

external pins during Idle mode is shown in see Table 82.<br />

1996 Jun 27 68<br />

There are three ways to terminate the Idle mode:<br />

• Activation of any enabled interrupt will cause PCON.0 to<br />

be cleared by hardware, provided that the interrupt<br />

source is active during Idle mode. After the interrupt is<br />

serviced, the program continues with the instruction<br />

immediately after the one, at which the interrupt request<br />

was detected.<br />

• The flag bits GF0 and GF1 may be used to determine<br />

whether the interrupt was received during normal<br />

execution or during the Idle mode. For example, the<br />

instruction that writes to PCON.0 can also set or clear<br />

one or both flag bits. When Idle mode is terminated by<br />

an interrupt, the service routine can examine the status<br />

of the flag bits.<br />

• Another way of terminating the Idle mode is an external<br />

hardware reset. Since the oscillator is still running, the<br />

reset signal is required to be active only for two machine<br />

cycles (24 oscillator periods) to complete the reset<br />

operation.<br />

• The third way is the internally generated watchdog reset<br />

after an overflow of Timer 3.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

15.4 Power-down Mode<br />

The instruction that sets bit PCON.1 to HIGH, is the last<br />

one executed before entering the Power-down mode. In<br />

Power-down mode the oscillator of the P8xC592 is<br />

stopped. If the CAN-controller is in use, it is recommended<br />

to set it into Sleep mode before entering Power-down<br />

mode. However, setting PCON.1 to HIGH also sets the<br />

Sleep bit (CAN-controller Command Register bit 4) to<br />

HIGH.<br />

The P8xC592 leaves Power-down mode either by a<br />

hardware reset or by a CAN Wake-Up interrupt<br />

(due to activity on the CAN-bus),<br />

if the SIO1 (CAN) interrupt source is enabled<br />

(contents of register IEN0 = 1X1XXXXXB).<br />

Table 82 Status of external pins during Idle and Power-down modes<br />

1996 Jun 27 69<br />

A hardware reset affects the whole P8xC592, but leaves<br />

the contents of the on-chip RAM unchanged<br />

(CAN-controller-and CPU's SFRs are reset, see<br />

Section 13.5.2, Chapter 17 and Table 40). A CAN<br />

Wake-Up interrupt during Power-down mode causes a<br />

reset output pulse with a width of 6144 machine cycles<br />

(4.6 ms with fCLK = 16 MHz). All hardware except that for<br />

the CAN-controller of the P8xC592 is reset (i.e. the<br />

contents of all CAN-controller registers are preserved).<br />

A capacitance connected to the RST pin can be used to<br />

lengthen the internally generated reset pulse. If the pulse<br />

exceeds 8192 machine cycles, the CAN-controller part is<br />

reset too.<br />

MODE PROGRAM ALE PSEN PORT0 PORT1 (1) PORT2 PORT3 PORT4<br />

PWM0/<br />

PWM1<br />

Idle internal 1 1 port data port data port data port data port data 1<br />

external 1 1 floating port data address port data port data 1<br />

Power-down internal 0 0 port data port data port data port data port data 1<br />

external 0 0 floating port data port data port data port data 1<br />

Note<br />

1. If the port pins P1.6 and P1.7 are used as the CAN transmitter outputs (CTX0 and CTX1), then during Sleep and<br />

Power-down mode these pins output a ‘recessive’ level (see Sections 13.5.2 and 13.5.11).


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

16 OSCILLATOR CIRCUITRY<br />

The oscillator circuitry of the P8xC592 is a single-stage<br />

inverting amplifier in a Pierce oscillator configuration. The<br />

circuitry between XTAL1 and XTAL2 is basically an<br />

inverter biased to the transfer point. Either a crystal or<br />

ceramic resonator can be used as the feedback element to<br />

complete the oscillator circuitry. Both are operated in<br />

parallel resonance. XTAL1 (pin 34) is the high gain<br />

amplifier input, and XTAL2 (pin 33) is the output<br />

(see Fig.23). If XTAL1 is driven from an external source,<br />

XTAL2 must be left open (see Fig.24).<br />

17 RESET CIRCUITRY<br />

The reset pin RST is connected to a Schmitt trigger for<br />

noise rejection (see Fig.25). A reset is accomplished by<br />

holding the RST pin HIGH for at least two machine cycles<br />

(24 oscillator periods). The CPU responds by executing an<br />

internal reset. During reset ALE and PSEN output a HIGH<br />

level. In order to perform a correct reset, this level must not<br />

be affected by external elements.<br />

Also with the P8xC592, the RST line can be pulled HIGH<br />

internally by a pull-up transistor activated by the Watchdog<br />

timer T3. The length of the output pulse from T3 is<br />

3 machine cycles. A pulse of such short duration is<br />

necessary in order to recover from a processor or system<br />

fault as fast as possible.<br />

During Power-down a reset could be generated internally<br />

via the CAN Wake-Up interrupt. Then the RST pin is pulled<br />

HIGH for 6144 machine cycles. In this case the<br />

CAN-controller is not reset.<br />

If the Watchdog timer or the CAN Wake-Up interrupt is<br />

used to reset external devices, the usual capacitor<br />

arrangement for Power-on-reset (see Fig.26) should not<br />

be used.<br />

However, the internal reset is forced, independent of the<br />

external level on the RST pin.<br />

The MAIN RAM and AUXILIARY RAM are not affected.<br />

When VDD is turned on, the RAM content is indeterminate.<br />

A reset leaves the internal registers as shown in Table 83.<br />

1996 Jun 27 70<br />

handbook, halfpage C1<br />

20 pF<br />

C2<br />

20 pF<br />

XTAL1<br />

XTAL2<br />

MLA888<br />

34<br />

33<br />

Fig.23 P8xC592 oscillator circuit.<br />

handbook, halfpage<br />

external clock<br />

(not TTL compatible)<br />

not connected<br />

XTAL1<br />

XTAL2<br />

MLA889<br />

Fig.24 Driving P8xC592 from an external source.<br />

handbook, halfpage V<br />

DD<br />

RST<br />

RRST<br />

on-chip<br />

34<br />

33<br />

overflow timer T3<br />

wake-up reset<br />

CAN<br />

CPU<br />

Fig.25 On-chip reset configuration.<br />

MGA170 - 1


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 83 Internal registers' contents after a reset<br />

X = undefined state.<br />

REGISTER 7 6 5 4 3 2 1 0<br />

CPU part<br />

ACC 0 0 0 0 0 0 0 0<br />

ADC0 X X 0 0 0 0 0 0<br />

ADCH X X X X X X X X<br />

B 0 0 0 0 0 0 0 0<br />

CML0 to CML2 0 0 0 0 0 0 0 0<br />

CMH0 to CMH2 0 0 0 0 0 0 0 0<br />

CTCON 0 0 0 0 0 0 0 0<br />

CTL0 to CTL3 X X X X X X X X<br />

CTH0 to CTH3 X X X X X X X X<br />

DPL 0 0 0 0 0 0 0 0<br />

DPH 0 0 0 0 0 0 0 0<br />

IEN0 0 0 0 0 0 0 0 0<br />

IEN1 0 0 0 0 0 0 0 0<br />

IP0 X 0 0 0 0 0 0 0<br />

IP1 0 0 0 0 0 0 0 0<br />

PCH 0 0 0 0 0 0 0 0<br />

PCL 0 0 0 0 0 0 0 0<br />

PCON 0 X X 0 0 0 0 0<br />

PSW 0 0 0 0 0 0 0 0<br />

PWM0 0 0 0 0 0 0 0 0<br />

PCWM1 0 0 0 0 0 0 0 0<br />

PCWMP 0 0 0 0 0 0 0 0<br />

P0 to P4 1 1 1 1 1 1 1 1<br />

P5 X X X X X X X X<br />

RTE 0 0 0 0 0 0 0 0<br />

S0BUF X X X X X X X X<br />

S0CON 0 0 0 0 0 0 0 0<br />

1996 Jun 27 71<br />

REGISTER 7 6 5 4 3 2 1 0<br />

CANSTA 0 0 0 0 1 1 0 0<br />

CANCON X X X 0 0 0 0 0<br />

CANDAT X X X X X X X X<br />

CANADR 0 X 1 0 0 1 0 0<br />

SP 0 0 0 0 0 1 1 1<br />

STE 1 1 0 0 0 0 0 0<br />

TCON 0 0 0 0 0 0 0 0<br />

TH0, TH1 0 0 0 0 0 0 0 0<br />

TMH2 0 0 0 0 0 0 0 0<br />

TL0, TL1 0 0 0 0 0 0 0 0<br />

TML2 0 0 0 0 0 0 0 0<br />

TMOD 0 0 0 0 0 0 0 0<br />

TM2CON 0 0 0 0 0 0 0 0<br />

TM2IR 0 0 0 0 0 0 0 0<br />

T3<br />

CAN part<br />

0 0 0 0 0 0 0 0<br />

CR 0 X 1 X X X X 1<br />

CMR 1 1 X 0 X X X X<br />

SR 0 0 0 0 1 1 0 0<br />

IR X X X 0 0 0 0 0<br />

ACR X X X X X X X X<br />

AMR X X X X X X X X<br />

BTR0 X X X X X X X X<br />

BTR1 X X X X X X X X<br />

OCR X X X X X X X X<br />

TR X X X X X X X X<br />

TXB 10 to 19 X X X X X X X X<br />

RXB 20 to 29 X X X X X X X X


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

17.1 Power-on Reset<br />

If the RST pin is connected to VDD via a 2.2 μF capacitor,<br />

as shown in Fig.26, an automatic reset can be obtained by<br />

switching on VDD (provided its rise time is


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

18.2 Instruction Set<br />

For the description of the Data Addressing Modes and Hexadecimal opcode cross-reference see Table 88.<br />

Table 84 Instruction set description: Arithmetic operations<br />

MNEMONIC DESCRIPTION BYTES CYCLES<br />

Arithmetic operations<br />

ADD A,Rr Add register to A 1 1 2*<br />

ADD A,direct Add direct byte to A 2 1 25<br />

ADD A,@Ri Add indirect RAM to A 1 1 26, 27<br />

ADD A,#data Add immediate data to A 2 1 24<br />

ADDC A,Rr Add register to A with carry flag 1 1 3*<br />

ADDC A,direct Add direct byte to A with carry flag 2 1 35<br />

ADDC A,@Ri Add indirect RAM to A with carry flag 1 1 36, 37<br />

ADDC A,#data Add immediate data to A with carry flag 2 1 34<br />

SUBB A,Rr Subtract register from A with borrow 1 1 9*<br />

SUBB A,direct Subtract direct byte from A with borrow 2 1 95<br />

SUBB A,@Ri Subtract indirect RAM from A with borrow 1 1 96, 97<br />

SUBB A,#data Subtract immediate data from A with borrow 2 1 94<br />

INC A Increment A 1 1 04<br />

INC Rr Increment register 1 1 0*<br />

INC direct Increment direct byte 2 1 05<br />

INC @Ri Increment indirect RAM 1 1 06, 07<br />

DEC A Decrement A 1 1 14<br />

DEC Rr Decrement register 1 1 1*<br />

DEC direct Decrement direct byte 2 1 15<br />

DEC @Ri Decrement indirect RAM 1 1 16, 17<br />

INC DPTR Increment data pointer 1 2 A3<br />

MUL AB Multiply A and B 1 4 A4<br />

DIV AB Divide A by B 1 4 84<br />

DA A Decimal adjust A 1 1 D4<br />

1996 Jun 27 73<br />

OPCODE<br />

(HEX)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 85 Instruction set description: Logic operations<br />

MNEMONIC DESCRIPTION BYTES CYCLES<br />

Logic operations<br />

ANL A,Rr AND register to A 1 1 5*<br />

ANL A,direct AND direct byte to A 2 1 55<br />

ANL A,@Ri AND indirect RAM to A 1 1 56, 57<br />

ANL A,#data AND immediate data to A 2 1 54<br />

ANL direct,A AND A to direct byte 2 1 52<br />

ANL direct,#data AND immediate data to direct byte 3 2 53<br />

ORL A,Rr OR register to A 1 1 4*<br />

ORL A,direct OR direct byte to A 2 1 45<br />

ORL A,@Ri OR indirect RAM to A 1 1 46, 47<br />

ORL A,#data OR immediate data to A 2 1 44<br />

ORL direct,A OR A to direct byte 2 1 42<br />

ORL direct,#data OR immediate data to direct byte 3 2 43<br />

XRL A,Rr Exclusive-OR register to A 1 1 6*<br />

XRL A,direct Exclusive-OR direct byte to A 2 1 65<br />

XRL A,@Ri Exclusive-OR indirect RAM to A 1 1 66, 67<br />

XRL A,#data Exclusive-OR immediate data to A 2 1 64<br />

XRL direct,A Exclusive-OR A to direct byte 2 1 62<br />

XRL direct,#data Exclusive-OR immediate data to direct byte 3 2 63<br />

CLR A Clear A 1 1 E4<br />

CPL A Complement A 1 1 F4<br />

RL A Rotate A left 1 1 23<br />

RLC A Rotate A left through the carry flag 1 1 33<br />

RR A Rotate A right 1 1 03<br />

RRC A Rotate A right through the carry flag 1 1 13<br />

SWAP A Swap nibbles within A 1 1 C4<br />

1996 Jun 27 74<br />

OPCODE<br />

(HEX)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 86 Instruction set description: Data transfer<br />

MNEMONIC DESCRIPTION BYTES CYCLES<br />

Data transfer<br />

MOV A,Rr Move register to A 1 1 E*<br />

MOV A,direct (note 1) Move direct byte to A 2 1 E5<br />

MOV A,@Ri Move indirect RAM to A 1 1 E6, E7<br />

MOV A,#data Move immediate data to A 2 1 74<br />

MOV Rr,A Move A to register 1 1 F*<br />

MOV Rr,direct Move direct byte to register 2 2 A*<br />

MOV Rr,#data Move immediate data to register 2 1 7*<br />

MOV direct,A Move A to direct byte 2 1 F5<br />

MOV direct,Rr Move register to direct byte 2 2 8*<br />

MOV direct,direct Move direct byte to direct 3 2 85<br />

MOV direct,@Ri Move indirect RAM to direct byte 2 2 86, 87<br />

MOV direct,#data Move immediate data to direct byte 3 2 75<br />

MOV @Ri,A Move A to indirect RAM 1 1 F6, F7<br />

MOV @Ri,direct Move direct byte to indirect RAM 2 2 A6, A7<br />

MOV @Ri,#data Move immediate data to indirect RAM 2 1 76, 77<br />

MOV DPTR,#data16 Load data pointer with a 16-bit constant 3 2 90<br />

MOVC A,@A+DPTR Move code byte relative to DPTR to A 1 2 93<br />

MOVC A,@A+PC Move code byte relative to PC to A 1 2 83<br />

MOVX A,@Ri Move external RAM (8-bit address) to A 1 2 E2, E3<br />

MOVX A,@DPTR Move external RAM (16-bit address) to A 1 2 E0<br />

MOVX @Ri,A Move A to external RAM (8-bit address) 1 2 F2, F3<br />

MOVX @DPTR,A Move A to external RAM (16-bit address) 1 2 F0<br />

PUSH direct Push direct byte onto stack 2 2 C0<br />

POP direct Pop direct byte from stack 2 2 D0<br />

XCH A,Rr Exchange register with A 1 1 C*<br />

XCH A,direct Exchange direct byte with A 2 1 C5<br />

XCH A,@Ri Exchange indirect RAM with A 1 1 C6, C7<br />

XCHD A,@Ri Exchange LOW-order digit indirect RAM with A 1 1 D6, D7<br />

Note<br />

1. MOV A,ACC is not permitted.<br />

1996 Jun 27 75<br />

OPCODE<br />

(HEX)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 87 Instruction set description: Boolean variable manipulation, Program and machine control<br />

MNEMONIC DESCRIPTION BYTES CYCLES<br />

Boolean variable manipulation<br />

CLR C Clear carry flag 1 1 C3<br />

CLR bit Clear direct bit 2 1 C2<br />

SETB C Set carry flag 1 1 D3<br />

SETB bit Set direct bit 2 1 D2<br />

CPL C Complement carry flag 1 1 B3<br />

CPL bit Complement direct bit 2 1 B2<br />

ANL C,bit AND direct bit to carry flag 2 2 82<br />

ANL C,/bit AND complement of direct bit to carry flag 2 2 B0<br />

ORL C,bit OR direct bit to carry flag 2 2 72<br />

ORL C,/bit OR complement of direct bit to carry flag 2 2 A0<br />

MOV C,bit Move direct bit to carry flag 2 1 A2<br />

MOV bit,C Move carry flag to direct bit 2 2 92<br />

Program and machine control<br />

ACALL addr11 Absolute subroutine call 2 2 •1<br />

LCALL addr16 Long subroutine call 3 2 12<br />

RET Return from subroutine 1 2 22<br />

RETI Return from interrupt 1 2 32<br />

AJMP addr11 Absolute jump 2 2 ♦1<br />

LJMP addr16 Long jump 3 2 02<br />

SJMP rel Short jump (relative address) 2 2 80<br />

JMP @A+DPTR Jump indirect relative to the DPTR 1 2 73<br />

JZ rel Jump if A is zero 2 2 60<br />

JNZ rel Jump if A is not zero 2 2 70<br />

JC rel Jump if carry flag is set 2 2 40<br />

JNC rel Jump if carry flag is not set 2 2 50<br />

JB bit,rel Jump if direct bit is set 3 2 20<br />

JNB bit,rel Jump if direct bit is not set 3 2 30<br />

JBC bit,rel Jump if direct bit is set and clear bit 3 2 10<br />

CJNE A,direct,rel Compare direct to A and jump if not equal 3 2 B5<br />

CJNE A,#data,rel Compare immediate to A and jump if not equal 3 2 B4<br />

CJNE Rr,#data,rel Compare immediate to register and jump if not equal 3 2 B*<br />

CJNE @Ri,#data,rel Compare immediate to indirect and jump if not equal 3 2 B6, B7<br />

DJNZ Rr,rel Decrement register and jump if not zero 2 2 D*<br />

DJNZ direct,rel Decrement direct and jump if not zero 3 2 D5<br />

NOP No operation 1 1 00<br />

1996 Jun 27 76<br />

OPCODE<br />

(HEX)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 88 Description of the mnemonics in the Instruction set<br />

MNEMONIC DESCRIPTION<br />

Data addressing modes<br />

Rr Working register R0-R7.<br />

direct 128 internal RAM locations and any special function register (SFR).<br />

@Ri Indirect internal RAM location addressed by register R0 or R1 of the actual register bank.<br />

#data 8-bit constant included in instruction.<br />

#data 16 16-bit constant included as bytes 2 and 3 of instruction.<br />

bit Direct addressed bit in internal RAM or SFR.<br />

addr16 16-bit destination address. Used by LCALL and LJMP.<br />

The branch will be anywhere within the 64 kbytes Program Memory address space.<br />

addr11 11-bit destination address. Used by ACALL and AJMP. The branch will be within the same 2 kbytes<br />

page of Program Memory as the first byte of the following instruction.<br />

rel Signed (two's complement) 8-bit offset byte. Used by SJMP and all conditional jumps.<br />

Range is −128 to +127 bytes relative to first byte of the following instruction.<br />

Hexadecimal opcode cross-reference<br />

* 8, 9, A, B, C, D, E, F.<br />

• 1, 3, 5, 7, 9, B, D, F.<br />

♦ 0, 2, 4, 6, 8, A, C, E.<br />

1996 Jun 27 77


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 89 Instruction map<br />

First hexadecimal character of opcode ← Second hexadecimal character of opcode →<br />

↓ 0 1 2 3 4 5 6 7 8 9 A B C D E F<br />

AJMP LJMP RR<br />

INC INC<br />

INC @Ri INC Rr<br />

0 NOP<br />

addr11 addr16 A<br />

A<br />

direct 0 1 0 1 2 3 4 5 6 7<br />

JBC ACALL LCALL RRC<br />

DEC DEC<br />

DEC @Ri DEC Rr<br />

1<br />

bit,rel addr11 addr16 A<br />

A<br />

direct 0 1 0 1 2 3 4 5 6 7<br />

JB AJMP<br />

RL<br />

ADD ADD ADD A,@Ri ADD A,Rr<br />

2<br />

RET<br />

bit,rel addr11<br />

A<br />

A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

JNB ACALL<br />

RLC ADDC ADDC ADDC A,@Ri ADDC A,Rr<br />

3<br />

RETI<br />

bit,rel addr11<br />

A<br />

A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

JC AJMP ORL ORL<br />

ORL ORL ORL A,@Ri ORL A,Rr<br />

4<br />

rel addr11 direct,A direct,#data A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

JNC ACALL ANL ANL<br />

ANL ANL<br />

ANL A,@Ri ANL A,Rr<br />

5<br />

rel addr11 direct,A direct,#data A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

JZ<br />

AJMP XRL XRL<br />

XRL XRL<br />

XRL A,@Ri XRL A,Rr<br />

6<br />

rel addr11 direct,A direct,#data A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

JNZ ACALL ORL JMP<br />

MOV MOV MOV @Ri,#data MOV Rr,#data<br />

7<br />

rel addr11 C,bit @A+DPTR A,#data direct,#data 0 1 0 1 2 3 4 5 6 7<br />

SJMP AJMP ANL MOVC<br />

DIV MOV MOV direct,@Ri MOV direct,Rr<br />

8<br />

rel addr11 C,bit A,@A+PC AB direct,direct 0 1 0 1 2 3 4 5 6 7<br />

MOV ACALL MOV MOVC SUBB SUBB SUBB A,@Ri SUB A,Rr<br />

9<br />

DTPR,#data16 addr11 bit,C A,@A+DPTR A,#data A,direct 0 1 0 1 2 3 4 5 6 7<br />

ORL AJMP MOV INC<br />

MUL<br />

MOV @Ri,direct MOV Rr,direct<br />

A<br />

C,/bit addr11 bit,C DPTR<br />

AB<br />

0 1 0 1 2 3 4 5 6 7<br />

ANL ACALL CPL CPL<br />

CJNE CJNE CJNE @Ri,#data,rel CJNE Rr,#data,rel<br />

B<br />

C,/bit addr11 bit<br />

C A,#data,rel A,direct,rel 0 1 0 1 2 3 4 5 6 7<br />

PUSH AJMP CLR CLR SWAP XCH XCH A,@Ri XCH A,Rr<br />

C<br />

direct addr11 bit<br />

C<br />

A A,direct 0 1 0 1 2 3 4 5 6 7<br />

POP ACALL SETB SETB<br />

DA DJNZ XCHD A,@Ri DJNZ Rr,rel<br />

D<br />

direct addr11 bit<br />

C<br />

A direct,rel 0 1 0 1 2 3 4 5 6 7<br />

MOVX AJMP MOVX A,@Ri CLR MOV<br />

E<br />

A,@DTPR addr11<br />

A A,direct (1)<br />

MOV A,@Ri MOV A,Rr<br />

0 1 0 1 0 1 2 3 4 5 6 7<br />

MOVX ACALL MOVX @Ri,A CPL MOV MOV @Ri,A MOV Rr,A<br />

F<br />

@DTPR,A addr11 0 1 A direct,A 0 1 0 1 2 3 4 5 6 7<br />

1996 Jun 27 78<br />

Note<br />

1. MOV A, ACC is not a valid instruction.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

19 ABSOLUTE MAXIMUM RATINGS (note 1)<br />

In accordance with the Absolute Maximum Rating System (IEC 134).<br />

SYMBOL PARAMETER MIN. MAX. UNIT<br />

VDD voltage on VDD pin −0.5 +6.5 V<br />

VI1<br />

input voltage on any pin<br />

(except CTX0, CTX1, CRX0, CRX1 and EA/VPP)<br />

−0.5 VDD + 0.5 V<br />

VI2 input voltage on EA/VPP to VSS −0.5 +13 V<br />

II, IO<br />

input/output current on any single I/O pin<br />

(except from CTX0 and CTX1)<br />

− ±10 mA<br />

IOT sink current of CTX0, CTX1 together − 30 mA<br />

source current of CTX0, CTX1 together − −20 mA<br />

Ptot total power dissipation (note 2) − 1.0 W<br />

Tstg storage temperature range −65 +150 °C<br />

Tamb<br />

operating ambient temperature range:<br />

P8xC592 FFA −40 +85 °C<br />

P8xC592 FHA −40 +125 °C<br />

Notes<br />

1. The following applies to the Absolute Maximum Ratings:<br />

a) Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device.<br />

This is a stress rating only and functional operation of the device at these or any conditions other than those<br />

described in the Chapters 20 “DC characteristics” and 21 “AC characteristics” of this specification is not implied.<br />

b) This product includes circuitry specifically designed for the protection of its internal devices from the damaging<br />

effect of excessive static charge. However, it is suggested that conventional precautions be taken to avoid<br />

applying greater than the rated maxima.<br />

c) Parameters are valid over operating temperature range unless otherwise specified.<br />

All voltages are with respect to VSS unless otherwise noted.<br />

2. This value is based on the maximum allowable die temperature and the thermal resistance of the package, not on<br />

device power consumption.<br />

1996 Jun 27 79


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

20 DC CHARACTERISTICS<br />

VDD =5V±10%; VSS = 0 V; all voltages with respect to VSS unless otherwise specified.<br />

Tamb = −40 to +125 °C for the P8xC592FHA; Tamb = −40 to +85 °C for the P8xC592FFA.<br />

SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT<br />

Supply (digital part)<br />

VDD supply voltage 4.5 5.5 V<br />

IDD operating supply current fCLK = 16 MHz; note 1 − 50 mA<br />

IDD(ID) supply current Idle mode fCLK = 16 MHz; note 2 − 15 mA<br />

IDD(IS) supply current Idle & Sleep mode fCLK = 16 MHz; note 3 − 10 mA<br />

IDD(PD) supply current Power-down mode: note 4<br />

P8xC592 FHA − 150 μA<br />

Inputs<br />

P8xC592 xFx − 50 μA<br />

VIL LOW level input voltage<br />

(except EA, CRX0 and CRX1)<br />

−0.5 0.2VDD − 0.1 V<br />

VIL1 LOW level input voltage EA −0.5 0.2VDD − 0.3 V<br />

VIH HIGH level input voltage<br />

(except RST, XTAL1, CRX0,CRX1)<br />

0.2VDD + 0.9 VDD + 0.5 V<br />

VIH1 HIGH level input voltage<br />

(RST and XTAL1)<br />

0.7VDD VDD + 0.5 V<br />

IIL LOW level input current<br />

Ports 1, 2, 3 and 4<br />

VI = 0.45 V − −50 μA<br />

ITL input current HIGH-to-LOW<br />

transition<br />

Ports 1, 2, 3 and 4<br />

(except P1.6 and P1.7)<br />

VI = 2.0 to 0.45 V − −650 μA<br />

ILI1 input leakage current<br />

Port 0, EA, STADC, EW, P1.6, P1.7<br />

0.45 V < VI < VDD − ±10 μA<br />

ILI2 input leakage current Port 5 0.45 V < VI < VDD − ±1 μA<br />

Outputs<br />

VOL<br />

VOL1<br />

VOH<br />

VOH1<br />

LOW level output voltage<br />

Ports 1, 2, 3 and 4<br />

(except P1.6 and P1.7)<br />

LOW level output voltage<br />

Port 0, ALE, PSEN, PWM0, PWM1,<br />

P1.6, P1.7<br />

HIGH level output voltage<br />

Ports 1, 2, 3 and 4<br />

(except P1.6 and P1.7)<br />

HIGH level output voltage<br />

Port 0 in external bus mode,<br />

ALE, PSEN, PWM0, PWM1<br />

1996 Jun 27 80<br />

IOL = 1.6 mA; note 5 − 0.45 V<br />

IOL = 3.2 mA; note 5 − 0.45 V<br />

IOH = −60 μA 2.4 − V<br />

IOH = −25 μA 0.75VDD − V<br />

IOH = −10 μA 0.9VDD − V<br />

IOH = −400 μA 2.4 − V<br />

IOH = −150 μA 0.75VDD − V<br />

IOH = −40 μA; note 6 0.9VDD − V


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT<br />

VOH2 HIGH level output voltage RST IOH = −400 μA 2.4 − V<br />

IOH = −120 μA 0.8VDD − V<br />

RRST RST pull-down resistor 50 150 kΩ<br />

CI/O I/O pin capacitance test frequency = 1 MHz;<br />

Tamb =25°C<br />

− 10 pF<br />

Supply (analog part)<br />

AVDD supply voltage AVDD =VDD ± 0.2 V 4.5 5.5 V<br />

AIDD operating supply current Port 5 = AVDD; note 1 − 2.5 mA<br />

AIDD(ID) supply current Idle mode note 2 − 2.5 mA<br />

AIDD(IS) supply current Idle and Sleep mode: note 3<br />

P83C592 FHA − 400 μA<br />

P8xC592 xFx − 350 μA<br />

AIDD(PD) supply current Power-down mode: note 4<br />

P83C592 FHA − 400 μA<br />

P8xC592 xFx − 350 μA<br />

Analog inputs<br />

AVIN analog input voltage AVSS − 0.2 AVDD + 0.2 V<br />

AVREF− reference voltage AVSS − 0.2 − V<br />

AVREF+ − AVDD + 0.2 V<br />

resistance between<br />

10 50 kΩ<br />

RREF<br />

AVREF+ and AVREF−<br />

CIA analog input capacitance − 15 pF<br />

tADS sampling time note 7 − 8tCY μs<br />

tADC conversion time<br />

(including sample time)<br />

note 7 − 50tCY μs<br />

DLe differential non-linearity notes 8, 9 and 10 − ±1LSB ILe integral non-linearity notes 8 and 11 − ±2LSB OSe offset error notes 8 and 12 − ±2LSB Ge gain error notes 8 and 13 − ±0.4 %<br />

Ae absolute voltage error notes 8 and 14 − ±3LSB Mctc channel to channel matching − ±1LSB Ct crosstalk between P5 inputs 0 to 100 kHz − −60 dB<br />

CAN input comparator (CRX0, CRX1)<br />

VDIF differential input voltage (note 15) AVDD =5V±5%;<br />

±32 − mV<br />

VHYST hysteresis voltage (note 15) 1.4 V < VI < AVDD−1.4 V 8 30 mV<br />

II input current − ±400 nA<br />

1996 Jun 27 81


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT<br />

CAN output driver (VDD =5V± 5%)<br />

VOLT LOW level output voltage<br />

(CTX0 and CTX1)<br />

VOHT<br />

High level output voltage<br />

(CTX0 and CTX1)<br />

Reference (AVDD =5V± 5%)<br />

VREFOUT REF output voltage −0.1 mA < IL < 0.1 mA;<br />

CL = 10 nF; note 15;<br />

bit Reference Active = HIGH<br />

IREFIN REF input current 1.5 V < VREFIN < AVDD−1.5 V;<br />

bit Reference Active = LOW<br />

Notes to the DC characteristics<br />

1. Conditions for:<br />

a) The digital operating current measurement: all output pins disconnected; XTAL1 is driven with tr =tf= 10 ns;<br />

VIL =VSS + 0.5 V; VIH =VDD − 0.5 V; EA = RST = Port 0 = P1.6 = P1.7 = EW = VDD;<br />

STADC = VSS; CRX0 = 2.7 V; CRX1 = 2.3 V.<br />

b) The analog operating current measurement: Port 5 = AVDD; CAN: register 6: = 00H;<br />

load current reference voltage source 100 μA.<br />

2. Conditions for:<br />

a) The digital Idle mode supply current measurement: all output pins disconnected;<br />

XTAL1 is driven with tr =tf= 10 ns; VIL =VSS + 0.5 V; VIH =VDD − 0.5 V; Port 0 = P1.6 = P1.7 = EW=VDD;<br />

EA = RST = STADC = VSS; CRX0 = 2.7 V; CRX1 = 2.3 V.<br />

b) The analog Idle mode current measurement: Port 5 = AVDD; CAN: register 6: = 00H;<br />

load current reference voltage source 100 μA.<br />

3. Conditions for:<br />

a) The digital Idle and Sleep mode supply current measurement: all output pins disconnected;<br />

XTAL1 is driven with tr =tf= 10 ns; VIL =VSS + 0.5 V; VIH =VDD − 0.5 V;<br />

Port 0 = P1.6 = P1.7 = EW = CRX0 = VDD; EA = RST = STADC = CRX1 = VSS;<br />

CAN: register 6: = 00H, register 7: = 12H, register 8: = 02H, register 0: = 20H, wait 15tCY,<br />

register 1: = 10H, wait for bit Sleep = 1.<br />

b) The analog Idle and Sleep mode current measurement: Port 5=AVDD;<br />

load current reference voltage source 100 μA.<br />

4. Window devices have to be covered. Conditions for:<br />

a) The digital Power-down mode supply current measurement: all output pins and Port 5 disconnected;<br />

Port 0 = P1.6 = P1.7 = EW = CRX0 = VDD;<br />

EA = RST = STADC = CRX1 = XTAL1 = AVREF+ = AVREF− = CVSS =VSS;<br />

AVDD =VDD, but current into AVDD pin is not comprised in digital Power-down current.<br />

b) The analog Power-down mode supply current measurement: Port 5 = AVDD.<br />

5. Capacitive loads on Port 0 and Port 2 may degrade the LOW level output voltage of ALE, Port 1 and Port 3.<br />

During a HIGH-to-LOW transition on the Port 0 and Port 2 pins and a capacitive load >100 pF, the ALE LOW level<br />

may exceed 0.8 V. In the case that it is necessary to connect ALE to a Schmitt trigger input respectively use an<br />

address latch with a Schmitt trigger STROBE input.<br />

1996 Jun 27 82<br />

Io = 1.2 mA; note 15 − 0.1 V<br />

Io =10mA − 0.6 V<br />

Io = −1.2 mA; note 15 VDD − 0.1 − V<br />

Io = −10 mA; note 16 VDD − 0.6 − V<br />

1 ⁄2AVDD−0.1 1 ⁄2AVDD+0.1 V<br />

− ±10 μA


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

6. Capacitive loads on Port 0 and Port 2 may cause a HIGH level voltage degradation of ALE and PSEN below 0.9VDD<br />

during the address bits are stabilizing.<br />

7. tCY =12tCLK is the machine cycle time.<br />

8. AVREF+ = 5.12 V; AVREF− = 0 V; AVDD = 5.0 V.<br />

9. The differential non-linearity (DLe) is the difference between the actual step width and the ideal step width.<br />

10. The ADC is monotonic, there are no missing codes.<br />

11. The integral non-linearity (ILe) is the peak difference between the centre of the steps of the actual and the ideal<br />

transfer curve after appropriate adjustment of gain and offset error.<br />

12. The offset error (OSe) is the absolute difference between the straight line which fits the actual transfer curve after<br />

removing gain error, and a straight line which fits the ideal transfer curve. The offset error is constant at every point<br />

of the actual transfer curve.<br />

13. The gain error (Ge) is relative difference in percent between the straight line fitting the actual transfer curve after<br />

removing offset error and the straight line which fits the ideal transfer curve. The gain error is constant at every point<br />

on the transfer curve.<br />

14. The absolute voltage error (Ae) is the maximum difference between the centre of the steps of the actual transfer curve<br />

of the not calibrated ADC and the ideal transfer curve.<br />

15. Not tested during production.<br />

16. Source current for the CTX0, CTX1 outputs together.<br />

50<br />

handbook, halfpage<br />

I<br />

DD<br />

(mA)<br />

(1) Maximum Operating mode (IDD); VDD = 5.5 V<br />

(2) Maximum Operating mode (IDD); VDD = 4.5 V<br />

(3) Maximum Idle and Sleep mode (IDD(IS) ); VDD = 5.5 V<br />

(4) Maximum Idle and Sleep mode (IDD(IS) ); VDD = 4.5 V<br />

(4)<br />

0<br />

0 4 8 12 16<br />

Fig.27 Supply current (IDD) as a function of frequency at XTAL1 (fCLK).<br />

1996 Jun 27 83<br />

40<br />

30<br />

20<br />

10<br />

(1)<br />

(2)<br />

(3)<br />

f CLK (MHz)<br />

MGA172


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

code<br />

out<br />

1023<br />

1022<br />

1021<br />

1020<br />

1019<br />

1018<br />

(1) Example of an actual transfer curve.<br />

(2) The ideal transfer curve.<br />

(3) Differential non-linearity (DLe).<br />

(4) Integral non-linearity (ILe).<br />

(5) Centre of a step of the actual transfer curve.<br />

7<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

offset error<br />

OS<br />

e<br />

1 LSB (ideal)<br />

1 2 3 4 5 6 7 1018 1019 1020 1021 1022 1023 1024<br />

Fig.28 ADC conversion characteristic.<br />

1996 Jun 27 84<br />

(4)<br />

(2)<br />

(5)<br />

(3)<br />

offset error OS e<br />

(1)<br />

1 LSB ideal =<br />

AVIN (LSBideal )<br />

AVREF+ −AVREF− 1024<br />

gain error Ge<br />

MGA173


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

21 AC CHARACTERISTICS<br />

See notes 1 and 2; CL = 100 pF for Port 0, ALE and PSEN; CL = 80 pF for all other outputs unless otherwise specified.<br />

SYMBOL PARAMETER<br />

External Program Memory<br />

Notes<br />

1. For the AC Characteristics the following conditions are valid: P8xC592 FFA (FHA): VDD =5V±10%;<br />

Tamb = −40 to +85 °C (125 °C); fCLK = 1.2 to 16 MHz.<br />

2. =<br />

1<br />

---------- =<br />

one oscillator clock period ; tCLK = 62.5 ns at fCLK = 16 MHz.<br />

1996 Jun 27 85<br />

fCLK = 16 MHz fCLK = 12 MHz<br />

VARIABLE CLOCK<br />

1.2 to 16 MHz UNIT<br />

MIN. MAX. MIN. MAX. MIN. MAX.<br />

tLHLL ALE pulse width 85 − 127 − 2tCLK − 40 − ns<br />

tAVLL address valid to ALE LOW 23 − 43 − tCLK − 40 − ns<br />

tLLAX address hold after ALE LOW 33 − 53 − tCLK − 30 − ns<br />

tLLIV ALE LOW to valid instruction in − 150 − 233 − 4tCLK − 100 ns<br />

tLLPL ALE LOW to PSEN LOW 33 − 53 − tCLK − 30 − ns<br />

tPLPH PSEN pulse width 143 − 205 − 3tCLK − 45 − ns<br />

tPLIV PSEN LOW to valid instruction in − 83 − 145 − 3tCLK − 105 ns<br />

tPXIX input instruction hold after PSEN 0 − 0 − 0 − ns<br />

tPXIZ input instruction float after PSEN − 38 − 59 − tCLK − 25 ns<br />

tAVIV address to valid instruction in − 208 − 312 − 5tCLK − 105 ns<br />

tPLAZ PSEN LOW to address float − 10 − 10 − 10 ns<br />

External data memory<br />

tRLRH RD pulse width 275 − 400 − 6tCLK − 100 − ns<br />

tWLWH WR pulse width 275 − 400 − 6tCLK − 100 − ns<br />

tAVLL address valid to ALE LOW 8 − 28 − tCLK − 55 − ns<br />

tLLAX address hold after ALE LOW 33 − 53 − tCLK − 30 − ns<br />

tRLDV RD LOW to valid data in − 148 − 252 − 5tCLK −165 ns<br />

tRHDX data hold after RD 0 − 0 − 0 − ns<br />

tRHDZ data float after RD − 55 − 97 − 2tCLK − 70 ns<br />

tLLDV ALE LOW to valid data in − 350 − 517 − 8tCLK − 150 ns<br />

tAVDV address to valid data in − 398 − 585 − 9tCLK − 165 ns<br />

tLLWL ALE LOW to RD or WR LOW 138 238 200 300 3tCLK − 50 3tCLK +50 ns<br />

tAVWL address valid to RD or WR LOW 120 − 203 − 4tCLK − 130 − ns<br />

tWHLH RD or WR HIGH to ALE HIGH 23 103 43 123 tCLK − 40 tCLK +40 ns<br />

tQVWX data valid to WR transition 13 − 33 − tCLK − 50 − ns<br />

tQVWH data valid time WR HIGH 288 − 433 − 7tCLK − 150 − ns<br />

tWHQX data hold after WR 13 − 33 − tCLK − 50 − ns<br />

tRLAZ RD LOW to address float − 0 − 0 − 0 ns<br />

t CLK<br />

f CLK


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 90 CAN characteristics<br />

SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT<br />

CAN input comparator/output driver<br />

tsd sum of input and output delay AVDD =5V±5%; VDIF = ± 32 mV;<br />

1.4 V < VI < AVDD − 1.4 V<br />

handbook, full pagewidth<br />

2.4 V<br />

0.45 V<br />

2.4 V<br />

0.45 V<br />

2.0 V<br />

0.8 V<br />

test points<br />

Fig.29 AC testing input, output waveform (a) and float waveform (b).<br />

1996 Jun 27 86<br />

MGA174<br />

− 60 ns<br />

AC testing inputs are driven at 2.4 V for a HIGH and 0.45 V for a LOW.<br />

Timing measurements are taken at 2.0 V for a HIGH and 0.8 V for a LOW, see Fig.29 (a).<br />

The float state is defined as the point at which a Port 0 pin sinks 3.2 mA or sources 400 μA at the voltage test levels, see Fig.29 (b).<br />

(a)<br />

float<br />

(b)<br />

2.0 V<br />

0.8 V<br />

2.0 V<br />

0.8 V<br />

2.4 V<br />

0.45 V


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

dotted lines<br />

are valid when<br />

RD or WR are<br />

active<br />

only active<br />

during a read<br />

from external<br />

data memory<br />

only active<br />

during a write<br />

to external<br />

data memory<br />

external<br />

program<br />

memory<br />

fetch<br />

read or<br />

write of<br />

external data<br />

memory<br />

XTAL1<br />

INPUT<br />

ALE<br />

PSEN<br />

RD<br />

WR<br />

BUS<br />

(PORT 0)<br />

PORT 2<br />

BUS<br />

(PORT 0)<br />

PORT 2<br />

PORT<br />

OUTPUT<br />

PORT<br />

INPUT<br />

SERIAL<br />

PORT<br />

CLOCK<br />

S1<br />

P1 P2<br />

inst.<br />

in<br />

inst.<br />

in<br />

S2<br />

P1 P2<br />

address<br />

A0 - A7<br />

address<br />

A0 - A7<br />

S3<br />

P1 P2<br />

S4<br />

P1 P2<br />

S5<br />

P1 P2<br />

1996 Jun 27 87<br />

one machine cycle one machine cycle<br />

inst.<br />

in<br />

address A8 - A15<br />

inst.<br />

in<br />

address A8 - A15<br />

address<br />

A0 - A7<br />

address<br />

A0 - A7<br />

The Port 5 input buffers have a maximum propagation delay of 300 ns.<br />

As a result Port 5 sample time begins 300 ns before state S5 and ends<br />

when S5 has finished.<br />

S6<br />

P1 P2<br />

S1<br />

P1 P2<br />

inst.<br />

in<br />

address A8 - A15<br />

S2<br />

P1 P2<br />

address<br />

A0 - A7<br />

S3<br />

P1 P2<br />

S4<br />

P1 P2<br />

inst.<br />

in<br />

address A8 - A15<br />

data output or data input<br />

address A8 - A15 or Port 2 out<br />

old data new data<br />

sampling time of I/O port pins during input (including INT0 and INT1)<br />

Fig.30 Instruction cycle timing.<br />

S5<br />

P1 P2<br />

address<br />

A0 - A7<br />

S6<br />

P1 P2<br />

address A8 - A15<br />

address<br />

A0 - A7<br />

address A8 - A15<br />

MGA180


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

andbook, full pagewidth<br />

ALE<br />

PSEN<br />

PORT 0<br />

PORT 2<br />

handbook, full pagewidth<br />

ALE<br />

PSEN<br />

RD<br />

PORT 0<br />

PORT 2<br />

t AVLL<br />

t AVLL<br />

t LHLL<br />

t LHLL<br />

t LLPL<br />

t LLAX<br />

A0 to A7<br />

t<br />

LLIV<br />

tAVIV<br />

t PLPH<br />

t<br />

PLIV<br />

t<br />

PLAZ<br />

1996 Jun 27 88<br />

t CY<br />

t PXIZ<br />

inst. input A0 to A7<br />

t PXIX<br />

address A8 to A15 address A8 to A15<br />

Fig.31 Read from external Program Memory.<br />

t LLWL<br />

t LLAX<br />

t<br />

AVWL<br />

A0 to A7<br />

t LLDV<br />

t<br />

AVDV<br />

t CY<br />

t RLDV<br />

t RLAZ<br />

t RLRH<br />

address A8 to A15 (DPH) or Port 2<br />

Fig.32 Read from external Data Memory.<br />

t RHDX<br />

data input<br />

t WHLH<br />

inst. input<br />

t RHDZ<br />

MGA176<br />

MGA177


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

ALE<br />

PSEN<br />

WR<br />

PORT 0<br />

PORT 2<br />

handbook, full pagewidth<br />

t AVLL<br />

t LHLL<br />

t LLAX<br />

A0 to A7<br />

t LLWL<br />

t<br />

AVWL<br />

t QVWX<br />

1996 Jun 27 89<br />

t CY<br />

t QVWH<br />

t WLWH<br />

data output<br />

address A8 to A15 (DPH) or Port 2<br />

Fig.33 Write to external Data Memory.<br />

t HIGH<br />

V IH1 VIH1 0.8 V 0.8 V<br />

t LOW<br />

t CLK<br />

Fig.34 External clock drive XTAL1(see Table 91).<br />

t r<br />

t f<br />

VIH1 VIH1 0.8 V 0.8 V<br />

MGA175<br />

t WHLH<br />

t WHQX<br />

MGA178


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

Table 91 External clock drive XTAL1<br />

SYMBOL PARAMETER<br />

VARIABLE CLOCK<br />

(fCLK = 1.2 to 16 MHz) UNIT<br />

MIN. MAX.<br />

tCLK oscillator clock period (P83C592) 62.5 833.3 ns<br />

tHIGH HIGH time 20 tCLK − tLOW ns<br />

tLOW LOW time 20 tCLK − tHIGH ns<br />

tr rise time − 20 ns<br />

tf fall time − 20 ns<br />

tCY cycle time (12 × tCLK) 0.75 10 μs<br />

Table 92 UART Timing in Shift Register Mode<br />

SYMBOL PARAMETER<br />

1996 Jun 27 90<br />

fCLK<br />

16 MHz 12 MHz VARIABLE CLOCK<br />

MIN. MAX. MIN. MAX. MIN. MAX.<br />

tXLXL Serial Port clock cycle timing 0.75 − 1.0 − 12tCLK − ms<br />

tQVXH output data setup to clock rising edge 492 − 700 − 10tCLK − 133 − ns<br />

tXHQX output data hold after clock rising edge 8.0 − 50 − 2tCLK − 117 − ns<br />

tXHDX input data hold after clock rising edge 0 − 0 − 0 − ns<br />

tXHDV clock rising edge to input data valid − 492 − 700 − 10tCLK − 133 ns<br />

andbook, full INSTRUCTION<br />

pagewidth<br />

ALE<br />

CLOCK<br />

OUTPUT <strong>DATA</strong><br />

WRITE TO SBUF<br />

INPUT <strong>DATA</strong><br />

CLEAR RI<br />

0<br />

1<br />

t QVXH<br />

t XLXL<br />

2<br />

t XHQX<br />

t XHDV<br />

3<br />

t XHDX<br />

VALID VALID VALID VALID VALID VALID VALID VALID<br />

Fig.35 UART waveforms in Shift Register Mode.<br />

4<br />

5<br />

6<br />

7<br />

MGA179<br />

8<br />

SET TI<br />

SET RI<br />

UNIT


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

22 CAN APPLICATION INFORMATION<br />

22.1 Latency time requirements<br />

Real-time applications require the ability to process and<br />

transfer information in a limited and predetermined period<br />

of time. If knowing this total time and the time required to<br />

process the information, the (maximum allowed) transfer<br />

delay time is given.<br />

22.1.1 MAXIMUM ALLOWED BIT-TIME CALCULATION<br />

1996 Jun 27 91<br />

It is measured from the initiation of the transfer up to the<br />

signalling of reception.<br />

For instance, this is the period of time between<br />

programming the CAN Command Register bit 0<br />

(Transmission Request) to HIGH and the time getting an<br />

interrupt at a receiving CAN-device (due to the reception<br />

of the respective message).<br />

The maximum allowed bit-time (tBIT) due to latency time requirements can be calculated as:<br />

tBIT ≤ --------------------------------------------------------------------------------------------<br />

( nBIT, MAX LATENCY + nBIT, MESSAGE)<br />

Where:<br />

• tMAX TRANSFER TIME:<br />

the maximum allowed transfer delay time (application-specific).<br />

• nBIT, MAX LATENCY:<br />

the maximum latency time (in terms of number of bits), which depends on the<br />

actual state of the CAN network (e.g. another message already on the network);<br />

• nBIT, MESSAGE:<br />

the number of bits of a message; it varies with the number of transferred data bytes<br />

n<strong>DATA</strong> BYTES (0..8) and Stuffbits like:<br />

Example:<br />

For the calculation of nBIT, MAX LATENCY the following is assumed (the term ‘our message’ refers to that one the latency<br />

time is calculated for):<br />

• since at maximum one-bit-time ago another CAN-controller is transmitting.<br />

• a single error occurs during the transmission of that message preceding ours, leading to the additional transfer of one<br />

Error Frame<br />

• ‘our message’ has the highest priority,<br />

giving:<br />

t MAX TRANSFER TIME<br />

44 + 8.n<strong>DATA</strong> BYTES ≤nBIT, MESSAGE ≤52<br />

+ 10.n<strong>DATA</strong>BYTES nBIT, MAX LATENCY ≥44<br />

+ 8.n<strong>DATA</strong> BYTES, WORST CASE + 18<br />

nBIT, MAX LATENCY ≤52<br />

+ 10.n<strong>DATA</strong> BYTES, WORST CASE + 18<br />

Where:<br />

• The additional 18 bits are due to the Error Frame and the Intermission Field preceding ‘our message’.<br />

• n<strong>DATA</strong> BYTES, WORST CASE denotes the number of data bytes contained by the longest message being used in a given<br />

CAN network.<br />

(1)<br />

(2)<br />

(3)<br />

(4)


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

22.1.2 CALCULATING THE MAXIMUM BIT-TIME<br />

Table 93 Example for calculating the maximum bit-time<br />

STATEMENT COMMENTS<br />

tMAX TRANSFER TIME = 10 ms assumption<br />

n<strong>DATA</strong> BYTES, WORST CASE = 6 longest message in that network; assumption<br />

n<strong>DATA</strong> BYTES = 4 ‘our message’; assumption<br />

nBIT MAX LATENCY ≤ 130 using Equation (3) and (4)<br />

nMESSAGE ≤ 92 using Equation (2)<br />

10 ms<br />

tBIT ≤ ----------------------------- =<br />

( 130 + 92)<br />

0.045 ms = 45 μs<br />

using Equation (1)<br />

22.2 Connecting a P8xC592 to a bus line<br />

(physical layer)<br />

22.2.1 ON-CHIP TRANSCEIVER<br />

The P8xC592 features an on-chip differential transceiver<br />

including output driver and input comparator both being<br />

configurable (see Fig.36). Therefore it supports many<br />

types of common transmission media such as:<br />

• Single-wire bus line<br />

• Two-wire bus line (differential)<br />

• Optical cable bus line.<br />

The P8xC592 can directly drive a differential bus line.<br />

An example is given in Fig.37 for a bus line having a<br />

characteristic impedance of 120 Ω. Direct interfacing to<br />

the bus line is well suited for applications with limited<br />

requirements concerning electromagnetic susceptibility,<br />

wiring failure tolerance and protection against transients.<br />

22.2.2 TRANSCEIVER FOR IN-VEHICLE COMMUNICATION<br />

Fig.38 shows a versatile transceiver implementation<br />

designed for automotive applications. It features a bit rate<br />

of up to 1 Mbit/s and dissipates low power during standby<br />

(1.4 mA). Thus it is suitable also for applications requiring<br />

a Sleep mode function with system activation via the bus<br />

line. The transceiver provides and extended common<br />

mode range for high electromagnetic susceptibility<br />

performance.<br />

Two external driver transistors amplify the output current<br />

to 35 mA typically and provide protection against<br />

overvoltage conditions on the bus line (e.g. due to an<br />

accidental short-circuit between a bus wire and battery<br />

voltage). The serial diodes prevent in combination with the<br />

transistors the bus from being blocked in case of a bus not<br />

powered. More than 32 nodes may be connected to the<br />

bus line.<br />

1996 Jun 27 92<br />

22.2.3 DETECTION AND HANDLING OF BUS WIRING<br />

FAILURES<br />

Using the P8xC592 a superior wiring failure tolerance and<br />

detection performance can be achieved. This requires<br />

both bus lines to be mutually decoupled as shown in<br />

Fig.39. Each bus wire is based separately to a reference<br />

voltage of 1 ⁄2AVDD.<br />

The diodes suppress reverse current in case of a<br />

termination circuit being not properly powered or a bus line<br />

being short i.e. to a voltage higher than 5 V. Applying this<br />

bus termination circuit the following wiring failures on the<br />

bus are detectable and can be handled:<br />

• Interruption of one bus wire at any location.<br />

• Short-circuit of one bus wire to ground or battery<br />

voltage.<br />

• Short-circuit between the bus wires.<br />

A bus failure can be detected e.g. by a drop out of a status<br />

message, regularly being transmitted on the bus. If a bus<br />

wire is corrupted the following actions have to be taken:<br />

• Switch the corresponding comparator input over to a<br />

reference voltage of 1 ⁄2AVDD.<br />

• Disable the corresponding output driver stage.<br />

As a consequence communication will continue on that<br />

bus wire not being corrupted. The required reference<br />

voltage and the switches for the comparator inputs are<br />

provided on-chip. An output driver stage can be disabled<br />

by reconfiguration of the on-chip output driver<br />

(reprogramming of the Output Control Register of the<br />

P8xC592; see Section 13.5.11, Table 51). To find out<br />

which of the bus wires is corrupted a heuristic method is<br />

applied.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

V DD<br />

P8xC592<br />

OUTPUT CONTROL REGISTER COMMAND REGISTER CONTROL REGISTER<br />

5 V<br />

TXD<br />

OUTPUT CONTROL LOGIC<br />

CTX0 CTX1 CVSS AVDD CRX0 CRX1 AVSS Fig.36 Structure of on-chip CAN-Transceiver.<br />

1996 Jun 27 93<br />

5 V<br />

to the CAN bus line<br />

COMP OUT<br />

1/2 AV DD<br />

REF<br />

MGA185


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

750 Ω<br />

120 Ω<br />

750 Ω<br />

OUTPUT CONTROL REGISTER<br />

CTX0 CTX1<br />

R1<br />

240 Ω<br />

R2<br />

240 Ω<br />

Fig.37 Direct interface to a two-wire differential bus.<br />

1996 Jun 27 94<br />

5 V<br />

10101010B (AAH)<br />

P8xC592<br />

5 V<br />

(1) Characteristic line impedance 120 Ω<br />

R3<br />

0 to 1.5 kΩ<br />

CRX0 CRX1<br />

CAN BUS LINE (1)<br />

R4<br />

0 to 1.5 kΩ<br />

120 Ω<br />

MGA186


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

120<br />

Ω<br />

5 V<br />

OUTPUT CONTROL REGISTER<br />

11111010B (FAH)<br />

or 10101010B (AAH)<br />

D1<br />

1N4150<br />

R1<br />

10 Ω<br />

D2<br />

1N4150<br />

R2<br />

10 Ω<br />

P8xC592<br />

Fig.38 In-vehicle Transceiver.<br />

1996 Jun 27 95<br />

R3<br />

3.9 kΩ<br />

CTX0 CTX1 CRX0 CRX1<br />

T1<br />

BST100<br />

BUS NODE<br />

R4<br />

3.9 kΩ<br />

T2<br />

BST72A<br />

(1) Characteristic line impedance 120 Ω<br />

3.48 kΩ<br />

R10<br />

5 V<br />

R8<br />

3.9 kΩ<br />

R5<br />

4.53 kΩ<br />

CAN BUS LINE (1)<br />

R7<br />

3.9 kΩ<br />

R9<br />

3.48 kΩ<br />

R6<br />

4.53 kΩ<br />

MGA187<br />

120<br />

Ω


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

handbook, full pagewidth<br />

C1<br />

100 nF D1<br />

1N4150<br />

R1<br />

120 Ω<br />

C2<br />

100 nF<br />

R2<br />

120 Ω<br />

1N4150<br />

D2<br />

5 V<br />

C3<br />

100 nF D3<br />

1N4150<br />

R3<br />

120 Ω<br />

C4<br />

100 nF<br />

R4<br />

120 Ω<br />

1N4150<br />

D4<br />

BUS NODE<br />

Fig.39 Bus termination with decoupled wires.<br />

1996 Jun 27 96<br />

CAN BUS LINE (1)<br />

(1) Characteristic line impedance 120 Ω<br />

C5<br />

100 nF D5<br />

1N4150<br />

R5<br />

120 Ω<br />

C6<br />

100 nF<br />

R6<br />

120 Ω<br />

1N4150<br />

D6<br />

5 V<br />

C7<br />

100 nF D7<br />

1N4150<br />

R7<br />

120 Ω<br />

C8<br />

100 nF<br />

R8<br />

120 Ω<br />

1N4150<br />

D8<br />

MGA188


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

22.2.4 CONNECTION TO AN OPTICAL BUS LINE<br />

Using an optical medium provides the following<br />

advantages:<br />

• Bus nodes are galvanically decoupled.<br />

• Optical cable features very high noise immunity.<br />

• No noise emission by the bus cable.<br />

An example for an interface to an optical connector is<br />

given in Fig.40. In most cases a transistor is required to<br />

amplify the TX-output current.<br />

handbook, full pagewidth<br />

OUTPUT CONTROL REGISTER<br />

00011110B (1EH)<br />

or 00010110B (16H)<br />

T1<br />

BS170<br />

R1<br />

56 Ω<br />

1996 Jun 27 97<br />

5 V<br />

R2<br />

3.9 kΩ<br />

5 V<br />

OPTICAL<br />

CONNECTOR<br />

HBFR - 0501<br />

SERIES<br />

P8xC592<br />

CTX0 CTX1 CRX0 CRX1<br />

Thus more optical power is provided to compensate for<br />

losses in the optical connectors and the optical star. The<br />

P8xC592 features an on-chip 1 ⁄2AVDD reference voltage<br />

output so only a capacitor is required for the receiver part.<br />

Two optical fibres are used to connect the bus nodes. The<br />

TX-fibre transfers the output signal of the CAN-controller<br />

to the optical star. The optical star transfers the TX-fibre<br />

input signal over to all the RX-fibres. The RX-fibres<br />

transfer the resulting optical signal over to the receivers of<br />

all the bus nodes.<br />

optical<br />

cable<br />

PASSIVE OPTICAL STAR<br />

Fig.40 Optical Transceiver.<br />

C2<br />

100 nF<br />

REFOUT<br />

MGA189<br />

C1<br />

10 nF


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

22.2.5 P8xC592 CAN INTERRUPT HANDLER SOFTWARE EXAMPLE (INCLUDING FAST DMA TRANSFER).<br />

MCS-51 MACRO ASSEMBLER P8xC592 CAN interrupt-handler<br />

LOC OBJ LINE SOURCE<br />

1 $TITLE (8xC592 CAN interrupt-handler)<br />

00A0 2 $NOSYMBOLS NOPAGING<br />

00A1 3<br />

4 ;********************************************************************************************************<br />

5 ;<br />

6 ;Very fast receive-routine for the 8xC592. It:<br />

7 • is embedded in the interrupt-handler for the CAN-controller,<br />

8 • uses the DMA-logic and<br />

9 • handles up to eight different messages<br />

00A2 10 ;(if these have the same leading 8 identifier-bits).<br />

11 ;<br />

12 ;To allow for faster receive-routine, it is assumed that all other routines<br />

13 ;accessing the CAN-controller, disable the interrupt of the CAN-controller<br />

14 ;(IEN0.5) during their execution.<br />

00A5 15 ;<br />

00A7 16 ;Version: 1.0<br />

17 ;Date: 12-April-90<br />

18 ;Author: Bernhard Reckels<br />

19 ;at: Philips Components Application Lab., Hamburg (PCALH)<br />

00A9 20<br />

00AB 21 ;********************************************************************************************************<br />

00AD 22<br />

23 ;********************************************************************************************************<br />

24 ;initial stuff<br />

25<br />

26<br />

;********************************************************************************************************<br />

27<br />

28<br />

;equatas<br />

29 ;addresses of Special Function Registers<br />

00AE 30 CANADR EQU 0DBH<br />

00AF 31 CANDAT EQU 0DAH<br />

32 CANCON EQU 0D9H<br />

00B0 33<br />

34<br />

CANSTA EQU 0D8H<br />

1996 Jun 27 98


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

LOC OBJ LINE SOURCE<br />

35 ;commands for the CAN-controller / DMA logic<br />

36 CAN_REF_REL EQU 00000100B ;Release Receive Buffer<br />

00A0 37 CAN_RX_DMA EQU 80H + 22 ;Rx DMA-transfer<br />

00A1 38<br />

39 ; addresses of CAN-controller internal registers<br />

40<br />

41<br />

CAN_REF EQU 20 ;1st address of Rx-buffer<br />

42 ; masks<br />

43 INT_FLAG_MASK EQU 00011111B ;all CAN's interrupt-flags<br />

44 ID2_0_MASK EQU 11100000B ;only ID.2 ... ID.0 bits<br />

00A2 45<br />

46<br />

47<br />

; jump-address for a CAN-controller interrupt<br />

48 CSEG at 2BH<br />

020080 49 LJMP CAN_INT_HANDLER ; CAN's interrupt-vector<br />

00A5 50<br />

00A7 51<br />

52<br />

; data storage<br />

53 DSEG at 20H<br />

54 CAN_INT_IMAGE: DS 1<br />

00A9 55<br />

00AB 56 BSEG at 00H<br />

00AD 57 CAN_INT_RX: DBIT 1 ; = CAN_INT_IMAGE.0<br />

58 CAN_INT_TX: DBIT 1 ; = CAN_INT_IMAGE.1<br />

59 CAN_INT_KR: DBIT 1 ; = CAN_INT_IMAGE.2<br />

60 CAN_INT_OV: DBIT 1 ; = CAN_INT_IMAGE.3<br />

61<br />

62<br />

CAN_INT_WK: DBIT 1 ; = CAN_INT_IMAGE.4<br />

63 ;********************************************************************************************************<br />

64 ;CAN-controller interrupt-handler<br />

00AE 65 ;<br />

00AF 66 ;Only the receive-interrupt is coded.<br />

67 ;<br />

00B0 68<br />

69<br />

;*******************************************************************************************************<br />

70<br />

71<br />

CSEG at 080H<br />

1996 Jun 27 99


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

LOC OBJ LINE SOURCE<br />

00A0 72 CAN_INT_HANDLER:<br />

00A1 73<br />

74 ; first save used registers<br />

C0D0 75 PUSH PSW<br />

C0E0 76<br />

77<br />

PUSH ACC<br />

78 ; store the CAN-controller's Interrupt Register contents<br />

79 ; (here: at a bit-addressable location).<br />

00A2 80 ; This is necessary because after reading the Interrupt Register<br />

81 ; its contents is cleared, but − on the other hand − several flags<br />

82 ; may be set in coincidence.<br />

E5D9 83 MOV A, CANON<br />

541F 84 ANL A, #INT_FLAG_MASK ; only interrupt-flags<br />

00A5 F520 85 MOV CAN_INT_IMAGE, A<br />

00A7 86<br />

87<br />

88 ;dispatcher-----------------------------------------------------------------------------------------------<br />

89 INT_TEST0:<br />

00A9 100000 90 JBC CAN_INT_RX,CAN_RX_SERV ;receive-interrupt?<br />

00AB 91<br />

00AD 92 INT_TEST1:<br />

93 ; here the dispatcher has to be completed according<br />

94 ; to the application-specific requirements<br />

95 ; ...<br />

96 ; ...<br />

97<br />

98<br />

; end of dispatcher------------------------------------------------------------------------------------<br />

99 ;Rx-serve--------------------------------------------------------------------------------------------------<br />

00AE 100 ; copy message (Data-Field only) from CAN- to CPU memory<br />

00AF 101<br />

102 CAN_RX_SERVE<br />

00B0 103 ; read 2nd Descriptor-Byte from the Rx-Buffer (address 21)<br />

75DB15 104 MOV CANADR, #CAN_REF + 1<br />

E5DA 105<br />

106<br />

MOV A, CANDAT<br />

1996 Jun 27 100


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

LOC OBJ LINE SOURCE<br />

00A0 107 ; determine the destination address in data-memory for the<br />

00A1 108 ; message's Data-Field<br />

54E0 109 ANL A, #ID2_0_MASK ; use ID.2 ... ID.0 only<br />

C4 110 SWAP A<br />

03 111 RR A ; A = 4*ID.2 + 2*ID.1 + ID.0<br />

112 ; this value is used as an index for an array of 8 bytes<br />

113 ; containing the destination-addresses for the 8 different<br />

114 ; messages. Note, that the #RX_ARRAY_OFFSET is due to the<br />

00A2 115 ; program counter-relative access to the array.<br />

2415 116 ADD A, #RX_ARRAY_START − RX_ARRAY_OFFSET<br />

83 117 MOVC A, @A + PC<br />

118<br />

119<br />

RX_ARRAY_OFFSET:<br />

00A5 120 ; if a message passes the acceptance-filter of the CAN<br />

00A7 121 ; Controller, but the CPU doesn't need it, the array<br />

122 ; entry's value may be set to zero indicating this.<br />

123 ; The following instruction cares for this.<br />

6007 124 JZ CAN_RX_READY<br />

00A9 125<br />

00AB 126 ; now copy the Data-Field (only) from CAN- to CPU memory<br />

00AD 127 ; with the aid of the DMA-logic. Note, that a TX-DMA is<br />

128 ; performed when writing 8AH (DMA + address 10) into CANADR<br />

129 ; and a RX-DMA is performed when writing 94H (DMA + address 20)<br />

130 ; ... 9DH (DMA + address 29) into CANADR. Here address 22 is<br />

131 ; used to copy just the Data-Field.<br />

F5D8 132 MOV CANSTA, A ; data-memory address<br />

75DB96 133<br />

134<br />

MOV CANADR, #CAN_RX_DMA ; starts RX-DMA at address 22<br />

00AE 135 ; the DMA-transfer is done in at maximum 2 instruction cycles.<br />

00AF 136 ; During the transfer, neither the data-memory (RAM) nor one<br />

137 ; of the SFRs CANADR, CANDAT, CANCON and<br />

00B0 138 ; CANSTA may be accessed by the CPU.<br />

139 ; For simplicity, two NOPs are used here.<br />

00 140 NOP<br />

00 141 NOP<br />

00A0 142<br />

1996 Jun 27 101


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

LOC OBJ LINE SOURCE<br />

00A1 143 ; after reading the Rx-Buffer it must be released back to<br />

144 ; the CAN-controller. In coincidence, the Clear Overrun bit<br />

145 ; (CANCON.3) may be set, regardless of an existing or<br />

146 ; non-existing data overrun.<br />

147 CAN_RX_READY:<br />

75D904 148<br />

149<br />

MOV CANCON, #CAN_RBF_REL<br />

00A2 150 ; if no other interrupt-flag is set, the interrupt-handler<br />

151 ; for the CAN-controller can be left. Otherwise further<br />

152 ; services are required.<br />

E520 153 MOV A, CAN_INT_IMAGE<br />

70E4 154 JNZ INT_TEST1<br />

00A5 155<br />

00A7 156 ; no other service is required, so the interrupt-handler<br />

157 ; is left.<br />

D0E0 158 POP ACC<br />

D0D0 159 POP PSW<br />

00A9 32 160 RETI<br />

00AB 161 ; end of Rx-serve-------------------------------------------------------------------------------------<br />

00AD 162<br />

163 ; here the array follows containing 8 destination-addresses<br />

164 ; for up to 8 different messages to be received. The values<br />

165 ; are fully application-specific (the values below show an<br />

166 ; example only).<br />

167 RX_ARRAY_START:<br />

E0 168 DB 0E0H ; Rx-message #0<br />

00 169 DB 000H ; this message is not used<br />

00AE 170 ; ...<br />

00AF FA 171<br />

172<br />

DB 0FAH ; RX-message #7, containing 6 data bytes<br />

00B0 173 END<br />

REGISTER BANK(S) USED: 0<br />

ASSEMBLY COMPLETE, NO ERRORS FOUND<br />

1996 Jun 27 102


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

23 PACKAGE OUTLINES<br />

PLCC68: plastic leaded chip carrier; 68 leads SOT188-2<br />

61<br />

68<br />

1<br />

β 9<br />

k<br />

UNIT A<br />

mm 4.57<br />

4.19<br />

y<br />

60<br />

Note<br />

1. Plastic or metal protrusions of 0.01 inches maximum per side are not included.<br />

OUTLINE<br />

VERSION<br />

SOT188-2<br />

pin 1 index<br />

10 26<br />

e<br />

D<br />

HD<br />

REFERENCES<br />

IEC JEDEC EIAJ<br />

112E10 MO-047AC<br />

1996 Jun 27 103<br />

X<br />

44<br />

Z D<br />

43<br />

27<br />

B<br />

Z E<br />

e<br />

k1<br />

A<br />

E<br />

v M A<br />

v M B<br />

HE<br />

0 5<br />

scale<br />

10 mm<br />

DIMENSIONS (millimetre dimensions are derived from the original inch dimensions)<br />

inches<br />

0.180<br />

0.165<br />

eD<br />

A<br />

A 4<br />

A1<br />

w M<br />

bp<br />

detail X<br />

A1<br />

min.<br />

A4 max.<br />

bp E<br />

max. max. max.<br />

(1) e HE<br />

v w y<br />

(1) Z (1)<br />

β<br />

0.51 3.30<br />

0.53<br />

0.33<br />

0.021<br />

0.013<br />

1.27 0.51 2.16<br />

45 o<br />

D<br />

0.18 0.18 0.10<br />

(1)<br />

A3 b1 eD eE HD<br />

k<br />

k1 Lp<br />

ZD<br />

E<br />

0.020<br />

0.25<br />

0.01 0.13<br />

0.81<br />

0.66<br />

0.032<br />

0.026<br />

24.33<br />

24.13<br />

0.958<br />

0.950<br />

24.33<br />

24.13<br />

0.958<br />

0.950<br />

0.05<br />

23.62<br />

22.61<br />

0.930<br />

0.890<br />

23.62<br />

22.61<br />

0.930<br />

0.890<br />

25.27<br />

25.02<br />

0.995<br />

0.985<br />

25.27<br />

25.02<br />

0.995<br />

0.985<br />

1.22<br />

1.07<br />

0.048<br />

0.042<br />

0.020<br />

1.44<br />

1.02<br />

0.057<br />

0.040<br />

0.007 0.007 0.004<br />

2.16<br />

0.085 0.085<br />

e E<br />

L p<br />

EUROPEAN<br />

PROJECTION<br />

b1<br />

(A )<br />

3<br />

ISSUE DATE<br />

92-11-17<br />

95-03-11


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

24 SOLDERING<br />

24.1 Introduction<br />

There is no soldering method that is ideal for all IC<br />

packages. Wave soldering is often preferred when<br />

through-hole and surface mounted components are mixed<br />

on one printed-circuit board. However, wave soldering is<br />

not always suitable for surface mounted ICs, or for<br />

printed-circuits with high population densities. In these<br />

situations reflow soldering is often used.<br />

This text gives a very brief insight to a complex technology.<br />

A more in-depth account of soldering ICs can be found in<br />

our “IC Package Databook” (order code 9398 652 90011).<br />

24.2 Reflow soldering<br />

Reflow soldering techniques are suitable for all PLCC<br />

packages.<br />

The choice of heating method may be influenced by larger<br />

PLCC packages (44 leads, or more). If infrared or vapour<br />

phase heating is used and the large packages are not<br />

absolutely dry (less than 0.1% moisture content by<br />

weight), vaporization of the small amount of moisture in<br />

them can cause cracking of the plastic body. For more<br />

information, refer to the Drypack chapter in our “Quality<br />

Reference Handbook” (order code 9397 750 00192).<br />

Reflow soldering requires solder paste (a suspension of<br />

fine solder particles, flux and binding agent) to be applied<br />

to the printed-circuit board by screen printing, stencilling or<br />

pressure-syringe dispensing before package placement.<br />

Several techniques exist for reflowing; for example,<br />

thermal conduction by heated belt. Dwell times vary<br />

between 50 and 300 seconds depending on heating<br />

method. Typical reflow temperatures range from<br />

215 to 250 °C.<br />

Preheating is necessary to dry the paste and evaporate<br />

the binding agent. Preheating duration: 45 minutes at<br />

45 °C.<br />

1996 Jun 27 104<br />

24.3 Wave soldering<br />

Wave soldering techniques can be used for all PLCC<br />

packages if the following conditions are observed:<br />

• A double-wave (a turbulent wave with high upward<br />

pressure followed by a smooth laminar wave) soldering<br />

technique should be used.<br />

• The longitudinal axis of the package footprint must be<br />

parallel to the solder flow.<br />

• The package footprint must incorporate solder thieves at<br />

the downstream corners.<br />

During placement and before soldering, the package must<br />

be fixed with a droplet of adhesive. The adhesive can be<br />

applied by screen printing, pin transfer or syringe<br />

dispensing. The package can be soldered after the<br />

adhesive is cured.<br />

Maximum permissible solder temperature is 260 °C, and<br />

maximum duration of package immersion in solder is<br />

10 seconds, if cooled to less than 150 °C within<br />

6 seconds. Typical dwell time is 4 seconds at 250 °C.<br />

A mildly-activated flux will eliminate the need for removal<br />

of corrosive residues in most applications.<br />

24.4 Repairing soldered joints<br />

Fix the component by first soldering two diagonallyopposite<br />

end leads. Use only a low voltage soldering iron<br />

(less than 24 V) applied to the flat part of the lead. Contact<br />

time must be limited to 10 seconds at up to 300 °C. When<br />

using a dedicated tool, all other leads can be soldered in<br />

one operation within 2 to 5 seconds between<br />

270 and 320 °C.


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

25 DEFINITIONS<br />

Data sheet status<br />

Objective specification This data sheet contains target or goal specifications for product development.<br />

Preliminary specification This data sheet contains preliminary data; supplementary data may be published later.<br />

Product specification This data sheet contains final product specifications.<br />

Limiting values<br />

Limiting values given are in accordance with the Absolute Maximum Rating System (IEC 134). Stress above one or<br />

more of the limiting values may cause permanent damage to the device. These are stress ratings only and operation<br />

of the device at these or at any other conditions above those given in the Characteristics sections of the specification<br />

is not implied. Exposure to limiting values for extended periods may affect device reliability.<br />

Application information<br />

Where application information is given, it is advisory and does not form part of the specification.<br />

26 LIFE SUPPORT APPLICATIONS<br />

These products are not designed for use in life support appliances, devices, or systems where malfunction of these<br />

products can reasonably be expected to result in personal injury. Philips customers using or selling these products for<br />

use in such applications do so at their own risk and agree to fully indemnify Philips for any damages resulting from such<br />

improper use or sale.<br />

1996 Jun 27 105


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

NOTES<br />

1996 Jun 27 106


Philips Semiconductors Product specification<br />

8-bit microcontroller with on-chip CAN P8xC592<br />

NOTES<br />

1996 Jun 27 107


Philips Semiconductors – a worldwide company<br />

Argentina: see South America<br />

Australia: 34 Waterloo Road, NORTH RYDE, NSW 2113,<br />

Tel. +61 2 9805 4455, Fax. +61 2 9805 4466<br />

Austria: Computerstr. 6, A-1101 WIEN, P.O. Box 213,<br />

Tel. +43 1 60 101, Fax. +43 1 60 101 1210<br />

Belarus: Hotel Minsk Business Center, Bld. 3, r. 1211, Volodarski Str. 6,<br />

220050 MINSK, Tel. +375 172 200 733, Fax. +375 172 200 773<br />

Belgium: see The Netherlands<br />

Brazil: see South America<br />

Bulgaria: Philips Bulgaria Ltd., Energoproject, 15th floor,<br />

51 James Bourchier Blvd., 1407 SOFIA,<br />

Tel. +359 2 689 211, Fax. +359 2 689 102<br />

Canada: PHILIPS SEMICONDUCTORS/COMPONENTS,<br />

Tel. +1 800 234 7381, Fax. +1 708 296 8556<br />

China/Hong Kong: 501 Hong Kong Industrial Technology Centre,<br />

72 Tat Chee Avenue, Kowloon Tong, HONG KONG,<br />

Tel. +852 2319 7888, Fax. +852 2319 7700<br />

Colombia: see South America<br />

Czech Republic: see Austria<br />

Denmark: Prags Boulevard 80, PB 1919, DK-2300 COPENHAGEN S,<br />

Tel. +45 32 88 2636, Fax. +45 31 57 1949<br />

Finland: Sinikalliontie 3, FIN-02630 ESPOO,<br />

Tel. +358 615 800, Fax. +358 615 80920<br />

France: 4 Rue du Port-aux-Vins, BP317, 92156 SURESNES Cedex,<br />

Tel. +33 1 40 99 6161, Fax. +33 1 40 99 6427<br />

Germany: Hammerbrookstraße 69, D-20097 HAMBURG,<br />

Tel. +49 40 23 52 60, Fax. +49 40 23 536 300<br />

Greece: No. 15, 25th March Street, GR 17778 TAVROS,<br />

Tel. +30 1 4894 339/911, Fax. +30 1 4814 240<br />

Hungary: see Austria<br />

India: Philips INDIA Ltd, Shivsagar Estate, A Block, Dr. Annie Besant Rd.<br />

Worli, MUMBAI 400 018, Tel. +91 22 4938 541, Fax. +91 22 4938 722<br />

Indonesia: see Singapore<br />

Ireland: Newstead, Clonskeagh, DUBLIN 14,<br />

Tel. +353 1 7640 000, Fax. +353 1 7640 200<br />

Israel: RAPAC Electronics, 7 Kehilat Saloniki St, TEL AVIV 61180,<br />

Tel. +972 3 645 0444, Fax. +972 3 648 1007<br />

Italy: PHILIPS SEMICONDUCTORS, Piazza IV Novembre 3,<br />

20124 MILANO, Tel. +39 2 6752 2531, Fax. +39 2 6752 2557<br />

Japan: Philips Bldg 13-37, Kohnan 2-chome, Minato-ku, TOKYO 108,<br />

Tel. +81 3 3740 5130, Fax. +81 3 3740 5077<br />

Korea: Philips House, 260-199 Itaewon-dong, Yongsan-ku, SEOUL,<br />

Tel. +82 2 709 1412, Fax. +82 2 709 1415<br />

Malaysia: No. 76 Jalan Universiti, 46200 PETALING JAYA, SELANGOR,<br />

Tel. +60 3 750 5214, Fax. +60 3 757 4880<br />

Mexico: 5900 Gateway East, Suite 200, EL PASO, TEXAS 79905,<br />

Tel. +1 800 234 7381, Fax. +1 708 296 8556<br />

Middle East: see Italy<br />

For all other countries apply to: Philips Semiconductors, Marketing & Sales Communications,<br />

Building BE-p, P.O. Box 218, 5600 MD EINDHOVEN, The Netherlands, Fax. +31 40 27 24825<br />

Netherlands: Postbus 90050, 5600 PB EINDHOVEN, Bldg. VB,<br />

Tel. +31 40 27 83749, Fax. +31 40 27 88399<br />

New Zealand: 2 Wagener Place, C.P.O. Box 1041, AUCKLAND,<br />

Tel. +64 9 849 4160, Fax. +64 9 849 7811<br />

Norway: Box 1, Manglerud 0612, OSLO,<br />

Tel. +47 22 74 8000, Fax. +47 22 74 8341<br />

Philippines: Philips Semiconductors Philippines Inc.,<br />

106 Valero St. Salcedo Village, P.O. Box 2108 MCC, MAKATI,<br />

Metro MANILA, Tel. +63 2 816 6380, Fax. +63 2 817 3474<br />

Poland: Ul. Lukiska 10, PL 04-123 WARSZAWA,<br />

Tel. +48 22 612 2831, Fax. +48 22 612 2327<br />

Portugal: see Spain<br />

Romania: see Italy<br />

Russia: Philips Russia, Ul. Usatcheva 35A, 119048 MOSCOW,<br />

Tel. +7 095 926 5361, Fax. +7 095 564 8323<br />

Singapore: Lorong 1, Toa Payoh, SINGAPORE 1231,<br />

Tel. +65 350 2538, Fax. +65 251 6500<br />

Slovakia: see Austria<br />

Slovenia: see Italy<br />

South Africa: S.A. PHILIPS Pty Ltd., 195-215 Main Road Martindale,<br />

2092 JOHANNESBURG, P.O. Box 7430 Johannesburg 2000,<br />

Tel. +27 11 470 5911, Fax. +27 11 470 5494<br />

South America: Rua do Rocio 220, 5th floor, Suite 51,<br />

04552-903 São Paulo, SÃO PAULO - SP, Brazil,<br />

Tel. +55 11 821 2333, Fax. +55 11 829 1849<br />

Spain: Balmes 22, 08007 BARCELONA,<br />

Tel. +34 3 301 6312, Fax. +34 3 301 4107<br />

Sweden: Kottbygatan 7, Akalla, S-16485 STOCKHOLM,<br />

Tel. +46 8 632 2000, Fax. +46 8 632 2745<br />

Switzerland: Allmendstrasse 140, CH-8027 ZÜRICH,<br />

Tel. +41 1 488 2686, Fax. +41 1 481 7730<br />

Taiwan: PHILIPS TAIWAN Ltd., 23-30F, 66,<br />

Chung Hsiao West Road, Sec. 1, P.O. Box 22978,<br />

TAIPEI 100, Tel. +886 2 382 4443, Fax. +886 2 382 4444<br />

Thailand: PHILIPS ELECTRONICS (THAILAND) Ltd.,<br />

209/2 Sanpavuth-Bangna Road Prakanong, BANGKOK 10260,<br />

Tel. +66 2 745 4090, Fax. +66 2 398 0793<br />

Turkey: Talatpasa Cad. No. 5, 80640 GÜLTEPE/ISTANBUL,<br />

Tel. +90 212 279 2770, Fax. +90 212 282 6707<br />

Ukraine: PHILIPS UKRAINE, 2A Akademika Koroleva str., Office 165,<br />

252148 KIEV, Tel. +380 44 476 0297/1642, Fax. +380 44 476 6991<br />

United Kingdom: Philips Semiconductors Ltd., 276 Bath Road, Hayes,<br />

MIDDLESEX UB3 5BX, Tel. +44 181 730 5000, Fax. +44 181 754 8421<br />

United States: 811 East Arques Avenue, SUNNYVALE, CA 94088-3409,<br />

Tel. +1 800 234 7381, Fax. +1 708 296 8556<br />

Uruguay: see South America<br />

Vietnam: see Singapore<br />

Yugoslavia: PHILIPS, Trg N. Pasica 5/v, 11000 BEOGRAD,<br />

Tel. +381 11 825 344, Fax.+381 11 635 777<br />

Internet: http://www.semiconductors.philips.com/ps/<br />

(1) P8XC592_3.copy June 26, 1996 11:51 am<br />

© Philips Electronics N.V. 1996 SCA50<br />

All rights are reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner.<br />

The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed<br />

without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license<br />

under patent- or other industrial or intellectual property rights.<br />

Printed in The Netherlands 617021/1200/03/pp108 Date of release: 1996 Jun 27 Document order number: 9397 750 00933

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!