ChipFind - документация

Электронный компонент: C515C

Скачать:  PDF   ZIP

Document Outline

D a t a S h e e t , F e b . 2 0 0 3
M i c r o c o n t r o l l e r s
N e v e r s t o p t h i n k i n g .
C 5 1 5 C
8 - B i t S i n g l e - C h i p M i c r o c o n t r o l l e r
Edition 2003-02
Published by Infineon Technologies AG,
St.-Martin-Strasse 53,
81669 Mnchen, Germany
Infineon Technologies AG 2003.
All Rights Reserved.
Attention please!
The information herein is given to describe certain components and shall not be considered as a guarantee of
characteristics.
Terms of delivery and rights to technical change reserved.
We hereby disclaim any and all warranties, including but not limited to warranties of non-infringement, regarding
circuits, descriptions and charts stated herein.
Information
For further information on technology, delivery terms and conditions and prices please contact your nearest
Infineon Technologies Office in Germany or our Infineon Technologies Representatives worldwide
(
www.infineon.com
).
Warnings
Due to technical requirements components may contain dangerous substances. For information on the types in
question please contact your nearest Infineon Technologies Office.
Infineon Technologies Components may only be used in life-support devices or systems with the express written
approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure
of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support
devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain
and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may
be endangered.
D a t a S h e e t , F e b . 2 0 0 3
C 5 1 5 C
8 - B i t S i n g l e - C h i p M i c r o c o n t r o l l e r
M i c r o c o n t r o l l e r s
N e v e r s t o p t h i n k i n g .
Enhanced Hooks TechnologyTM is a trademark of Infineon Technologies.
C515C Data Sheet

Revision History:
2003-02
Previous Version:
2000-08
Page
Subjects (major changes since last revision)
We Listen to Your Comments
Any information within this document that you feel is wrong, unclear or missing at all?
Your feedback will help us to continuously improve the quality of this document.
Please send your proposal (including a reference to this document) to:
mcdocu.comments@infineon.com
Data Sheet
1
2003-02
C515C
8-Bit Single-Chip Microcontroller
Features
Full upward compatibility with SAB 80C515A
On-chip program memory (with optional memory protection)
C515C-8R 64 Kbytes on-chip ROM
C515C-8E 64 Kbytes on-chip OTP
alternatively up to 64 Kbytes external program memory
256 bytes on-chip RAM
2 Kbytes of on-chip XRAM
Up to 64 Kbytes external data memory
Superset of the 8051 architecture with 8 datapointers
Up to 10 MHz external operating frequency (1
s instruction cycle time at 6 MHz
external clock)
On-chip emulation support logic (Enhanced Hooks Technology)
Current optimized oscillator circuit and EMI optimized design
(further features are on next page)
Figure 1
C515C Functional Units
MCA03646
On-Chip Emulation Support Module
Port 0
Port 1
Port 2
Port 3
RAM
256 x 8
XRAM
CPU
T0
T1
USART
I/O
I/O
I/O
I/O
8 Datapointer
Port 7
Port 6
Port 5
Port 4
Capture/Compare Unit
Timer 2
Full-CAN
Controller
10 Bit ADC
(8 inputs)
Oscillator
Watchdog
Save Modes
Idle/
Power down
Slow down
SSC (SPI)
Interface
I/O
I/O
I/O
Analog/
Digital
Input
Power
Bit
8
2k x 8
C515C-8R : 64k x 8 ROM
Program Memory
C515C-8E : 64k x 8 OTP
C515C
Data Sheet
2
2003-02
Eight ports: 48 + 1 digital I/O lines, 8 analog inputs
Quasi-bidirectional port structure (8051 compatible)
Port 5 selectable for bidirectional port structure (CMOS voltage levels)
Full-CAN controller on-chip
256 register/data bytes are located in external data memory area
max. 1 MBaud at 8 - 10 MHz operating frequency
Three 16-bit timer/counters
Timer 2 can be used for compare/capture functions
10-bit A/D converter with multiplexed inputs and built-in self calibration
Full duplex serial interface with programmable baudrate generator (USART)
SSC synchronous serial interface (SPI compatible)
Master and slave capable
Programmable clock polarity/clock-edge to data phase relation
LSB/MSB first selectable
2.5 MHz transfer rate at 10 MHz operating frequency
Seventeen interrupt vectors, at four priority levels selectable
Extended watchdog facilities
15-bit programmable watchdog timer
Oscillator watchdog
Power saving modes
Slow-down mode
Idle mode (can be combined with slow-down mode)
Software power-down mode with wake-up capability through INT0 or RXDC pin
Hardware power-down mode
CPU running condition output pin
ALE can be switched off
Multiple separate
V
DD
/
V
SS
pin pairs
P-MQFP-80-1 package
Temperature Ranges:
SAB-C515C versions:
T
A
= 0 to 70
C
SAF-C515C versions:
T
A
= -40 to 85
C
SAH-C515C versions:
T
A
= -40 to 110
C
Note: Versions for extended temperature range -40
C to 110
C (SAH-C515C) are
available on request.
The C515C is an enhanced, upgraded version of the SAB 80C515A 8-bit microcontroller
which additionally provides a full CAN interface, a SPI compatible synchronous serial
interface, extended power save provisions, additional on-chip RAM, 64K of on-chip
program memory, two new external interrupts and RFI related improvements. With a
maximum external clock rate of 10 MHz it achieves a 600 ns instruction cycle time (1
s
at 6 MHz).
C515C
Data Sheet
3
2003-02
The C515C-8R contains a non-volatile 64 Kbytes read-only program memory. The
C515C-L is identical to the C515C-8R, except that it lacks the on-chip program memory.
The C515C-8E is the OTP version in the C515C microcontroller with an on-chip
64 Kbytes one-time programmable (OTP) program memory. The C515C is mounted in
a P-MQFP-80-1 package.
If compared to the C515C-8R and C515C-L, the C515C-8E OTP version additionally
provides two features:
The wake-up from software power down mode can, additionally to the external pin
P3.2/INT0 wake-up capability, also be triggered alternatively by a second pin
P4.7/RXDC.
For power consumption reasons the on-chip CAN controller can be switched off.
Note: The term C515C refers to all versions described within this document unless
otherwise noted.
Ordering Information
The ordering code for Infineon Technologies' microcontrollers provides an exact
reference to the required product. This ordering code identifies:
The derivative itself, i.e. its function set
The specified temperature rage
The package and the type of delivery
For the available ordering codes for the C515C please refer to the "Product information
Microcontrollers
", which summarizes all available microcontroller variants.
Note: The ordering codes for the Mask-ROM versions are defined for each product after
verification of the respective ROM code.
Table 1
Differences in Internal Program Memory of the C505 MCUs
Device
Internal Program Memory
ROM
OTP
C515C-LM
C515C-8RM
64 Kbytes
C515C-8EM
64 Kbytes
C515C
Data Sheet
4
2003-02
Figure 2
Logic Symbol
MCL02714
XTAL1
XTAL2
RESET
EA
ALE
PSEN
HWPD
C515C
Port 0
8 Bit Digital I/O
Port 1
Port 2
Port 3
V
AREF
AGND
V
Digital Inputs
Port 7
Port 6
Port 5
Port 4
PE/SWD
8 Bit Digital I/O
8 Bit Digital I/O
8 Bit Digital I/O
8 Bit Digital I/O
8 Bit Digital I/O
1 Bit Digital I/O
8 Bit Analog/
V
SSCLK
DDCLK
V
SSEXT
V
DDEXT
V
CPUR
SSE1
V
V
DDE1
V
SSE2
V
DDE2
DD1
V
SS1
V
C515C
Data Sheet
5
2003-02
Figure 3
C515C Pin Configuration P-MQFP-80-1 (top view)
MCP02715
1 2
N.C.
3 4 5
P6.7/AIN7
6
P6.6/AIN6
7
P6.5/AIN5
8
P6.4/AIN4
9
P6.3/AIN3
10
P6.2/AIN2
11
P6.1/AIN1
12
P6.0/AIN0
13 14 15
P3.0/RXD
16
P3.1/TXD
17
P3.2/INT0
18
P3.3/INT1
19
P3.4/T0
20
P3.5/T1
V
AGND
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
P0.7/AD7
P0.6/AD6
P0.5/AD5
P0.4/AD4
P0.3/AD3
P0.2/AD2
P0.1/AD1
P0.0/AD0
EA
ALE
PSEN
CPUR
P2.7/A15
P2.6/A14
P2.5/A13
P2.4/A12
P2.3/A11
P4.7/RXDC
P4.6/TXDC
P4.5/INT8
P4.4/SLS
P4.3/STO
PE/SWD
P4.2/SRI
P4.1/SCLK
P4.0/ADST
N.C.
HWPD
P5.0
P5.1
P5.2
P5.3
P5.4
P5.5
V
SSE1
P3.6/WR
P3.7/RD
P1.7/T2
P1.6/CLKOUT
P1.5/T2EX
P1.4/INT2
P1.3/INT6/CC3
P1.2/INT5/CC2
P1.1/INT4/CC1
P1.0/INT3/CC0
XTAL2
XTAL1
P2.0/A8
P2.1/A9
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
40
61
P5.6
P5.7
SS1
V
V
DDE1
DD1
V
P2.2/A10
AREF
V
RESET
C515C
V
SSCLK
DDCLK
V
P7.0/INT7
V
DDEXT
SSEXT
V
V
DDE2
SSE2
V
C515C
Data Sheet
6
2003-02
Table 2
Pin Definitions and Functions
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
RESET
1
I
RESET
A low level on this pin for the duration of two
machine cycles while the oscillator is running resets
the C515C. A small internal pullup resistor permits
power-on reset using only a capacitor connected to
V
SS
.
V
AREF
3
Reference voltage for the A/D converter
V
AGND
4
Reference ground for the A/D converter
P6.0-P6.7
12-5
I
Port 6
is an 8-bit unidirectional input port to the
A/D converter. Port pins can be used for digital
input, if voltage levels simultaneously meet the
specifications high/low input voltages and for the
eight multiplexed analog inputs.
P7.0 / INT7 23
I/O
Port 7
is an 1-bit quasi-bidirectional I/O port with internal
pull-up resistor. When a 1 is written to P7.0 it is
pulled high by an internal pull-up resistor, and in that
state can be used as input. As input, P7.0 being
externally pulled low will source current (
I
IL
, in the
DC characteristics) because of the internal pull-up
resistor. If P7.0 is used as interrupt input, its output
latch must be programmed to a one (1). The
secondary function is assigned to the port 7 pin as
follows:
P7.0 INT7, Interrupt 7 input
C515C
Data Sheet
7
2003-02
P3.0-P3.7
15-22
15
16
17
18
19
20
21
22
I/O
Port 3
is an 8-bit quasi-bidirectional I/O port with internal
pullup resistors. Port 3 pins that have 1's written to
them are pulled high by the internal pullup resistors,
and in that state can be used as inputs. As inputs,
port 3 pins being externally pulled low will source
current (
I
IL
, in the DC characteristics) because of
the internal pullup resistors. Port 3 also contains the
interrupt, timer, serial port and external memory
strobe pins that are used by various options. The
output latch corresponding to a secondary function
must be programmed to a one (1) for that function to
operate. The secondary functions are assigned to
the pins of port 3, as follows:
P3.0
RXD
Receiver data input (asynch.) or
data input/output (synch.) of
serial interface
P3.1
TXD
Transmitter data output (asynch.)
or clock output (synch.) of serial
interface
P3.2 INT0
External interrupt 0 input / timer 0
gate control input
P3.3 INT1
External interrupt 1 input / timer 1
gate control input
P3.4
T0
Timer 0 counter input
P3.5
T1
Timer 1 counter input
P3.6 WR
WR control output; latches the
data byte from port 0 into the
external data memory
P3.7 RD
RD control output; enables the
external data memory
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
8
2003-02
P1.0 - P1.7 31-24
31
30
29
28
27
26
25
24
I/O
Port 1
is an 8-bit quasi-bidirectional I/O port with internal
pullup resistors. Port 1 pins that have 1's written to
them are pulled high by the internal pullup resistors,
and in that state can be used as inputs. As inputs,
port 1 pins being externally pulled low will source
current (
I
IL
, in the DC characteristics) because of
the internal pullup resistors. The port is used for the
low-order address byte during program verification.
Port 1 also contains the interrupt, timer, clock,
capture and compare pins that are used by various
options. The output latch corresponding to a
secondary function must be programmed to a one
(1) for that function to operate (except when used for
the compare functions). The secondary functions
are assigned to the port 1 pins as follows:
P1.0 INT3 CC0 Interrupt 3 input / compare 0
output / capture 0 input
P1.1 INT4 CC1 Interrupt 4 input / compare 1
output / capture 1 input
P1.2 INT5 CC2 Interrupt 5 input / compare 2
output / capture 2 input
P1.3 INT6 CC3 Interrupt 6 input / compare 3
output / capture 3 input
P1.4 INT2
Interrupt 2 input
P1.5 T2EX
Timer 2 external reload / trigger
input
P1.6 CLKOUT
System clock output
P1.7 T2
Counter 2 input
XTAL2
36
I
XTAL2
Input to the inverting oscillator amplifier and input to
the internal clock generator circuits.
To drive the device from an external clock source,
XTAL2 should be driven, while XTAL1 is left
unconnected. Minimum and maximum high and low
times as well as rise/fall times specified in the AC
characteristics must be observed.
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
9
2003-02
XTAL1
37
O
XTAL1
Output of the inverting oscillator amplifier.
P2.0-P2.7
38-45
I/O
Port 2
is an 8-bit quasi-bidirectional I/O port with internal
pullup resistors. Port 2 pins that have 1's written to
them are pulled high by the internal pullup resistors,
and in that state can be used as inputs. As inputs,
port 2 pins being externally pulled low will source
current (
I
IL
, in the DC characteristics) because of
the internal pullup resistors.
Port 2 emits the high-order address byte during
fetches from external program memory and during
accesses to external data memory that use 16-bit
addresses (MOVX @DPTR). In this application it
uses strong internal pullup resistors when issuing
1's. During accesses to external data memory that
use 8-bit addresses (MOVX @Ri), port 2 issues the
contents of the P2 special function register.
CPUR
46
O
CPU Running Condition
This output pin is at low level when the CPU is
running and program fetches or data accesses in
the external data memory area are executed. In idle
mode, hardware and software power down mode,
and with an active RESET signal CPUR is set to
high level.
CPUR can be typically used for switching external
memory devices into power saving modes.
PSEN
47
O
The Program Store Enable
output is a control signal that enables the external
program memory to the bus during external fetch
operations. It is activated every six oscillator
periods, except during external data memory
accesses. The signal remains high during internal
program execution.
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
10
2003-02
ALE
48
O
The Address Latch Enable
output is used for latching the address into external
memory during normal operation. It is activated
every six oscillator periods, except during an
external data memory access. ALE can be switched
off when the program is executed internally.
EA
49
I
External Access Enable
When held high, the C515C executes instructions
always from the internal ROM. When held low, the
C515C fetches all instructions from external
program memory.
Note: For the ROM protection version EA pin is
latched during reset.
P0.0-P0.7
52-59
I/O
Port 0
is an 8-bit open-drain bidirectional I/O port.
Port 0 pins that have 1's written to them float, and in
that state can be used as high-impedance inputs.
Port 0 is also the multiplexed low-order address and
data bus during accesses to external program and
data memory. In this application it uses strong
internal pullup resistors when issuing 1's.
Port 0 also outputs the code bytes during program
verification in the C515C. External pullup resistors
are required during program verification.
P5.0-P5.7
67-60
I/O
Port 5
is an 8-bit quasi-bidirectional I/O port with internal
pullup resistors. Port 5 pins that have 1's written to
them are pulled high by the internal pullup resistors,
and in that state can be used as inputs. As inputs,
port 5 pins being externally pulled low will source
current (
I
IL
, in the DC characteristics) because of
the internal pullup resistors.
Port 5 can also be switched into a bidirectional
mode, in which CMOS levels are provided. In this
bidirectional mode, each port 5 pin can be
programmed individually as input or output.
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
11
2003-02
HWPD
69
I
Hardware Power Down
A low level on this pin for the duration of one
machine cycle while the oscillator is running resets
the C515C.
A low level for a longer period will force the part to
power down mode with the pins floating.
P4.0-P4.7
72-74, 76-80
72
73
74
76
77
78
79
80
I/O
Port 4
is an 8-bit quasi-bidirectional I/O port with internal
pull-up resistors. Port 4 pins that have 1's written to
them are pulled high by the internal pull-up resistors,
and in that state can be used as inputs. As inputs,
port 4 pins being externally pulled low will source
current (
I
IL
, in the DC characteristics) because of
the internal pull-up resistors.
P4 also contains the external A/D converter control
pin, the SSC pins, the CAN controller input/output
lines, and the external interrupt 8 input. The output
latch corresponding to a secondary function must
be programmed to a one (1) for that function to
operate. The alternate functions are assigned to
port 4 as follows:
P4.0 ADST
External A/D converter start pin
P4.1 SCLK
SSC Master Clock Output /
SSC Slave Clock Input
P4.2 SRI
SSC Receive Input
P4.3 STO
SSC Transmit Output
P4.4 SLS
Slave Select Input
P4.5 INT8
External interrupt 8 input
P4.6 TXDC
Transmitter output of the CAN
controller
P4.7 RXDC
Receiver input of the CAN controller
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
12
2003-02
PE/SWD
75
I
Power saving mode enable / Start watchdog
timer
A low level on this pin allows the software to enter
the power down, idle and slow down mode. In case
the low level is also seen during reset, the watchdog
timer function is off on default.
Use of the software controlled power saving modes
is blocked, when this pin is held on high level. A high
level during reset performs an automatic start of the
watchdog timer immediately after reset. When left
unconnected this pin is pulled high by a weak
internal pull-up resistor.
V
SSCLK
13
Ground (0 V) for on-chip oscillator
This pin is used for ground connection of the on-chip
oscillator circuit.
V
DDCLK
14
Supply voltage for on-chip oscillator
This pin is used for power supply of the on-chip
oscillator circuit.
V
DDE1
V
DDE2
32
68
Supply voltage for I/O ports
These pins are used for power supply of the I/O
ports during normal, idle, and power down mode.
V
SSE1
V
SSE2
35
70
Ground (0 V) for I/O ports
These pins are used for ground connections of the
I/O ports during normal, idle, and power down
mode.
V
DD1
33
Supply voltage for internal logic
This pins is used for the power supply of the internal
logic circuits during normal, idle, and power down
mode.
V
SS1
34
Ground (0 V) for internal logic
This pin is used for the ground connection of the
internal logic circuits during normal, idle, and power
down mode.
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
13
2003-02
V
DDEXT
50
Supply voltage for external access pins
This pin is used for power supply of the I/O ports and
control signals which are used during external
accesses (for Port 0, Port 2, ALE, PSEN, P3.6/WR,
and P3.7/RD).
V
SSEXT
51
Ground (0 V) for external access pins
This pin is used for the ground connection of the I/O
ports and control signals which are used during
external accesses (for Port 0, Port 2, ALE, PSEN,
P3.6/WR, and P3.7/RD).
N.C.
2, 71
Not connected
These pins should not be connected.
1)
I = Input; O = Output
Table 2
Pin Definitions and Functions (cont'd)
Symbol
Pin Number
I/O
1)
Function
P-MQFP-80-1
C515C
Data Sheet
14
2003-02
Figure 4
Block Diagram of the C515C
MCB03647
Oscillator Watchdog
OSC & Timing
CPU
Timer 1
Timer 2
A/D Converter
Timer 0
S & H
MUX
XRAM
2k x 8
256 x 8
RAM
ROM/OTP
Port 0
Port 1
Port 2
Port 3
Port 0
Port 1
Port 2
XTAL2
XTAL1
RESET
ALE
EA
V
AGND
AREF
V
Support
Emulation
Logic
8 Datapointers
Programmable
Watchdog Timer
PSEN
PE/SWD
HWPD
Capture
Compare Unit
Port 7
Port 6
Port 5
Port 4
V
C515C
8 Bit Digital I/O
8 Bit Analog/
Multiple
Lines
/
DD
SS
V
64k x 8
CPUR
8 Bit Digital I/O
8 Bit Digital I/O
Baud Rate Generator
SSC (SPI) Interface
Digital Inputs
Port 5
Port 4
Port 3
Port 6
Port 7
1 Bit Digital I/O
Reg./Data
256 Byte
Full-CAN
Controller
Interrupt Unit
10 Bit
USART
8 Bit Digital I/O
8 Bit Digital I/O
8 Bit Digital I/O
C515C
Data Sheet
15
2003-02
CPU
The C515C is efficient both as a controller and as an arithmetic processor. It has
extensive facilities for binary and BCD arithmetic and excels in its bit-handling
capabilities. Efficient use of program memory results from an instruction set consisting
of 44% one-byte, 41% two-byte, and 15% three-byte instructions. With a 6 MHz crystal,
58% of the instructions are executed in 1
s (10 MHz: 600 ns).
PSW
Special Function Register
(D0
H
)
Reset Value: 00
H
Bit
Function
CY
Carry Flag
Used by arithmetic instruction.
AC
Auxiliary Carry Flag
Used by instructions which execute BCD operations.
F0
General Purpose Flag
RS1
RS0
Register Bank select control bits
These bits are used to select one of the four register banks.
OV
Overflow Flag
Used by arithmetic instruction.
F1
General Purpose Flag
P
Parity Flag
Set/cleared by hardware after each instruction to indicate an
odd/even number of "one" bits in the accumulator, i.e. even parity.
CY
AC
F0
RS1
RS0
OV
F1
P
D0
H
PSW
D7
H
D6
H
D5
H
D4
H
D3
H
D2
H
D1
H
D0
H
Bit No.
MSB
LSB
RS1
RS0
Function
0
0
Bank 0 selected, data address 00
H
-07
H
0
1
Bank 1 selected, data address 08
H
-0F
H
1
0
Bank 2 selected, data address 10
H
-17
H
1
1
Bank 3 selected, data address 18
H
-1F
H
C515C
Data Sheet
16
2003-02
Memory Organization
The C515C CPU manipulates data and operands in the following five address spaces:
up to 64 Kbytes of internal/external program memory
up to 64 Kbytes of external data memory
256 bytes of internal data memory
256 bytes CAN controller registers / data memory
2 Kbytes of internal XRAM data memory
a 128 byte special function register area
Figure 5
illustrates the memory address spaces of the C515C.
Figure 5
C515C Memory Map
MCD02717
00 H
H
7F
0000 H
External
FFFF H
"Code Space"
"Data Space"
"Internal Data Space"
H
0000
H
FFFF
External
F800 H
Internal
XRAM
RAM
Internal
Internal
RAM
FF H
H
80
Function
Special
Register
Direct
Address
80 H
H
FF
Address
Indirect
(2 KByte)
(EA = 0)
(EA = 1)
Internal
H
F6FF
Data
External
Memory
(256 Byte)
Controller
Int. CAN
H
F700
F7FF H
Alternatively
C515C
Data Sheet
17
2003-02
Control of XRAM/CAN Controller Access
The XRAM in the C515C is a memory area that is logically located at the upper end of
the external memory space, but is integrated on the chip. Because the XRAM and the
CAN controller is used in the same way as external data memory the same instruction
types (MOVX) must be used for accessing the XRAM. Two bits in SFR SYSCON,
XMAP0 and XMAP1, control the accesses to the XRAM and the CAN controller.
SYSCON
Special Function Register
(B1
H
)
C515C-8R Reset Value: X010XX01
B
C515C-8E Reset Value: X010X001
B
Bit XMAP0 is hardware protected. If it is reset once (XRAM/CAN controller access
enabled) it cannot be set by software. Only a reset operation will set the XMAP0 bit
again.
Bit
Function
XMAP1
XRAM/CAN controller visible access control
Control bit for RD/WR signals during XRAM/CAN Controller
accesses. If addresses are outside the XRAM/CAN controller
address range or if XRAM is disabled, this bit has no effect.
XMAP1 = 0: The signals RD and WR are not activated during
accesses to the XRAM/CAN Controller
XMAP1 = 1: Ports 0, 2 and the signals RD and WR are activated
during accesses to XRAM/CAN Controller. In this
mode, address and data information during
XRAM/CAN Controller accesses are visible externally.
XMAP0
Global XRAM/CAN controller access enable/disable control
XMAP0 = 0: The access to XRAM and CAN controller is enabled.
XMAP0 = 1: The access to XRAM and CAN controller is disabled
(default after reset). All MOVX accesses are
performed via the external bus. Further, this bit is
hardware protected.
7
6
5
4
3
2
1
0
Bit No.
MSB
LSB
EALE
RMAP
B1H
SYSCON
CSWO XMAP1
PMOD
XMAP0
The function of the shaded bits is not described in this section.
C515C
Data Sheet
18
2003-02
The XRAM/CAN controller can be accessed by read/write instructions (MOVX A,DPTR,
MOVX @DPTR,A), which use the 16-bit DPTR for indirect addressing. For accessing the
XRAM or CAN controller, the effective address stored in DPTR must be in the range of
F700
H
to FFFF
H
.
The XRAM can be also accessed by read/write instructions (MOVX A,@Ri, MOVX
@Ri,A), which use only an 8-bit address (indirect addressing with registers R0 or R1).
Therefore, a special page register XPAGE which provides the upper address information
(A8-A15) during 8-bit XRAM accesses. The behaviour of Port 0 and P2 during a MOVX
access depends on the control bits XMAP0 and XMAP1 in register SYSCON and on the
state of pin
EA
.
Table 3
lists the various operating conditions.
C515C
Data Sheet
19
2003-02
modes compatible to 8051/C501 family
Table 3
Behaviour of P0/P2 and RD/WR During MOVX Accesses
XMAP1, XMAP0
00
10
X1
EA = 0
MOVX
@DPTR
DPTR
<
XRAM/CAN
address range
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
DPTR
XRAMCAN
address range
a) P0/P2
Bus
(RD/WR-Data)
b) RD/WR inactive
c) XRAM is used
a) P0/P2
Bus
(RD/WR-Data)
b) RD/WR active
c) XRAM is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
MOVX
@ Ri
XPAGE
<
XRAMCAN
addr. page
range
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
XPAGE
XRAMCAN
addr. page
range
a) P0
Bus
(RD/WR-Data)
P2
I/O
b) RD/WR inactive
c) XRAM is used
a) P0
Bus
(RD/WR-Data only)
P2
I/O
b) RD/WR active
c) XRAM is used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
EA = 1
MOVX
@DPTR
DPTR
<
XRAM/CAN
address range
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
DPTR
XRAMCAN
address range
a) P0/P2
/0
b) RD/WR inactive
c) XRAM is used
a) P0/P2
Bus
(RD/WR-Data)
b) RD/WR active
c) XRAM is used
a) P0/P2
Bus
b) RD/WR active
c) ext.memory
is used
MOVX
@ Ri
XPAGE
<
XRAMCAN
addr. page
range
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory is
used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
XPAGE
XRAMCAN
addr. page
range
a) P2
I/O
P0/P2
I/O
b) RD/WR inactive
c) XRAM is used
a) P0
Bus
(RD/WR-Data)
P2
I/O
b) RD/WR active
c) XRAM is used
a) P0
Bus
P2
I/O
b) RD/WR active
c) ext.memory
is used
C515C
Data Sheet
20
2003-02
Reset and System Clock
The reset input is an active low input at pin RESET. Since the reset is synchronized
internally, the RESET pin must be held low for at least two machine cycles (12 oscillator
periods) while the oscillator is running. A pullup resistor is internally connected to
V
DD
to
allow a power-up reset with an external capacitor only. An automatic reset can be
obtained when
V
DD
is applied by connecting the RESET pin to
V
SS
via a capacitor.
Figure 6
shows the possible reset circuitries.
Figure 6
Reset Circuitries
Figure 7
shows the recommended oscillator circiutries for crystal and external clock
operation.
MCS02721
RESET
C515C
b)
a)
c)
+
+
&
RESET
RESET
C515C
C515C
C515C
Data Sheet
21
2003-02
Figure 7
Recommended Oscillator Circuitries
Multiple Datapointers
As a functional enhancement to the standard 8051 architecture, the C515C contains
eight 16-bit datapointers instead of only one datapointer. The instruction set uses just
one of these datapointers at a time. The selection of the actual datapointer is done in the
special function register DPSEL.
Figure 8
illustrates the datapointer addressing
mechanism.
Figure 8
External Data Memory Addressing using Multiple Datapointers
MCT02765
XTAL1
XTAL2
XTAL2
XTAL1
Crystal/Resonator Oscillator Mode
Driving from External Source
External Oscillator
Signal
N.C.
2 - 10 MHz
C
C
C = 20 pF 10 pF (incl. stray capacitance)
Crystal Mode
:
:
Resonator Mode
= depends on selected ceramic resonator
C
DPH(83 )
DPL(82 )
DPTR0
DPTR7
.0
.1
.2
-
-
-
-
-
DPSEL(92 )
DPSEL
Selected
Data-
pointer
.2
.1
.0
DPTR 0
0
0
0
0
0
1
DPTR 1
0
1
0
DPTR 2
0
1
1
DPTR 3
1
0
0
DPTR 4
1
0
1
DPTR 5
1
1
0
DPTR 6
1
1
1
DPTR 7
MCD00779
External Data Memory
H
H
H
C515C
Data Sheet
22
2003-02
Enhanced Hooks Emulation Concept
The Enhanced Hooks Emulation Concept of the C500 microcontroller family is a new,
innovative way to control the execution of C500 MCUs and to gain extensive information
on the internal operation of the controllers. Emulation of on-chip ROM based programs
is possible, too.
Each production chip has built-in logic for the support of the Enhanced Hooks Emulation
Concept. Therefore, no costly bond-out chips are necessary for emulation. This also
ensure that emulation and production chips are identical.
The Enhanced Hooks Technology, which requires embedded logic in the C500 allows
the C500 together with an EH-IC to function similar to a bond-out chip. This simplifies the
design and reduces costs of an ICE-system. ICE-systems using an EH-IC and a
compatible C500 are able to emulate all operating modes of the different versions of the
C500 microcontrollers. This includes emulation of ROM, ROM with code rollover and
ROMless modes of operation. It is also able to operate in single step mode and to read
the SFRs after a break.
Figure 9
Basic C500 MCU Enhanced Hooks Concept Configuration
Port 0, port 2 and some of the control lines of the C500 based MCU are used by
Enhanced Hooks Emulation Concept to control the operation of the device during
emulation and to transfer informations about the program execution and data transfer
between the external emulation hardware (ICE-system) and the C500 MCU.
MCS03280
SYSCON
PCON
TCON
RESET
EA
PSEN
ALE
0
2
Port
Port
I/O Ports
Optional
Port 3
Port 1
C500
MCU
Interface Circuit
Enhanced Hooks
RPort 0
RPort 2
RTCON
RPCON
RSYSCON
TEA
TALE TPSEN
EH-IC
Target System Interface
ICE-System Interface
to Emulation Hardware
C515C
Data Sheet
23
2003-02
Special Function Registers
The registers, except the program counter and the four general purpose register banks,
reside in the special function register area. The special function register area consists of
two portions: the standard special function register area and the mapped special function
register area. Two special function registers of the C515C (PCON1 and DIR5) are
located in the mapped special function register area. For accessing the mapped special
function register area, bit RMAP in special function register SYSCON must be set. All
other special function registers are located in the standard special function register area
which is accessed when RMAP is cleared ("0"). As long as bit RMAP is set, mapped
special function register area can be accessed. This bit is not cleared by hardware
automatically. Thus, when non-mapped/mapped registers are to be accessed, the bit
RMAP must be cleared/set by software, respectively each.
SYSCON
Special Function Register
(B1
H
)
C515C-8R Reset Value: X010XX01
B
C515C-8E Reset Value: X010X001
B
The 59 special function registers (SFRs) in the standard and mapped SFR area include
pointers and registers that provide an interface between the CPU and the other on-chip
peripherals. The SFRs of the C515C are listed in
Table 4
and
Table 5
. In
Table 4
they
are organized in groups which refer to the functional blocks of the C515C. The CAN-
SFRs are also included in
Table 4
.
Table 5
illustrates the contents of the SFRs in
numeric order of their addresses.
Table 6
list the CAN-SFRs in numeric order of their
addresses.
Bit
Function
RMAP
Special function register map bit
RMAP = 0: The access to the non-mapped (standard) special
function register area is enabled (reset value).
RMAP = 1: The access to the mapped special function register
area is enabled.
7
6
5
4
3
2
1
0
Bit No.
MSB
LSB
EALE
RMAP
B1H
SYSCON
CSWO XMAP1
PMOD
XMAP0
The function of the shaded bits is not described in this section.
C515C
Data Sheet
24
2003-02
Table 4
Special Function Registers - Functional Block
Block
Symbol
Name
Addr
Contents after
Reset
CPU
ACC
B
DPH
DPL
DPSEL
PSW
SP
SYSCON
1)
Accumulator
B-Register
Data Pointer, High Byte
Data Pointer, Low Byte
Data Pointer Select Register
Program Status Word Register
Stack Pointer
System Control Register
C515C-8R
C515C-8E
E0
H
2)
F0
H
2)
83
H
82
H
92
H
D0
H
2)
81
H
B1
H
B1
H
00
H
00
H
00
H
00
H
XXXXX000
B
3)
00
H
07
H
X010XX01
B
3)
X010X001
B
3)
A/D-
Converter
ADCON0
1)
ADCON1
ADDATH
ADDATL
A/D Converter Control Register 0
A/D Converter Control Register 1
A/D Converter Data Register High Byte
A/D Converter Data Register Low Byte
D8
H
2)
DC
H
D9
H
DA
H
00
H
0XXXX000
B
3)
00
H
00XXXXXX
B
3)
Interrupt
System
IEN0
1)
IEN1
1)
IEN2
IP0
1)
IP1
TCON
1)
T2CON
1)
SCON
1)
IRCON
Interrupt Enable Register 0
Interrupt Enable Register 1
Interrupt Enable Register 2
Interrupt Priority Register 0
Interrupt Priority Register 1
Timer Control Register
Timer 2 Control Register
Serial Channel Control Register
Interrupt Request Control Register
A8
H
2)
B8
H
2)
9A
H
A9
H
B9
H
88
H
2)
C8
H
2)
98
H
2)
C0
H
2)
00
H
00
H
XX00X00X
B
3)
00
H
0X000000
B
3)
00
H
00
H
00
H
00
H
XRAM
XPAGE
SYSCON
1)
Page Address Register for Extended
on-chip XRAM and CAN Controller
System Control Register
C515C-8R
C515C-8E
91
H
B1
H
B1
H
00
H
X010XX01
B
3)
X010X001
B
3)
Ports
P0
P1
P2
P3
P4
P5
DIR5
P6
P7
SYSCON
1)
Port 0
Port 1
Port 2
Port 3
Port 4
Port 5
Port 5 Direction Register
Port 6, Analog/Digital Input
Port 7
System Control Register
C515C-8R
C515C-8E
80
H
2)
90
H
2)
A0
H
2)
B0
H
2)
E8
H
2)
F8
H
2)
F8
H
2)4)
DB
H
FA
H
B1
H
FF
H
FF
H
FF
H
FF
H
FF
H
FF
H
FF
H

XXXXXXX1
B
3)
X010XX01
B
3)
X010X001
B
3)
Watchdog
WDTREL
IEN0
1)
IEN1
1)
IP0
1)
Watchdog Timer Reload Register
Interrupt Enable Register 0
Interrupt Enable Register 1
Interrupt Priority Register 0
86
H
A8
H
2)
B8
H
2)
A9
H
00
H
00
H
00
H
00
H
C515C
Data Sheet
25
2003-02
Serial
Channel
ADCON0
1)
PCON
1)
SBUF
SCON
SRELL
SRELH
A/D Converter Control Register 0
Power Control Register
Serial Channel Buffer Register
Serial Channel Control Register
Serial Channel Reload Register, low byte
Serial Channel Reload Register, high byte
D8
H
2)
87
H
99
H
98
H
2)
AA
H
BA
H
00
H
00
H
XX
H
3)
00
H
D9
H
XXXXXX11
B
3)
CAN
Controller
CR
SR
IR
BTR0
BTR1
GMS0
GMS1
UGML0
UGML1
LGML0
LGML1
UMLM0
UMLM1
LMLM0
LMLM1
MCR0
MCR1
UAR0
UAR1
LAR0
LAR1
MCFG
DB0n
DB1n
DB2n
DB3n
DB4n
DB5n
DB6n
DB7n
Control Register
Status Register
Interrupt Register
Bit Timing Register Low
Bit Timing Register High
Global Mask Short Register Low
Global Mask Short Register High
Upper Global Mask Long Register Low
Upper Global Mask Long Register High
Lower Global Mask Long Register Low
Lower Global Mask Long Register High
Upper Mask of Last Message Register
Low
Upper Mask of Last Message Register
High
Lower Mask of Last Message Register
Low
Lower Mask of Last Message Register
High
Message Object Registers:
Message Control Register Low
Message Control Register High
Upper Arbitration Register Low
Upper Arbitration Register High
Lower Arbitration Register Low
Lower Arbitration Register High
Message Configuration Register
Message Data Byte 0
Message Data Byte 1
Message Data Byte 2
Message Data Byte 3
Message Data Byte 4
Message Data Byte 5
Message Data Byte 6
Message Data Byte 7
F700
H
F701
H
F702
H
F704
H
F705
H
F706
H
F707
H
F708
H
F709
H
F70A
H
F70B
H
F70C
H
F70D
H
F70E
H
F70F
H
F7n0
H
5)
F7n1
H
5)
F7n2
H
5)
F7n3
H
5)
F7n4
H
5)
F7n5
H
5)
F7n6
H
5)
F7n7
H
5)
F7n8
H
5)
F7n9
H
5)
F7nA
H
5)
F7nB
H
5)
F7nC
H
5)
F7nD
H
5)
F7nE
H
5)
101
H
XX
H
6)
XX
H
6)
UU
H
6)
0UUUUUUU
B
6)
UU
H
6)
UUU11111
B
6)
UU
H
6)
UU
H
6)
UU
H
6)
UUUUU000
B
6)
UU
H
6)
UU
H
6)
UU
H
6)
UUUUU000
B
6)
UU
H
6)
UU
H
6)
UU
H
6)
UU
H
6)
UU
H
6)
UUUUU000
B
6)
UUUUUU00
B
6)
XX
H
6)
XX
H
6)
XX
H
6)
XX
H
6)
XX
H
6)
XX
H
6)
XX
H
6)
XX
H
6)
Table 4
Special Function Registers - Functional Block (cont'd)
Block
Symbol
Name
Addr
Contents after
Reset
C515C
Data Sheet
26
2003-02
SSC
Interface
SSCCON
STB
SRB
SCF
SCIEN
SSCMOD
SSC Control Register
SSC Transmit Buffer
SSC Receive Register
SSC Flag Register
SSC Interrupt Enable Register
SSC Mode Test Register
93
H
2)
94
H
95
H
AB
H
2)
AC
H
96
H
07
H
XX
H
3)
XX
H
3)
XXXXXX00
B
3)
XXXXXX00
B
3)
00
H
Timer 0/
Timer 1
TCON
TH0
TH1
TL0
TL1
TMOD
Timer 0/1 Control Register
Timer 0, High Byte
Timer 1, High Byte
Timer 0, Low Byte
Timer 1, Low Byte
Timer Mode Register
88
H
2)
8C
H
8D
H
8A
H
8B
H
89
H
00
H
00
H
00
H
00
H
00
H
00
H
Compare/
Capture Unit/
Timer 2
CCEN
CCH1
CCH2
CCH3
CCL1
CCL2
CCL3
CRCH
CRCL
TH2
TL2
T2CON
Comp./Capture Enable Reg.
Comp./Capture Reg. 1, High Byte
Comp./Capture Reg. 2, High Byte
Comp./Capture Reg. 3, High Byte
Comp./Capture Reg. 1, Low Byte
Comp./Capture Reg. 2, Low Byte
Comp./Capture Reg. 3, Low Byte
Com./Rel./Capt. Reg. High Byte
Com./Rel./Capt. Reg. Low Byte
Timer 2, High Byte
Timer 2, Low Byte
Timer 2 Control Register
C1
H
C3
H
C5
H
C7
H
C2
H
C4
H
C6
H
CB
H
CA
H
CD
H
CC
H
C8
H
2)
00
H
00
H
00
H
00
H
00
H
00
H
00
H
00
H
00
H
00
H
00
H
00
H
Power Save
Modes
PCON
1)
PCON1
Power Control Register
Power Control Register 1
C515C-8R
C515C-8E
87
H
88
H
7)
88
H
7)
00
H
0XXXXXXX
B
3)
0XX0XXXX
B
3)
1)
This special function register is listed repeatedly since some bits of it also belong to other functional blocks.
2)
Bit-addressable special function registers
3)
"X" means that the value is undefined and the location is reserved.
4)
This SFR is a mapped SFR. For accessing this SFR, bit PDIR in SFR IP1 must be set.
5)
The notation "n" in the message object address definition defines the number of the related message object.
6)
"X" means that the value is undefined and the location is reserved. "U" means that the value is unchanged by
a reset operation. "U" values are undefined (as "X") after a power-on reset operation.
7)
SFR is located in the mapped SFR area. For accessing this SFR, bit RMAP in SFR SYSCON must be set.
Table 4
Special Function Registers - Functional Block (cont'd)
Block
Symbol
Name
Addr
Contents after
Reset
C515C
Data Sheet
27
2003-02
Table 5
Contents of the SFRs, SFRs in Numeric Order
of their Addresses
Addr. Register
Content
after
Reset
1)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
80
H
2)
P0
FF
H
.7
.6
.5
.4
.3
.2
.1
.0
81
H
SP
07
H
.7
.6
.5
.4
.3
.2
.1
.0
82
H
DPL
00
H
.7
.6
.5
.4
.3
.2
.1
.0
83
H
DPH
00
H
.7
.6
.5
.4
.3
.2
.1
.0
86
H
WDTREL
00
H
WDT
PSEL
.6
.5
.4
.3
.2
.1
.0
87
H
PCON
00
H
SMOD
PDS
IDLS
SD
GF1
GF0
PDE
IDLE
88
H
2)
TCON
00
H
TF1
TR1
TF0
TR0
IE1
IT1
IE0
IT0
88
H
3)
PCON1
4)
0XXX-
XXXX
B
EWPD
88
H
3)
PCON1
5)
0XX0-
XXXX
B
EWPD
WS
89
H
TMOD
00
H
GATE
C/T
M1
M0
GATE
C/T
M1
M0
8A
H
TL0
00
H
.7
.6
.5
.4
.3
.2
.1
.0
8B
H
TL1
00
H
.7
.6
.5
.4
.3
.2
.1
.0
8C
H
TH0
00
H
.7
.6
.5
.4
.3
.2
.1
.0
8D
H
TH1
00
H
.7
.6
.5
.4
.3
.2
.1
.0
90
H
2)
P1
FF
H
T2
CLK-
OUT
T2EX
INT2
INT6
INT5
INT4
INT3
91
H
XPAGE
00
H
.7
.6
.5
.4
.3
.2
.1
.0
92
H
DPSEL
XXXX-
X000
B
.2
.1
.0
93
H
SSCCON
07
H
SCEN
TEN
MSTR
CPOL
CPHA
BRS2
BRS1
BRS0
94
H
STB
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
95
H
SRB
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
96
H
SSCMOD
00
H
LOOPB TRIO
0
0
0
0
0
LSBSM
98
H
2)
SCON
00
H
SM0
SM1
SM2
REN
TB8
RB8
TI
RI
99
H
SBUF
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
9A
H
IEN2
X00X-
X00X
B
EX8
EX7
ESSC
ECAN
A0
H
2)
P2
FF
H
.7
.6
.5
.4
.3
.2
.1
.0
A8
H
2)
IEN0
00
H
EAL
WDT
ET2
ES
ET1
EX1
ET0
EX0
A9
H
IP0
00
H
OWDS
WDTS
.5
.4
.3
.2
.1
.0
C515C
Data Sheet
28
2003-02
AA
H
SRELL
D9
H
.7
.6
.5
.4
.3
.2
.1
.0
AB
H
SCF
XXXX-
XX00
B
WCOL
TC
AC
H
SCIEN
XXXX-
XX00
B
WCEN
TCEN
B0
H
2)
P3
FF
H
RD
WR
T1
T0
INT1
INT0
TxD
RxD
B1
H
SYSCON
4)
X010-
XX01
B
PMOD
EALE
RMAP
XMAP1
XMAP0
B1
H
SYSCON
5)
X010-
X001
B
PMOD
EALE
RMAP
CSWO
XMAP1
XMAP0
B8
H
2)
IEN1
00
H
EXEN2
SWDT
EX6
EX5
EX4
EX3
EX2
EADC
B9
H
IP1
0X00-
0000
B
PDIR
.5
.4
.3
.2
.1
.0
BA
H
SRELH
XXXX-
XX11
B
.1
.0
C0
H
2)
IRCON
00
H
EXF2
TF2
IEX6
IEX5
IEX4
IEX3
IEX2
IADC
C1
H
CCEN
00
H
COCA
H3
COCA
L3
COCA
H2
COCA
L2
COCA
H1
COCA
L1
COCA
H0
COCA
L0
C2
H
CCL1
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C3
H
CCH1
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C4
H
CCL2
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C5
H
CCH2
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C6
H
CCL3
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C7
H
CCH3
00
H
.7
.6
.5
.4
.3
.2
.1
.0
C8
H
2)
T2CON
00
H
T2PS
I3FR
I2FR
T2R1
T2R0
T2CM
T2I1
T2I0
CA
H
CRCL
00
H
.7
.6
.5
.4
.3
.2
.1
.0
CB
H
CRCH
00
H
.7
.6
.5
.4
.3
.2
.1
.0
CC
H
TL2
00
H
.7
.6
.5
.4
.3
.2
.1
.0
CD
H
TH2
00
H
.7
.6
.5
.4
.3
.2
.1
.0
Table 5
Contents of the SFRs, SFRs in Numeric Order
of their Addresses
(cont'd)
Addr. Register
Content
after
Reset
1)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
C515C
Data Sheet
29
2003-02
D0
H
2)
PSW
00
H
CY
AC
F0
RS1
RS0
OV
F1
P
D8
H
2)
ADCON0
00
H
BD
CLK
ADEX
BSY
ADM
MX2
MX1
MX0
D9
H
ADDATH
00
H
.9
.8
.7
.6
.5
.4
.3
.2
DA
H
ADDATL
00XX-
XXXX
B
.1
.0
DB
H
P6
.7
.6
.5
.4
.3
.2
.1
.0
DC
H
ADCON1
0XXX-
X000
B
ADCL
0
MX2
MX1
MX0
E0
H
2)
ACC
00
H
.7
.6
.5
.4
.3
.2
.1
.0
E8
H
2)
P4
FF
H
RXDC
TXDC
INT8
SLS
STO
SRI
SCLK
ADST
F0
H
2)
B
00
H
.7
.6
.5
.4
.3
.2
.1
.0
F8
H
2)
P5
FF
H
.7
.6
.5
.4
.3
.2
.1
.0
F8
H
2)
DIR5
6)
FF
H
.7
.6
.5
.4
.3
.2
.1
.0
FA
H
P7
XXXX-
XXX1
B
INT7
FC
H
VR0
7)8)
C5
H
1
1
0
0
0
1
0
1
FD
H
VR1
7)8)
95
H
1
0
0
1
0
1
0
1
FE
H
VR2
7)8)
02
H
9)
0
0
0
0
0
0
1
0
1)
"X" means that the value is undefined and the location is reserved.
2)
Bit-addressable special function registers
3)
SFR is located in the mapped SFR area. For accessing this SFR, bit RMAP in SFR SYSCON must be set.
4)
This SFR is available in the C515C-8R and C515C-L.
5)
This SFR is available in the C515C-8E.
6)
This SFR is a mapped SFR. For accessing this SFR, bit PDIR in SFR IP1 must be set.
7)
This SFR is a mapped SFR. For accessing this SFR, bit RMAP in SFR SYSCON must be set.
8)
These SFRs are read-only registers (C515C-8E only).
9)
The content of this SFR varies with the actual step of the C515C-8E (e.g. 01
H
for the first step).
Table 5
Contents of the SFRs, SFRs in Numeric Order
of their Addresses
(cont'd)
Addr. Register
Content
after
Reset
1)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
C515C
Data Sheet
30
2003-02
Table 6
Contents of the CAN Registers in Numeric Order
of their Addresses
Addr.
n = 1 to F
H
1)
Regis-
ter
Content
after
Reset
2)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
F700
H
CR
01
H
TEST
CCE
0
0
EIE
SIE
IE
INIT
F701
H
SR
XX
H
BOFF
EWRN
RXOK
TXOK
LEC2
LEC1
LEC0
F702
H
IR
XX
H
INTID
F704
H
BTR0
UU
H
SJW
BRP
F705
H
BTR1
0UUU.
UUUU
B
0
TSEG2
TSEG1
F706
H
GMS0
UU
H
ID28-21
F707
H
GMS1
UUU1.
1111
B
ID20-18
1
1
1
1
1
F708
H
UGML0
UU
H
ID28-21
F709
H
UGML1
UU
H
ID20-13
F70A
H
LGML0
UU
H
ID12-5
F70B
H
LGML1
UUUU.
U000
B
ID4-0
0
0
0
F70C
H
UMLM0
UU
H
ID28-21
F70D
H
UMLM1
UU
H
ID20-18
ID17-13
F70E
H
LMLM0
UU
H
ID12-5
F70F
H
LMLM1
UUUU.
U000
B
ID4-0
0
0
0
F7n0
H
MCR0
UU
H
MSGVAL
TXIE
RXIE
INTPND
F7n1
H
MCR1
UU
H
RMTPND
TXRQ
MSGLST
CPUUPD
NEWDAT
F7n2
H
UAR0
UU
H
ID28-21
F7n3
H
UAR1
UU
H
ID20-18
ID17-13
F7n4
H
LAR0
UU
H
ID12-5
F7n5
H
LAR1
UUUU.
U000
B
ID4-0
0
0
0
F7n6
H
MCFG
UUUU.
UU00
B
DLC
DIR
XTD
0
0
F7n7
H
DB0n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7n8
H
DB1n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7n9
H
DB2n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7nA
H
DB3n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7nB
H
DB4n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
C515C
Data Sheet
31
2003-02
F7nC
H
DB5n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7nD
H
DB6n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
F7nE
H
DB7n
XX
H
.7
.6
.5
.4
.3
.2
.1
.0
1)
The notation "n" in the address definition defines the number of the related message object.
2)
"X" means that the value is undefined and the location is reserved. "U" means that the value is
unchanged by a reset operation. "U" values are undefined (as "X") after a power-on reset operation.
Table 6
Contents of the CAN Registers in Numeric Order
of their Addresses
(cont'd)
Addr.
n = 1 to F
H
1)
Regis-
ter
Content
after
Reset
2)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
C515C
Data Sheet
32
2003-02
Digital I/O Ports
The C515C allows for digital I/O on 49 lines grouped into 6 bidirectional 8-bit ports and
one 1-bit port. Each port bit consists of a latch, an output driver and an input buffer. Read
and write accesses to the I/O ports P0 through P7 are performed via their corresponding
special function registers P0 to P7. The port structure of port 5 of the C515C is especially
designed to operate either as a quasi-bidirectional port structure, compatible to the
standard 8051-Family, or as a genuine bidirectional port structure. This port operating
mode can be selected by software (setting or clearing the bit PMOD in the SFR
SYSCON).
The output drivers of port 0 and 2 and the input buffers of port 0 are also used for
accessing external memory. In this application, port 0 outputs the low byte of the external
memory address, time-multiplexed with the byte being written or read. Port 2 outputs the
high byte of the external memory address when the address is 16 bits wide. Otherwise,
the port 2 pins continue emitting the P2 SFR contents.
Analog Input Ports
Ports 6 is available as input port only and provides two functions. When used as digital
inputs, the corresponding SFR P6 contains the digital value applied to the port 6 lines.
When used for analog inputs the desired analog channel is selected by a three-bit field
in SFR ADCON0 or SFR ADCON1. Of course, it makes no sense to output a value to
these input-only ports by writing to the SFR P6. This will have no effect.
If a digital value is to be read, the voltage levels are to be held within the input voltage
specifications (
V
IL
/
V
IH
). Since P6 is not bit-addressable, all input lines of P6 are read at
the same time by byte instructions.
Nevertheless, it is possible to use port 6 simultaneously for analog and digital input.
However, care must be taken that all bits of P6 that have an undetermined value caused
by their analog function are masked.
C515C
Data Sheet
33
2003-02
Port Structure Selection of Port 5
After a reset operation of the C515C, the quasi-bidirectional 8051-compatible port
structure is selected. For selection of the bidirectional (CMOS) port 5 structure the bit
PMOD of SFR SYSCON must be set. Because each port 5 pin can be programmed as
an input or an output, additionally, after the selection of the bidirectional mode the
direction register DIR5 of port 5 must be written. This direction register is mapped to the
port 5 register. This means, the port register address is equal to its direction register
address.
Figure 10
illustrates the port and direction register configuration.
Figure 10
Port Register, Direction Register
MCS02649
D
R
Q
Q
Int. Bus, Bit 7
Write to IP 1
Delay:
2.5 Machine Cycles
Port Register
Direction Register
Enable
PDIR
Enable
Write to Port
Read Port
Internal
Bus
Instruction sequence for the programming of the direction registers:
ORL IP1, #80H ; Set bit PDIR
Write port x direction register with value YYH
;
#OYYH
DIRx,
MOV
C515C
Data Sheet
34
2003-02
Timer / Counter 0 and 1
Timer / Counter 0 and 1 can be used in four operating modes as listed in
Table 7
:
In the "timer" function (C/
T
= `0') the register is incremented every machine cycle.
Therefore the count rate is
f
OSC
/6.
In the "counter" function the register is incremented in response to a 1-to-0 transition at
its corresponding external input pin (P3.4/T0, P3.5/T1). Since it takes two machine
cycles to detect a falling edge the max. count rate is
f
OSC
/12. External inputs
INT0
and
INT1
(P3.2, P3.3) can be programmed to function as a gate to facilitate pulse width
measurements.
Figure 11
illustrates the input clock logic.
Figure 11
Timer/Counter 0 and 1 Input Clock Logic
Table 7
Timer/Counter 0 and 1 Operating Modes
Mode
Description
TMOD
Timer/Counter Input Clock
M1
M0
internal
external (max)
0
8-bit timer/counter with a
divide-by-32 prescaler
0
0
f
OSC
/6
32
f
OSC
/12
32
1
16-bit timer/counter
0
1
f
OSC
/6
f
OSC
/12
2
8-bit timer/counter with 8-bit
autoreload
1
0
3
Timer/counter 0 used as
one 8-bit timer/counter and
one 8-bit timer / Timer 1
stops
1
1
MCS03117
1
&
OSC
C/T = 0
C/T = 1
Control
=1
6
TR1
P3.5/T1
(TMOD)
P3.2/INT0
f
Timer 0/1
Input Clock
OSC
/6
P3.4/T0
TR0
Gate
P3.3/INT1
_
<
C515C
Data Sheet
35
2003-02
Timer / Counter 2 with Compare/Capture/Reload
The timer 2 of the C515C provides additional compare/capture/reload features, which
allow the selection of the following operating modes:
Compare: up to 4 PWM signals with 16-bit/600 ns resolution
Capture: up to 4 high speed capture inputs with 600 ns resolution
Reload: modulation of timer 2 cycle time
The block diagram in
Figure 12
shows the general configuration of timer 2 with the
additional compare/capture/reload registers. The I/O pins which can used for timer 2
control are located as multifunctional port functions at port 1.
Figure 12
Timer 2 Block Diagram
MCB02730
Comparator
CCL3/CCH3
Capture
Input/
Output
Control
P1.0/
INT3/
CC0
CC1
INT4/
P1.1/
CC2
INT5/
P1.2/
CC3
INT6/
P1.2/
CCL2/CCH2
Comparator
CCL1/CCH1
Comparator
CRCL/CRCH
Comparator
Bit
16
16 Bit
16 Bit
16 Bit
OSC
6
12
f
OSC
T2PS
Sync.
P1.7/
T2
T2EX
P1.5/
Sync.
&
T2I1
T2I0
Timer 2
TH2
TL2
TF2
Reload
EXEN2
Reload
1
EXF2
Interrupt
Request
Compare
_
<
C515C
Data Sheet
36
2003-02
Timer 2 Operating Modes
The timer 2, which is a 16-bit-wide register, can operate as timer, event counter, or gated
timer. A roll-over of the count value in TL2/TH2 from all 1's to all 0's sets the timer
overflow flag TF2 in SFR IRCON, which can generate an interrupt. The bits in register
T2CON are used to control the timer 2 operation.
Timer Mode: In timer function, the count rate is derived from the oscillator frequency. A
prescaler offers the possibility of selecting a count rate of 1/6 or 1/12 of the oscillator
frequency.
Gated Timer Mode: In gated timer function, the external input pin T2 (P1.7) functions as
a gate to the input of timer 2. If T2 is high, the internal clock input is gated to the timer.
T2 = 0 stops the counting procedure. This facilitates pulse width measurements. The
external gate signal is sampled once every machine cycle.
Event Counter Mode: In the event counter function. the timer 2 is incremented in
response to a 1-to-0 transition at its corresponding external input pin T2 (P1.7). In this
function, the external input is sampled every machine cycle. Since it takes two machine
cycles (12 oscillator periods) to recognize a 1-to-0 transition, the maximum count rate is
1/12 of the oscillator frequency. There are no restrictions on the duty cycle of the external
input signal, but to ensure that a given level is sampled at least once before it changes,
it must be held for at least one full machine cycle.
Reload of Timer 2: Two reload modes are selectable:
In mode 0, when timer 2 rolls over from all 1's to all 0's, it not only sets TF2 but also
causes the timer 2 registers to be loaded with the 16-bit value in the CRC register, which
is preset by software.
In mode 1, a 16-bit reload from the CRC register is caused by a negative transition at the
corresponding input pin P1.5/T2EX. This transition will also set flag EXF2 if bit EXEN2
in SFR IEN1 has been set.
C515C
Data Sheet
37
2003-02
Timer 2 Compare Modes
The compare function of a timer/register combination operates as follows: the 16-bit
value stored in a compare or compare/capture register is compared with the contents of
the timer register; if the count value in the timer register matches the stored value, an
appropriate output signal is generated at a corresponding port pin and an interrupt can
be generated.
Compare Mode 0
In compare mode 0, upon matching the timer and compare register contents, the output
signal changes from low to high. lt goes back to a low level on timer overflow. As long as
compare mode 0 is enabled, the appropriate output pin is controlled by the timer circuit
only and writing to the port will have no effect.
Figure 13
shows a functional diagram of
a port circuit when used in compare mode 0. The port latch is directly controlled by the
timer overflow and compare match signals. The input line from the internal bus and the
write-to-latch line of the port latch are disconnected when compare mode 0 is enabled.
Figure 13
Port Latch in Compare Mode 0
MCS02661
Latch
Port
Q
Q
CLK
D
Port
Pin
Read Pin
DD
V
Read Latch
Port Circuit
Internal
Bus
Latch
Write to
Compare Reg.
Compare Register
Circuit
Comparator
Timer Register
Timer Circuit
Compare
Match
S
R
Overflow
Timer
16 Bit
Bit
16
C515C
Data Sheet
38
2003-02
Compare Mode 1
If compare mode 1 is enabled and the software writes to the appropriate output latch at
the port, the new value will not appear at the output pin until the next compare match
occurs. Thus, it can be choosen whether the output signal has to make a new transition
(1-to-0 or 0-to-1, depending on the actual pin-level) or should keep its old value at the
time when the timer value matches the stored compare value.
In compare mode 1 (see
Figure 14
) the port circuit consists of two separate latches. One
latch (which acts as a "shadow latch") can be written under software control, but its value
will only be transferred to the port latch (and thus to the port pin) when a compare match
occurs.
Figure 14
Compare Function in Compare Mode 1
MCS02662
Latch
Port
Q
Q
CLK
D
Read Pin
DD
V
D
CLK
Q
Shadow
Latch
Read Latch
Port Circuit
Internal
Bus
Latch
Write to
Compare Reg.
Compare Register
Circuit
Comparator
Timer Register
Timer Circuit
Compare
Match
Pin
Port
16 Bit
16 Bit
C515C
Data Sheet
39
2003-02
Serial Interface (USART)
The serial port is full duplex and can operate in four modes (one synchronous mode,
three asynchronous modes) as illustrated in
Table 8
.
For clarification some terms regarding the difference between "baud rate clock" and
"baud rate" should be mentioned. In the asynchronous modes the serial interfaces
require a clock rate which is 16 times the baud rate for internal synchronization.
Therefore, the baud rate generators/timers have to provide a "baud rate clock" (output
signal in
Figure 15
to the serial interface which - there divided by 16 - results in the
actual "baud rate". Further, the abbreviation
f
OSC
refers to the oscillator frequency
(crystal or external clock operation).
The variable baud rates for modes 1 and 3 of the serial interface can be derived either
from timer 1 or from a dedicated baud rate generator (see
Figure 15
).
Table 8
USART Operating Modes
Mode
SCON
Description
SM0
SM1
0
0
0
Shift register mode, fixed baud rate
Serial data enters and exits through R
D; T
D outputs
the shift clock; 8-bit are transmitted/received (LSB first)
1
0
1
8-bit UART, variable baud rate
10 bits are transmitted (through T
D) or received (at
R
D)
2
1
0
9-bit UART, fixed baud rate
11 bits are transmitted (through T
D) or received (at
R
D)
3
1
1
9-bit UART, variable baud rate
Like mode 2
C515C
Data Sheet
40
2003-02
Figure 15
Block Diagram of Baud Rate Generation for the Serial Interface
Table 9
below lists the values/formulas for the baud rate calculation of the serial
interface with its dependencies of the control bits BD and SMOD.
Table 9
Serial Interface - Baud Rate Dependencies
Serial Interface
Operating Modes
Active Control
Bits
Baud Rate Calculation
BD
SMOD
Mode 0 (Shift
Register)
f
OSC
/ 6
Mode 1 (8-bit UART)
Mode 3 (9-bit UART)
0
X
Controlled by timer 1 overflow:
(2
SMOD
timer 1 overflow rate) / 32
1
X
Controlled by baud rate generator
(2
SMOD
f
OSC
) /
(32
baud rate generator overflow rate)
Mode 2 (9-bit UART)
0
1
f
OSC
/ 32
f
OSC
/ 16
MCS02733
Rate
f
OSC
(SMOD)
Baud
Clock
PCON.7
2
(SM0/
SM1)
SCON.7
SCON.6
Only one mode
can be selected
ADCON0.7
(BD)
0
1
0
1
Baud
Rate
Generator
(SRELH
SRELL)
Timer 1
Mode 2
Mode 0
Note: The switch configuration shows the reset state.
Mode 3
Mode 1
Overflow
6
C515C
Data Sheet
41
2003-02
SSC Interface
The C515C microcontroller provides a Synchronous Serial Channel unit, the SSC. This
interface is compatible to the popular SPI serial bus interface.
Figure 16
shows the block
diagram of the SSC. The central element of the SSC is an 8-bit shift register. The input
and the output of this shift register are each connected via a control logic to the pin P4.2
/ SRI (SSC Receiver In) and P4.3 / STO (SSC Transmitter Out). This shift register can
be written to (SFR STB) and can be read through the Receive Buffer Register SRB.
Figure 16
SSC Block Diagram
The SSC has implemented a clock control circuit, which can generate the clock via a
baud rate generator in the master mode, or receive the transfer clock in the slave mode.
The clock signal is fully programmable for clock polarity and phase. The pin used for the
clock signal is P4.1 / SCLK. When operating in slave mode, a slave select input is
provided which enables the SSC interface and also will control the transmitter output.
The pin used for this is P4.4 / SLS.
The SSC control block is responsible for controlling the different modes and operation of
the SSC, checking the status, and generating the respective status and interrupt signals.
MCB02735
P4.1/SCLK
P4.2/SRI
P4.3/STO
P4.4/SLS
Pin
Control
Logic
Shift Register
Receive Buffer Register
STB
Clock Selection
Clock Divider
SRB
f
OSC
Control Register
Status Register
Int. Enable Reg.
SCIEN
SSCCON
SCF
Control Logic
Internal Bus
Interrupt
C515C
Data Sheet
42
2003-02
CAN Controller
The on-chip CAN controller is the functional heart which provides all resources that are
required to run the standard CAN protocol (11-bit identifiers) as well as the extended
CAN protocol (29-bit identifiers). It provides a sophisticated object layer to relieve the
CPU of as much overhead as possible when controlling many different message objects
(up to 15). This includes bus arbitration, resending of garbled messages, error handling,
interrupt generation, etc. In order to implement the physical layer, external components
have to be connected to the C515C.
The internal bus interface connects the on-chip CAN controller to the internal bus of the
microcontroller. The registers and data locations of the CAN interface are mapped to a
specific 256 bytes wide address range of the external data memory area (F700
H
to
F7FF
H
) and can be accessed using MOVX instructions.
Figure 17
shows a block
diagram of the on-chip CAN controller.
C515C
Data Sheet
43
2003-02
Figure 17
CAN Controller Block Diagram
The TX/RX Shift Register holds the destuffed bit stream from the bus line to allow the
parallel access to the whole data or remote frame for the acceptance match test and the
parallel transfer of the frame to and from the Intelligent Memory.
The Bit Stream Processor (BSP) is a sequencer controlling the sequential data stream
between the TX/RX Shift Register, the CRC Register, and the bus line. The BSP also
controls the EML and the parallel data stream between the TX/RX Shift Register and the
Intelligent Memory such that the processes of reception, arbitration, transmission, and
error signalling are performed according to the CAN protocol. Note that the automatic
retransmission of messages which have been corrupted by noise or other external error
conditions on the bus line is handled by the BSP.
MCB02736
Bit
Timing
Logic
Timing
Generator
BTL-Configuration
CRC
Gen./Check
TX/RX Shift Register
TXDC
RXDC
Intelligent
Interrupt
Register
Memory
Processor
Register
Status
Stream
Bit
Error
Logic
Management
Messages
Handlers
Control
Status +
to internal Bus
Clocks
Control
Messages
(to all)
C515C
Data Sheet
44
2003-02
The Cyclic Redundancy Check Register (CRC) generates the Cyclic Redundancy
Check code to be transmitted after the data bytes and checks the CRC code of incoming
messages. This is done by dividing the data stream by the code generator polynomial.
The Error Management Logic (EML) is responsible for the fault confinement of the
CAN device. Its counters, the Receive Error Counter and the Transmit Error Counter, are
incremented and decremented by commands from the Bit Stream Processor. According
to the values of the error counters, the CAN controller is set into the states error active,
error passive and busoff.
The Bit Timing Logic (BTL) monitors the busline input RXDC and handles the busline
related bit timing according to the CAN protocol. The BTL synchronizes on a recessive
to dominant busline transition at Start of Frame (hard synchronization) and on any further
recessive to dominant busline transition, if the CAN controller itself does not transmit a
dominant bit (resynchronization). The BTL also provides programmable time segments
to compensate for the propagation delay time and for phase shifts and to define the
position of the Sample Point in the bit time. The programming of the BTL depends on the
baudrate and on external physical delay times.
The Intelligent Memory (CAM/RAM array) provides storage for up to 15 message
objects of maximum 8 data bytes length. Each of these objects has a unique identifier
and its own set of control and status bits. After the initial configuration, the Intelligent
Memory can handle the reception and transmission of data without further CPU actions.
Switch-off Capability of the CAN Controller (C515C-8E only)
For power consumption reasons, the on-chip CAN controller in the C515C-8E can be
switched off by setting bit CSWO (bit 2) in SFR SYSCON. When the CAN controller is
switched off its clock signal is turned off and the operation of the CAN controller is
stopped. This switch-off state of the CAN controller is equal to its state in software power
down mode. After clearing bit CSWO again the CAN controller has to be reconfigured.
C515C
Data Sheet
45
2003-02
10-Bit A/D Converter
The C515C includes a high performance / high speed 10-bit A/D-Converter (ADC) with
8 analog input channels. It operates with a successive approximation technique and
uses self calibration mechanisms for reduction and compensation of offset and linearity
errors. The A/D converter provides the following features:
8 multiplexed input channels (port 6), which can also be used as digital inputs
10-bit resolution
Single or continuous conversion mode
Internal or external start-of-conversion trigger capability
Interrupt request generation after each conversion
Using successive approximation conversion technique via a capacitor array
Built-in hidden calibration of offset and linearity errors
The main functional blocks of the A/D converter are shown in
Figure 19
.
The A/D converter uses basically two clock signals for operation: the input clock
f
IN
(= 1/
t
IN
) and the conversion clock
f
ADC
(= 1/
t
ADC
). These clock signals are derived from
the C515C system clock
f
OSC
which is applied at the XTAL pins. The input clock
f
IN
is
equal to
f
OSC
. The conversion clock is limited to a maximum frequency of 2 MHz and
therefore must be adapted to
f
OSC
by programming the conversion clock prescaler. The
table in
Figure 18
shows the prescaler ratios and the resulting A/D conversion times
which must be selected for typical system clock rates.
C515C
Data Sheet
46
2003-02
Figure 18
A/D Converter Clock Selection
MCU System
Clock Rate
(
f
OSC
)
ADCL
Conversion
Clock
f
ADC
[MHz]
2 MHz
0
.5
4 MHz
0
1
6 MHz
0
1.5
8 MHz
0
2
10 MHz
1
1.25
MCS02748
MUX
ADCL
OSC
f
Clock Prescaler
Conversion Clock f
ADC
Input Clock
IN
f
A/D
Converter
Conditions:
f
ADC max
2 MHz
f
IN
= f
OSC
=
1
CLP
4
8
_
<
C515C
Data Sheet
47
2003-02
Figure 19
A/D Converter Block Diagram
Input
Clock
Clock
Conversion
S & H
Conversion
Start of
Shaded bit locations are not used in ADC-functions.
Write to
ADDATL
P4.0/ADST
AGND
OSC
AREF
V
V
f
Port 6
MUX
Conversion
Clock
Prescaler
IRCON (C0 )
ADCON0 (D8 )
ADCON1 (DC )
ADCL
BD
H
P6 (DB )
P6.7
EXF2
ADEX
CLK
H
-
-
BSY
-
P6.5
IEX6
H
P6.6
TF2
H
P6.4
IEX5
SWDT
IEN1 (B8 )
H
EXEN2
EX6
EX5
Single/
H
H
Converter
Continuous
A/D
f
IN
ADC
f
Mode
MSB
.8
.7
.6
.1
LSB
-
-
.5
.4
.3
.2
-
-
-
-
MCB02747
Bus
Internal
ADDATL
(DA )
MX2
MX2
ADM
-
MX1
MX1
IEX3
P6.2
P6.3
IEX4
P6.1
IEX2
ADDATH
(D9 )
MX0
MX0
P6.0
IADC
EX3
EX4
EX2
EADC
Bus
Internal
C515C
Data Sheet
48
2003-02
Interrupt System
The C515C provides 17 interrupt sources with four priority levels. Seven interrupts can
be generated by the on-chip peripherals (timer 0, timer 1, timer 2, serial interface,
A/D converter, SSC interface, CAN controller), and ten interrupts may be triggered
externally (P1.5/T2EX, P3.2/INT0, P3.3/INT1, P1.4/INT2, P1.0/INT3, P1.1/INT4,
P1.2/INT5, P1.3/INT6, P7.0/INT7, P4.5/INT8). The wake-up from power-down mode
interrupt has a special functionality which allows to exit from the software power-down
mode by a short low pulse at pin P3.2/INT0.
In the C515C the 17 interrupt sources are combined to six groups of two or three interrupt
sources. Each interrupt group can be programmed to one of the four interrupt priority
levels.
Figure 20
to
Figure 22
give a general overview of the interrupt sources and
illustrate the interrupt request and control flags.
C515C
Data Sheet
49
2003-02
Figure 20
Interrupt Request Sources (Part 1)
Polling Sequence
H
ECAN
IE
Error
CAN Controller Interrupt Sources
Note: Each of the 15 CAN controller message objects provides the bits/flags in the shaded area.
IEN0.7
cleared by hardware
Request Flag is
Receive
INT2
P1.4/
T2CON.5
Bit addressable
I2FR
RXIE
MCR0.5/4
Message
Transmit
Message
TXIE
MCR0.3/2
CR.3
EIE
IEN1.1
IEX2
IRCON.1
EX2
EAL
H
004B
IEN2.1
INTPND
MCR0.0/1
1<
_
CR.1
see Note
MCS02752
IP1.1
IP0.1
0003
INT0
Overflow
Status
Timer 0
CR.2
SIE
A/D Converter
TCON.0
IT0
IEN0.1
_
< 1
TCON.5
TF0
008B
ET0
H
000B
IEN0.0
EADC
IEN1.0
IADC
IRCON.0
TCON.1
H
0043
EX0
H
P3.2/
IE0
Priority Level
IP1.0
IP0.0
Lowest
Highest
Priority Level
C515C
Data Sheet
50
2003-02
Figure 21
Interrupt Request Sources (Part 2)
MCS02753
Bit addressable
Request Flag is
cleared by hardware
IP1.2
H
0013
TCON.3
IEN0.2
IE1
EX1
P3.3/
IT1
TCON.2
ESSC
IEN2.2
0093 H
SCF.1
WCOL
TC
SCF.0
SSC
IP0.2
Highest
Priority Level
0053 H
IP1.3
IP0.3
Timer 1
H
001B
TCON.7
IEN0.3
TF1
ET1
Overflow
INT1
INT4/
P1.1/
EX4
IEX4
IEN1.3
IRCON.3
005B H
CC1
Lowest
Priority Level
EAL
IEN0.7
Polling Sequence
1
T2CON.6
I3FR
EX3
IEX3
IEN1.2
IRCON.2
CC0
P1.0/
INT3/
Inerface
SCIEN.1
WCEN
TCEN
SCIEN.0
_
<
C515C
Data Sheet
51
2003-02
Figure 22
Interrupt Request Sources (Part 3)
MCS02754
Bit addressable
Request Flag is
cleared by hardware
IP1.4
H
0023
ES
IEN0.4
00A3 H
SCON.0
RI
TI
SCON.1
USART
IP0.4
Highest
Priority Level
EX5
IEX5
IEN1.4
IRCON.4
0063 H
IP1.5
IP0.5
Timer 2
H
00AB
Overflow
006B H
Lowest
Priority Level
EAL
IEN0.7
Polling Sequence
IEN2.4
EX7
CC2
P1.2/
INT5/
IRCON.7
EXF2
TF2
IRCON.6
IEN0.5
ET2
002B H
EXEN2
IEN1.7
P1.5/
T2EX
INT6/
P1.3/
CC3
EX8
IEN2.5
IRCON.5
IEN1.5
IEX6
EX6
1
1
INT7
P7.0/
P4.5/
INT8
_
<
_
<
C515C
Data Sheet
52
2003-02
Table 10
Interrupt Source and Vectors
Interrupt Source
Interrupt Vector
Address
Interrupt Request Flags
External Interrupt 0
0003
H
IE0
Timer 0 Overflow
000B
H
TF0
External Interrupt 1
0013
H
IE1
Timer 1 Overflow
001B
H
TF1
Serial Channel
0023
H
RI / TI
Timer 2 Overflow / Ext. Reload 002B
H
TF2 / EXF2
A/D Converter
0043
H
IADC
External Interrupt 2
004B
H
IEX2
External Interrupt 3
0053
H
IEX3
External Interrupt 4
005B
H
IEX4
External Interrupt 5
0063
H
IEX5
External Interrupt 6
006B
H
IEX6
Wake-up from power-down
mode
007B
H
CAN controller
008B
H
External Interrupt 7
00A3
H
External Interrupt 8
00AB
H
SSC interface
0093
H
TC / WCOL
C515C
Data Sheet
53
2003-02
Fail Save Mechanisms
The C515C offers two on-chip peripherals which monitor the program flow and ensure
an automatic "fail-safe" reaction for cases where the controller's hardware fails or the
software hangs up:
A programmable watchdog timer (WDT) with variable time-out period from
512 microseconds up to approx. 1.1 seconds at 6 MHz.
An oscillator watchdog (OWD) which monitors the on-chip oscillator and forces the
microcontroller into reset state in case the on-chip oscillator fails; it also provides the
clock for a fast internal reset after power-on.
Programmable Watchdog Timer
The watchdog timer in the C515C is a 15-bit timer, which is incremented by a count rate
of
f
OSC
/12 up to
f
OSC
/192. For programming of the watchdog timer overflow rate, the
upper 7 bit of the watchdog timer can be written.
Figure 23
shows the block diagram of
the watchdog timer unit.
Figure 23
Block Diagram of the Programmable Watchdog Timer
The watchdog timer can be started by software (bit SWDT) or by hardware through pin
PE/SWD, but it cannot be stopped during active mode of the C515C. If the software fails
to refresh the running watchdog timer an internal reset will be initiated on watchdog timer
overflow. For refreshing of the watchdog timer the content of the SFR WDTREL is
transferred to the upper 7-bit of the watchdog timer. The refresh sequence consists of
MCB02755
Control Logic
PE/SWD
External HW Power-Down
WDT Reset Request
14
8
WDTH
WDTREL (86 )
0
7 6
IEN1 (B8 )
IEN0 (A8 )
H
H
0
7
WDTL
IP0 (A9 )
H
WDT
SWDT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
H
External HW Reset
-
-
-
-
-
-
-
WDTS
WDTPSEL
16
/6
OSC
f
2
C515C
Data Sheet
54
2003-02
two consecutive instructions which set the bits WDT and SWDT each. The reset cause
(external reset or reset caused by the watchdog) can be examined by software (flag
WDTS). It must be noted, however, that the watchdog timer is halted during the idle
mode and power down mode of the processor.
Oscillator Watchdog
The oscillator watchdog unit serves for four functions:
Monitoring of the on-chip oscillator's function
The watchdog supervises the on-chip oscillator's frequency; if it is lower than the
frequency of the auxiliary RC oscillator in the watchdog unit, the internal clock is
supplied by the RC oscillator and the device is brought into reset; if the failure
condition disappears (i.e. the on-chip oscillator has a higher frequency than the RC
oscillator), the part executes a final reset phase of typ. 1 ms in order to allow the
oscillator to stabilize; then the oscillator watchdog reset is released and the part starts
program execution again.
Fast internal reset after power-on
The oscillator watchdog unit provides a clock supply for the reset before the on-chip
oscillator has started. The oscillator watchdog unit also works identically to the
monitoring function.
Restart from the hardware power down mode
If the hardware power down mode is terminated the oscillator watchdog has to control
the correct start-up of the on-chip oscillator and to restart the program. The oscillator
watchdog function is only part of the complete hardware power down sequence;
however, the watchdog works identically to the monitoring function.
Control of external wake-up from software power-down mode
When the software power-down mode is left by a low level at the P3.2/INT0 pin, the
oscillator watchdog unit assures that the microcontroller resumes operation
(execution of the power-down wake-up interrupt) with the nominal clock rate. In the
power-down mode the RC oscillator and the on-chip oscillator are stopped. Both
oscillators are started again when power-down mode is released. When the on-chip
oscillator has a higher frequency than the RC oscillator, the microcontroller starts
operation after a final delay of typ. 1 ms in order to allow the on-chip oscillator to
stabilize.
C515C
Data Sheet
55
2003-02
Figure 24
Block Diagram of the Oscillator Watchdog
OWDS
1
IP0 (A9 )
Frequency
Comparator
Delay
f
2
<
1
f
f
1
2
f
Internal
Clock
On-Chip
Oscillator
Oscillator
RC
RC
f
3 MHz
MCB02757
H
Start/
Stop
Stop
Start/
Control
Logic
XTAL1
XTAL2
P3.2/
INT0
Logic
Control
EWPD
(PCON1.7)
Mode Activated
Power-Down
Power-Down Mode
Wake-Up Interrupt
Reset
Internal
5
2
_
<
C515C
Data Sheet
56
2003-02
Power Saving Modes
The C515C provides two basic power saving modes, the idle mode and the power down
mode. Additionally, a slow down mode is available. This power saving mode reduces the
internal clock rate in normal operating mode and it can be also used for further power
reduction in idle mode.
Idle mode
The CPU is gated off from the oscillator. All peripherals are still provided with the clock
and are able to work. Idle mode is entered by software and can be left by an interrupt
or reset.
Power down mode
The operation of the C515C is completely stopped and the oscillator is turned off. This
mode is used to save the contents of the internal RAM with a very low standby current.
Software power down mode: Software power down mode is entered by software
and can be left by reset or by a short low pulse at pin P3.2/INT0 (or P4.7/RXDC,
C515C-8E only).
Hardware power down mode: Hardware power down mode is entered when the pin
HWPD is put to low level.
Slow-down mode
The controller keeps up the full operating functionality, but its normal clock frequency
is internally divided by 32. This slows down all parts of the controller, the CPU and all
peripherals, to 1/32
th
of their normal operating frequency. Slowing down the frequency
significantly reduces power consumption. The slow down mode can be combined with
the idle mode.
Table 11
gives a general overview of the entry and exit conditions of the power saving
modes.
In the power down mode of operation,
V
DD
can be reduced to minimize power
consumption. It must be ensured, however, that
V
DD
is not reduced before the power
down mode is invoked, and that
V
DD
is restored to its normal operating level, before the
power down mode is terminated.
If e.g. the idle mode is left through an interrupt, the microcontroller state (CPU, ports,
peripherals) remains preserved. If a power saving mode is left by a hardware reset, the
microcontroller state is disturbed and replaced by the reset state of the C515C.
If WS (bit 4) is SFR PCON1 is set (C515C-8E only), pin P4.7/RXDC is alternatively
selected as wake-up pin for the software power down mode. If WS (bit 4) is SFR PCON1
is cleared (C515C-8E only), pin P3.2/INT0 is selected as wake-up pin for the software
power down mode.
For the C515C-8R, P3.2/INT0 is always selected as wake-up pin.
C515C
Data Sheet
57
2003-02
Table 11
Power Saving Modes Overview
Mode
Entering
(2-Instruction
Example)
Leaving by
Remarks
Idle mode
ORL PCON, #01
H
ORL PCON, #20
H
Occurrence of an
interrupt from a
peripheral unit
CPU clock is stopped;
CPU maintains their data;
peripheral units are active (if
enabled) and provided with
clock
Hardware Reset
Software
Power-Down
Mode
ORL PCON, #02
H
ORL PCON, #40
H
Hardware Reset
Oscillator is stopped;
contents of on-chip RAM
and SFR's are maintained;
Short low pulse at
pin P3.2/INT0
(or P4.7/RXDC,
C515C-8E only)
Hardware
Power-Down
Mode
HWPD = low
HWPD = high
C515C is put into its reset
state and the oscillator is
stopped;
ports become floating
outputs
Slow Down
Mode
ORL PCON, #10
H
ANL PCON, #0EF
H
or
Hardware Reset
Oscillator frequency is
reduced to 1/32 of its
nominal frequency
C515C
Data Sheet
58
2003-02
OTP Memory Operation (C515C-8E only)
The C515C-8E contains a 64 Kbytes one-time programmable (OTP) program memory.
With the C515C-8E fast programming cycles are achieved (1 byte in 100
s). Also
several levels of OTP memory protection can be selected.
For programming of the device, the C515C-8E must be put into the programming mode.
This typically is done not in-system but in a special programming hardware. In the
programming mode the C515C-8E operates as a slave device similar as an EPROM
standalone memory device and must be controlled with address/data information,
control lines, and an external 11.5 V programming voltage.
Figure 25
shows the pins of
the C515C-8E which are required for controlling of the OTP programming mode.
Figure 25
Programming Mode Configuration of the C515C-8E
MCP03651
V
SS
DD
V
A0-7
A8-A15
PALE
PMSEL0
PMSEL1
XTAL1
XTAL2
P0-7
EA/
PROG
PRD
RESET
PSEN
PSEL
PP
V
Port 2
Port 0
C515C-8E
C515C
Data Sheet
59
2003-02
C515C-8E Pin Configuration in Programming Mode
Figure 26
P-MQFP-80-1 Pin Configuration of the C515C-8E in Programming
Mode
(top view)
MCP03652
1 2 3 4 5 6 7 8 9 10 11
N.C.
12 13 14 15 16 17 18 19 20
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A2/A10
SS
V
SS
V
N.C.
PALE
PRD
PSEL
PMSEL1
PMSEL0
N.C.
RESET
V
SS
A3/A11
A4/A12
A5/A13
A6/A14
A7/A15
N.C.
PSEN
PROG
EA/
D0
D1
D2
D3
D4
D5
D6
D7
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
40
61
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
SS
V
DD
V
DD
V
N.C.
V
PP
A1/A9
A0/A8
XTAL1
XTAL2
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
V
DD
DD
V
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
C515C-8E
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
V
SS
V
DD
N.C.
N.C.
C515C
Data Sheet
60
2003-02
The following
Table 12
contains the functional description of all C515C-8E pins which
are required for OTP memory programming.
Table 12
Pin Definitions and Functions in Programming Mode
Symbol
Pin Number I/O
1)
Function
RESET
1
I
Reset
This input must be at static "0" (active) level during the
whole programming mode.
PMSEL0
PMSEL1
15
16
I
I
Programming mode selection pins
These pins are used to select the different access
modes in programming mode. PMSEL1,0 must satisfy
a setup time to the rising edge of PALE. When the logic
level of PMSEL1,0 is changed, PALE must be at low
level.
PSEL
17 I
Basic programming mode select
This input is used for the basic programming mode
selection and must be switched according
Figure 27
.
PRD
18
I
Programming mode read strobe
This input is used for read access control for OTP
memory read, version byte read, and lock bit read
operations.
PALE
19
I
Programming address latch enable
PALE is used to latch the high address lines. The high
address lines must satisfy a setup and hold time to/from
the falling edge of PALE. PALE must be at low level
whenever the logic level of PMSEL1,0 is changed.
XTAL2
36
I
XTAL2
Input to the oscillator amplifier.
XTAL1
37
O
XTAL1
Output of the inverting oscillator amplifier.
PMSEL1
PMSEL0
Access Mode
0
0
Reserved
0
1
Read version bytes
1
0
Program/read lock bits
1
1
Program/read OTP memory
byte
C515C
Data Sheet
61
2003-02
A0/A8 -
A7/A15
38 - 45
I
Address lines
P2.0-7 are used as multiplexed address input lines
A0-A7 and A8-A15. A8-A15 must be latched with PALE.
PSEN
47
I
Program store enable
This input must be at static "0" level during the whole
programming mode.
PROG
48
I
Programming mode write strobe
This input is used in programming mode as a write
strobe for OTP memory program and lock bit write
operations. During basic programming mode selection
a low level must be applied to PROG.
EA/
V
PP
49
I
External Access / Programming voltage
This pin must be at 11.5 V (
V
PP
) voltage level during
programming of an OTP memory byte or lock bit. During
an OTP memory read operation this pin must be at high
level (
V
IH
). This pin is also used for basic programming
mode selection. At basic programming mode selection
a low level must be applied to EA/
V
PP
.
D0 - 7
52 - 58
I/O
Data lines 0-7
During programming mode, data bytes are read or
written from or to the C515C-8E via the bidirectional
D0-7 which are located at port 0.
V
SS
13, 34, 35,
51, 70
Circuit ground potential
must be applied to these pins in programming mode.
V
DD
14, 32, 33,
50, 69
Power supply terminal
must be applied to these pins in programming mode.
N.C.
2-12, 20-31,
46, 60-67,
69, 71-80
Not Connected
These pins should not be connected in programming
mode.
1)
I = Input; O = Output
Table 12
Pin Definitions and Functions in Programming Mode (cont'd)
Symbol
Pin Number I/O
1)
Function
C515C
Data Sheet
62
2003-02
C515C-8E Basic Programming Mode Selection
The basic programming mode selection scheme is shown in
Figure 27
.
Figure 27
C515C-8E Basic Programming Mode Selection
MCT03653
"0"
(XTAL1/XTAL2)
Clock
V
DD
RESET
"0"
PSEN
0.1
PMSEL1, 0
"0"
PROG
"1"
PRD
PSEL
"0"
PALE
EA/
V
PP
PP
V
IH
V
are not actively driven
During this period signals
Ready for access
mode selection
5 V
0 V
Stable
C515C
Data Sheet
63
2003-02
C515C-8E Lock Bits Programming / Read
The C515C-8E has two programmable lock bits which, when programmed according
Table 14
, provide four levels of protection for the on-chip OTP code memory. The state
of the lock bits can also be read.
Table 13
Access Modes Selection
Access Mode
EA/
V
PP
PROG
PRD
PMSEL
Address
(Port 2)
Data
(Port 0)
1
0
Program OTP memory
byte
V
PP
H
H
H
A0-7
A8-15
D0-7
Read OTP memory byte
V
IH
H
Program OTP lock bits
V
PP
H
H
L
D1, D0
see
Table 14
Read OTP lock bits
V
IH
H
Read OTP version byte
V
IH
H
L
H
Byte addr.
of version
byte
D0-7
C515C
Data Sheet
64
2003-02
Table 14
Lock Bit Protection Types
Lock Bits at
D1, D0
Protection
Level
Protection Type
D1
D0
1
1
Level 0
The OTP lock feature is disabled. During normal
operation of the C515C-8E, the state of the EA pin is
not latched on reset.
1
0
Level 1
During normal operation of the C515C-8E, MOVC
instructions executed from external program memory
are disabled from fetching code bytes from internal
memory. EA is sampled and latched on reset. An OTP
memory read operation is only possible according to
ROM verification mode 2, as it is defined for a
protected ROM version of the C515C-8R. Further
programming of the OTP memory is disabled
(reprogramming security).
0
1
Level 2
Same as level 1, but also OTP memory read operation
using ROM verification mode 2 is disabled.
0
0
Level 3
Same as level 2; but additionally external code
execution by setting EA = low during normal operation
of the C515C-8E is no more possible.
External code execution, which is initiated by an
internal program (e.g. by an internal jump instruction
above the ROM boundary), is still possible.
C515C
Data Sheet
65
2003-02
Absolute Maximum Ratings
Note: Stresses above those listed under "Absolute Maximum Ratings" may cause
permanent damage of the device. This is a stress rating only and functional
operation of the device at these or any other conditions above those
indicated in the operational sections of this specification is not implied.
Exposure to absolute maximum rating conditions for longer periods may
affect device reliability. During absolute maximum rating overload
conditions (
V
IN
>
V
DD
or
V
IN
<
V
SS
) the voltage on
V
DD
pins with respect to
ground (
V
SS
) must not exceed the values defined by the absolute maximum
ratings.
Parameter
Symbol
Limit Values
Unit Notes
min.
max.
Storage temperature
T
ST
-65
150
C
Voltage on
V
DD
pins with
respect to ground (
V
SS
)
V
DD
-0.5
6.5
V
Voltage on any pin with respect
to ground (
V
SS
)
V
IN
-0.5
V
DD
+ 0.5
V
Input current on any pin during
overload condition
-10
10
mA
Absolute sum of all input
currents during overload
condition
|100 mA|
mA
Power dissipation
P
DISS
1
W
C515C
Data Sheet
66
2003-02
Operating Conditions
Parameter
Symbol
Limit Values
Unit Notes
min.
max.
Supply voltage
V
DD
4.25
5.5
V
Active mode,
f
OSCmax
= 10 MHz
2
5.5
V
Power Down
mode
Ground voltage
V
SS
0
V
Reference voltage
Ambient temperature:
C
SAB-C515C
T
A
0
70
SAF-C505
T
A
-40
85
SAH-C505
T
A
-40
110
Analog reference voltage
V
AREF
4
V
DD
+ 0.1 V
Analog ground voltage
V
AGND
V
SS
- 0.1
V
SS
+ 0.2
V
Analog input voltage
V
AIN
V
AGND
V
AREF
V
XTAL clock
f
OSC
2
10
MHz
C515C
Data Sheet
67
2003-02
DC Characteristics (Operating Conditions apply)
Parameter
Sym-
bol
Limit Values
Unit Test
Condition
min.
max.
Input low voltages all except
EA, RESET, HWPD
EA pin
RESET and HWPD pins
Port 5 in CMOS mode
V
IL
V
IL1
V
IL2
V
ILC
-0.5
-0.5
-0.5
-0.5
0.2
V
DD
- 0.1
0.2
V
DD
- 0.3
0.2
V
DD
+ 0.1
0.3
V
DD
V
Input high voltages
all except XTAL2, RESET,
and HWPD)
XTAL2 pin
RESET and HWPD pins
Port 5 in CMOS mode
V
IH
V
IH1
V
IH2
V
IHC
0.2
V
DD
+ 0.9
0.7
V
DD
0.6
V
DD
0.7
V
DD
V
DD
+ 0.5
V
DD
+ 0.5
V
DD
+ 0.5
V
DD
+ 0.5
V
Output low voltages
Ports 1, 2, 3, 4, 5, 7 (incl. CMOS)
Port 0, ALE, PSEN, CPUR
P4.1, P4.3 in push-pull mode
V
OL
V
OL1
V
OL3


0.45
0.45
0.45
V
I
OL
= 1.6 mA
1)
I
OL
= 3.2 mA
1)
I
OL
= 3.75 mA
1)
Output high voltages
Ports 1, 2, 3, 4, 5, 7
Port 0 in external bus mode,
ALE, PSEN, CPUR
Port 5 in CMOS mode
P4.1, P4.3 in push-pull mode
V
OH
V
OH2
V
OHC
V
OH3
2.4
0.9
V
DD
2.4
0.9
V
DD
0.9
V
DD
0.9
V
DD





V
I
OH
= -80
A
I
OH
= -10
A
I
OH
= -800
A
I
OH
= -80
A
2)
I
OH
= -800
A
I
OH
= -833
A
Logic 0 input current
Ports 1, 2, 3, 4, 5, 7
I
IL
-10
-70
A
V
IN
= 0.45 V
Logical 0-to-1 transition current
Ports 1, 2, 3, 4, 5, 7
I
TL
-65
-650
A
V
IN
= 2 V
Input leakage current
Port 0, EA, P6, HWPD, AIN0-7
I
LI
1
A
0.45 <
V
IN
<
V
DD
Input low current
To RESET for reset
XTAL2
PE/SWD
I
LI2
I
LI3
I
LI4


-100
-15
-20
A
V
IN
= 0.45 V
V
IN
= 0.45 V
V
IN
= 0.45 V
Pin capacitance
C
IO
10
pF
f
c
= 1 MHz,
T
A
= 25
C
Overload current
I
OV
5
mA
3)4)
Programming voltage
V
PP
10.9
12.1
V
11.5 V
5%
C515C
Data Sheet
68
2003-02
1)
Capacitive loading on ports 0 and 2 may cause spurious noise pulses to be superimposed on the
V
OL
of ALE
and port 3. The noise is due to external bus capacitance discharging into the port 0 and port 2 pins when these
pins make 1-to-0 transitions during bus operation. In the worst case (capacitive loading > 100 pF), the noise
pulse on ALE line may exceed 0.8 V. In such cases it may be desirable to qualify ALE with a Schmitt-trigger,
or use an address latch with a Schmitt-trigger strobe input.
2)
Capacitive loading on ports 0 and 2 may cause the
V
OH
on ALE and PSEN to momentarily fall below the
0.9
V
DD
specification when the address lines are stabilizing.
3)
Overload conditions under operating conditions occur if the voltage on the respective pin exceeds the specified
operating range (i.e.
V
OV
>
V
DD
+ 0.5 V or
V
OV
<
V
SS
- 0.5 V). The absolute sum of input overload currents on
all port pins may not exceed 50 mA. The supply voltage (
V
DD
and
V
SS
) must remain within the specified limits.
4)
Not 100% tested, guaranteed by design characterization.
C515C
Data Sheet
69
2003-02
Power Supply Current
Parameter
Sym-
bol
Limit Values
Unit Test Condition
typ.
1)
1)
The typical
I
DD
values are periodically measured at
T
A
= +25
C and
V
DD
= 5 V but not 100% tested.
max.
2)
2)
The maximum
I
DD
values are measured under worst case conditions (
T
A
= 0
C or -40
C and
V
DD
= 5.5 V)
Active mode
C515C-8R/
C515C-LM
6 MHz
10 MHz
I
DD
11.97
18.81
13.74
21.10
mA
3)
3)
I
DD
(active mode) is measured with:
XTAL2 driven with
t
CLCH
,
t
CHCL
= 5 ns,
V
IL
=
V
SS
+ 0.5 V,
V
IH
=
V
DD
- 0.5 V; XTAL1 = N.C.;
EA = PE/SWD = Port 0 = Port 6 =
V
DD
; HWPD =
V
DD
; RESET =
V
SS
; all other pins are disconnected.
C515C-8E
6 MHz
10 MHz
I
DD
11.3
17.66
12.94
20.10
mA
Idle mode
C515C-8R/
C515C-LM
6 MHz
10 MHz
I
DD
6.9
10.46
7.87
11.87
mA
4)
4)
I
DD
(idle mode) is measured with all output pins disconnected and with all peripherals disabled;
XTAL2 driven with
t
CLCH
,
t
CHCL
= 5 ns,
V
IL
=
V
SS
+ 0.5 V,
V
IH
=
V
DD
- 0.5 V; XTAL1 = N.C.;
RESET =
V
DD
; EA =
V
SS
; Port0 =
V
DD
; all other pins are disconnected;
C515C-8E
6 MHz
10 MHz
I
DD
3.95
4.71
4.70
5.50
mA
Active mode
with slow-down
enabled
C515C-8R/
C515C-LM
6 MHz
10 MHz
I
DD
4.06
4.62
5.03
5.75
mA
5)
5)
I
DD
(active mode with slow-down mode) is measured with all output pins disconnected and with all peripherals
disabled;
XTAL2 driven with
t
CLCH
,
t
CHCL
= 5 ns,
V
IL
=
V
SS
+ 0.5 V,
V
IH
=
V
DD
- 0.5 V; XTAL1 = N.C.;
RESET =
V
DD
; all other pins are disconnected; the microcontroller is put into slow-down mode by software.
C515C-8E
6 MHz
10 MHz
I
DD
4.01
4.65
4.77
5.53
mA
Idle mode with
slow-down
enabled
C515C-8R/
C515C-LM
6 MHz
10 MHz
I
DD
3.54
3.86
4.46
4.90
mA
6)
C515C-8E
6 MHz
10 MHz
I
DD
3.62
4.14
4.21
4.77
mA
Power-down
mode
C515C-8R/
C515C-LM
I
PD
26
42.9
A
V
DD
= 2 ... 5.5 V
7)
C515C-8E
I
PD
11.14
30
A
At EA/
V
PP
in
programming
mode
C515C-8E
I
DDP
30
mA
C515C
Data Sheet
70
2003-02
6)
I
DD
(idle mode with slow-down mode) is measured with all output pins disconnected and with all peripherals
disabled;
XTAL2 driven with
t
CLCH
,
t
CHCL
= 5 ns,
V
IL
=
V
SS
+ 0.5 V,
V
IH
=
V
DD
- 0.5 V; XTAL1 = N.C.;
RESET =
V
DD
; EA =
V
SS
; Port0 =
V
DD
; all other pins are disconnected; the microcontroller is put into idle mode
with slow-down enabled by software.
7)
I
PD
(power-down mode) is measured under following conditions:
EA = RESET = Port 0 = Port 6 =
V
DD
; XTAL1 = N.C.; XTAL2 =
V
SS
; PE/SWD =
V
SS
;
HWPD =
V
DD
;
V
AGND
=
V
SS
;
V
AREF
=
V
DD
; all other pins are disconnected.
I
PD
(hardware power-down mode) is independent of any particular pin connection.
C515C
Data Sheet
71
2003-02
Power Supply Current Calculation Formulas
Note:
f
OSC
is the oscillator frequency in MHz.
I
DD
values are given in mA.
Parameter
Symbol
Formula
Active mode
C515C-8R/
C515C-LM
I
DD typ
I
DD max
1.71
f
OSC
+ 1.71
1.84
f
OSC
+ 2.7
C515C-8E
I
DD typ
I
DD max
1.59
f
OSC
+ 1.76
1.79
f
OSC
+ 2.2
Idle mode
C515C-8R/
C515C-LM
I
DD typ
I
DD max
0.89
f
OSC
+ 1.56
1.00
f
OSC
+ 1.87
C515C-8E
I
DD typ
I
DD max
0.19
f
OSC
+ 2.81
0.20
f
OSC
+ 3.5
Active mode with
slow-down enabled
C515C-8R/
C515C-LM
I
DD typ
I
DD max
0.14
f
OSC
+ 3.22
0.18
f
OSC
+ 3.95
C515C-8E
I
DD typ
I
DD max
0.16
f
OSC
+ 3.05
0.19
f
OSC
+ 3.63
Idle mode with slow-down
enabled
C515C-8R/
C515C-LM
I
DD typ
I
DD max
0.08
f
OSC
+ 3.06
0.11
f
OSC
+ 3.8
C515C-8E
I
DD typ
I
DD max
0.13
f
OSC
+ 2.84
0.14
f
OSC
+ 3.37
C515C
Data Sheet
72
2003-02
Figure 28
I
DD
Diagrams of C515C-8R/C515C-LM
f
OSC
[MHz]
6
4
2
10
5
10
20
[mA]
15
8
Id
le
M
od
e
25
A
ct
iv
e
M
od
e
A
ct
iv
e
M
od
e
Idl
e M
od
e
Idle+Slow-down
Slow-d
own M
ode
I
DD max
I
DD typ
C515C-8E
C515C-LM
C515C
Data Sheet
73
2003-02
Figure 29
I
DD
Diagrams of C515C-8E
C515C-8E
f
OSC
[MHz]
6
4
2
10
5
10
20
[mA]
15
8
25
Idle Mode+Slow-dow
n
A
ct
iv
e
M
od
e
Idle Mod
e
Active
Mode
+Slow
-down
I
DD max
I
DD typ
C515C
Data Sheet
74
2003-02
A/D Converter Characteristics (Operating Conditions apply)
Parameter
Symbol
Limit Values
Unit Test Condition
min.
max.
Analog input voltage
V
AIN
V
AGND
V
AREF
V
1)
1)
V
AIN
may exceed
V
AGND
or
V
AREF
up to the absolute maximum ratings. However, the conversion result in
these cases will be X000
H
or X3FF
H
, respectively.
Sample time
t
S
16
t
IN
8
t
IN
ns
Prescaler
8
Prescaler
4
2)
2)
During the sample time the input capacitance
C
AIN
can be charged/discharged by the external source. The
internal resistance of the analog source must allow the capacitance to reach their final voltage level within
t
S
.
After the end of the sample time
t
S
, changes of the analog input voltage have no effect on the conversion result.
Conversion cycle time
t
ADCC
96
t
IN
48
t
IN
ns
Prescaler
8
Prescaler
4
3)
3)
This parameter includes the sample time
t
S
, the time for determining the digital result and the time for the
calibration. Values for the conversion clock
t
ADC
depend on programming and can be taken from the table on
the previous page.
Total unadjusted error
T
UE
2
LSB
4)
4)
T
UE
is tested at
V
AREF
= 5.0 V,
V
AGND
= 0 V,
V
DD
= 4.9 V. It is guaranteed by design characterization for all
other voltages within the defined voltage range.
If an overload condition occurs on maximum 2 not selected analog input pins and the absolute sum of input
overload currents on all analog input pins does not exceed 10 mA, an additional conversion error of 1/2 LSB
is permissible.
Internal resistance of
reference voltage source
R
AREF
t
ADC
/ 250
- 0.25
k
t
ADC
in [ns]
5)6)
5)
During the conversion the ADC's capacitance must be repeatedly charged or discharged. The internal
resistance of the reference source must allow the capacitance to reach their final voltage level within the
indicated time. The maximum internal resistance results from the programmed conversion timing.
6)
Not 100% tested, but guaranteed by design characterization.
Internal resistance of
analog source
R
ASRC
t
S
/ 500
- 0.25
k
t
S
in [ns]
2)6)
ADC input capacitance
C
AIN
50
pF
6)
C515C
Data Sheet
75
2003-02
Clock Calculation Table
Further timing conditions:
t
ADC min
= 500 ns
t
IN
= 1 /
f
OSC
=
t
CLP
Clock Prescaler Ratio
ADCL
t
ADC
t
S
t
ADCC
8
1
8
t
IN
16
t
IN
96
t
IN
4
0
4
t
IN
8
t
IN
48
t
IN
C515C
Data Sheet
76
2003-02
AC Characteristics (Operating Conditions apply)
(
C
L
for port 0, ALE and PSEN outputs = 100 pF;
C
L
for all other outputs = 80 pF)
Program Memory Characteristics
Parameter
Symbol
Limit Values
Unit
10-MHz Clock
Duty Cycle
0.4 to 0.6
Variable Clock
1/CLP = 2 MHz
to 10 MHz
min.
max.
min.
max.
ALE pulse width
t
LHLL
60
CLP - 40
ns
Address setup to ALE
t
AVLL
15
TCL
Hmin
- 25
ns
Address hold after ALE
t
LLAX
15
TCL
Hmin
- 25
ns
ALE to valid instruction
in
t
LLIV
113
2 CLP - 87
ns
ALE to PSEN
t
LLPL
20
TCL
Lmin
- 20
ns
PSEN pulse width
t
PLPH
115
CLP +
TCL
Hmin
- 30
ns
PSEN to valid
instruction in
t
PLIV
75
CLP +
TCL
Hmin
- 65
ns
Input instruction hold
after PSEN
t
PXIX
0
0
ns
Input instruction float
after PSEN
t
PXIZ
1)
1)
Interfacing the C515C to devices with float times up to 35 ns is permissible. This limited bus contention will not
cause any damage to port 0 drivers.
30
TCL
Lmin
- 10 ns
Address valid after
PSEN
t
PXAV
1)
35
TCL
Lmin
- 5
ns
Address to valid
instruction in
t
AVIV
180
2 CLP +
TCL
Hmin
- 60
ns
Address float to PSEN
t
AZPL
0
0
ns
C515C
Data Sheet
77
2003-02
External Data Memory Characteristics
Parameter
Symbol
Limit Values
Unit
10-MHz Clock
Duty Cycle
0.4 to 0.6
Variable Clock
1/CLP= 2 MHz to 10 MHz
min.
max.
min.
max.
RD pulse width
t
RLRH
230
3 CLP - 70
ns
WR pulse width
t
WLWH
230
3 CLP - 70
ns
Address hold after
ALE
t
LLAX2
48
CLP
- 15
ns
RD to valid data in
t
RLDV
150
2 CLP +
TCL
Hmin
- 90
ns
Data hold after RD
t
RHDX
0
0
ns
Data float after RD
t
RHDZ
80
CLP - 20
ns
ALE to valid data in
t
LLDV
267
4 CLP - 133
ns
Address to valid data
in
t
AVDV
285
4 CLP +
TCL
Hmin
- 155
ns
ALE to WR or RD
t
LLWL
90
190
CLP +
TCL
Lmin
- 50
CLP +
TCL
Lmin
+ 50
ns
Address valid to WR
t
AVWL
103
2 CLP - 97
ns
WR or RD high to
ALE high
t
WHLH
15
65
TCL
Hmin
- 25
TCL
Hmin
+ 25
ns
Data valid to WR
transition
t
QVWX
5
TCL
Lmin
- 35
ns
Data setup before
WR
t
QVWH
218
3 CLP +
TCL
Lmin
- 122
ns
Data hold after WR
t
WHQX
13
TCL
Hmin
- 27
ns
Address float after
RD
t
RLAZ
0
0
ns
C515C
Data Sheet
78
2003-02
Note: The 10 MHz values in the tables are given as an example for a typical duty cycle
variation of the oscillator clock from 0.4 to 0.6.
SSC Interface Characteristics
Parameter
Symbol
Limit Values
Unit
min.
max.
Clock Cycle Time:
Master Mode
Slave Mode
t
SCLK
t
SCLK
0.4
1.0

s
s
Clock high time
t
SCH
360
ns
Clock low time
t
SCL
360
ns
Data output delay
t
D
100
ns
Data output hold
t
HO
0
ns
Data input setup
t
S
100
ns
Data input hold
t
HI
100
ns
TC bit set delay
t
DTC
8 CLP
ns
External Clock Drive at XTAL2
Parameter
Symbol CPU Clock = 10 MHz
Duty cycle 0.4 to 0.6
Variable CPU Clock
1/CLP = 2 to 10 MHz
Unit
min.
max.
min.
max.
Oscillator period CLP
100
100
100
500
ns
High time
TCL
H
40
40
CLP - TCL
L
ns
Low time
TCL
L
40
40
CLP - TCL
H
ns
Rise time
t
R
12
12
ns
Fall time
t
F
12
12
ns
Oscillator duty
cycle
DC
0.4
0.6
40 / CLP
1 - 40 / CLP
Clock cycle
TCL
40
60
CLP
DC
min
CLP
DC
max
ns
C515C
Data Sheet
79
2003-02
Figure 30
Program Memory Read Cycle
MCT00096
ALE
PSEN
Port 2
LHLL
t
A8 - A15
A8 - A15
A0 - A7
Instr.IN
A0 - A7
Port 0
t
AVLL
PLPH
t
t
LLPL
t
LLIV
t
PLIV
t
AZPL
t
LLAX
t
PXIZ
t
PXIX
t
AVIV
t
PXAV
C515C
Data Sheet
80
2003-02
Figure 31
Data Memory Read Cycle
MCT00097
ALE
PSEN
Port 2
WHLH
t
Port 0
RD
t
LLDV
t
RLRH
t
LLWL
t
RLDV
t
AVLL
t
LLAX2
t
RLAZ
t
AVWL
t
AVDV
t
RHDX
t
RHDZ
A0 - A7 from
Ri or DPL
from PCL
A0 - A7
Instr.
IN
Data IN
A8 - A15 from PCH
P2.0 - P2.7 or A8 - A15 from DPH
C515C
Data Sheet
81
2003-02
Figure 32
Data Memory Write Cycle
Figure 33
External Clock Drive at XTAL2
MCT00098
ALE
PSEN
Port 2
WHLH
t
Port 0
WR
t
WLWH
t
LLWL
t
QVWX
t
AVLL
t
LLAX2
t
QVWH
t
AVWL
t
WHQX
A0 - A7 from
Ri or DPL
from PCL
A0 - A7
Instr.IN
Data OUT
A8 - A15 from PCH
P2.0 - P2.7 or A8 - A15 from DPH
MCT02704
XTAL2
TCLH
TCLL
t
R
CLP
F
t
V
IH2
IL
V
C515C
Data Sheet
82
2003-02
Figure 34
SSC Timing
Notes:
1. Shown is the data/clock relationship for CPOL = CPHA = 1. The timing diagram is
valid for the other cases accordingly.
2. In the case of slave mode and CPHA = 0, the output delay for the MSB applies to the
falling edge of SLS (if transmitter is enabled).
3. In the case of master mode and CPHA = 0, the MSB becomes valid after the data
has been written into the shift register, i.e. at least one half SCLK clock cycle before
the first clock transition.
MCT02417
SCLK
STO
SRI
TC
t
SCL
MSB
LSB
MSB
LSB
SCH
t
t
SCLK
S
t
HI
t
~ ~
~~
~~
~~
~~
~ ~
D
t
t
HD
DTC
t
C515C
Data Sheet
83
2003-02
OTP Memory Programming Mode Characteristics
V
DD
= 5 V
10%;
V
PP
= 11.5 V
5%;
T
A
= 25
C
10
C
Parameter
Symbol
Limit Values
Unit
min.
max.
ALE pulse width
t
PAW
35
ns
PMSEL setup to ALE rising edge
t
PMS
10
ns
Address setup to ALE, PROG, or PRD
falling edge
t
PAS
10
ns
Address hold after ALE, PROG, or PRD
falling edge
t
PAH
10
ns
Address, data setup to PROG or PRD
t
PCS
100
ns
Address, data hold after PROG or PRD
t
PCH
0
ns
PMSEL setup to PROG or PRD
t
PMS
10
ns
PMSEL hold after PROG or PRD
t
PMH
10
ns
PROG pulse width
t
PWW
100
s
PRD pulse width
t
PRW
100
ns
Address to valid data out
t
PAD
75
ns
PRD to valid data out
t
PRD
20
ns
Data hold after PRD
t
PDH
0
ns
Data float after PRD
t
PDF
20
ns
PROG high between two consecutive
PROG low pulses
t
PWH1
1
s
PRD high between two consecutive PRD
low pulses
t
PWH2
100
ns
XTAL clock period
t
CLKP
2
10
MHz
C515C
Data Sheet
84
2003-02
Figure 35
Programming Code Byte - Write Cycle Timing
t
PAW
t
PMS
PAH
t
PAS
t
A8-15
A0-7
D0-7
PCS
t
PWW
t
PCH
t
t
PWH
MCT03690
H, H
PALE
PMSEL1,0
Port 2
Port 0
PROG
PRD must be high during a programming write cycle.
Notes:
C515C
Data Sheet
85
2003-02
Figure 36
Verify Code Byte - Read Cycle Timing
t
PAW
t
PMS
PAH
t
PAS
t
A8-15
A0-7
PAD
t
D0-7
t
PDH
t
PDF
PRD
t
PCS
t
PRW
t
PCH
t
t
PWH
MCT03689
H, H
PALE
PMSEL1,0
Port 2
Port 0
PRD
Notes: PROG must be high during a programming read cycle.
C515C
Data Sheet
86
2003-02
Figure 37
Lock Bit Access Timing
H, L
H, L
D0, D1
D0, D1
t
PCS
PMS
t
PMH
t
t
PCH
PWW
t
PMS
t
PRD
t
t
PDH
PDF
t
PMH
t
PRW
t
MCT03393
PMSEL1,0
Port 0
PROG
PRD
PALE should be low during a lock bit read / write cycle.
Note:
C515C
Data Sheet
87
2003-02
Figure 38
Version Byte - Read Timing
e. g. FD
D0-7
t
PCS
PMS
t
t
PDH
PDF
t
PMH
t
MCT03394
Port 2
Port 0
PRD
PMSEL1,0
L, H
H
PRW
t
PRD
t
PCH
t
PROG must be high during a programming read cycle.
Note:
C515C
Data Sheet
88
2003-02
ROM/OTP Verification Characteristics for C515C-8R / C515C-8E
Figure 39
ROM Verification Mode 1
ROM Verification Mode 1 (C515C-8R)
Parameter
Symbol
Limit Values
Unit
min.
max.
Address to valid data
t
AVQV
5 CLP
ns
MCT02764
Inputs: PSEN =
SS
V
ALE, EA = V
IH
RESET = V
IL2
Address
Port 0
New Address
Data Out
New Data Out
t
AVQV
Data:
Addresses:
P2.0 - P2.7
P1.0 - P1.7
P1.0 - P1.7 = A0 - A7
P2.0 - P2.7 = A8 - A15
P0.0 - P0.7 = D0 - D7
C515C
Data Sheet
89
2003-02
Figure 40
ROM/OTP Verification Mode 2
ROM/OTP Verification Mode 2
Parameter
Symbol
Limit Values
Unit
min.
typ.
max.
ALE pulse width
t
AWD
CLP
ns
ALE period
t
ACY
6 CLP
ns
Data valid after ALE
t
DVA
2 CLP
ns
Data stable after ALE
t
DSA
4 CLP
ns
P3.5 setup to ALE low
t
AS
t
CL
ns
Oscillator frequency
1 / CLP
4
6
MHz
MCT02613
t
ACY
t
AWD
t
DSA
DVA
t
t
AS
Data Valid
ALE
Port 0
P3.5
C515C
Data Sheet
90
2003-02
Figure 41
AC Testing: Input, Output Waveforms
Figure 42
AC Testing: Float Waveforms
Figure 43
Recommended Oscillator Circuits for Crystal Oscillator
AC Inputs during testing are driven at
V
DD
- 0.5 V for a logic `1' and 0.45 V for a logic `0'.
Timing measurements are made at
V
IHmin
for a logic `1' and
V
ILmax
for a logic `0'.
0.45 V
V
DD
0.2
- 0.1
+ 0.9
0.2
DD
V
Test Points
MCT00039
V
DD
- 0.5 V
MCT00038
V
Load
V
Load
-0.1 V
+0.1 V
Load
V
Timing Reference
Points
V
OH
-0.1 V
+0.1 V
OL
V
For timing purposes a port pin is no longer floating when a 100 mV change from load voltage
occurs and begins to float when a 100 mV change from the loaded
V
OH
/
V
OL
level occurs.
I
OL
/
I
OH
20 mA
MCT02765
XTAL1
XTAL2
XTAL2
XTAL1
Crystal/Resonator Oscillator Mode
Driving from External Source
External Oscillator
Signal
N.C.
2 - 10 MHz
C
C
C = 20 pF 10 pF (incl. stray capacitance)
Crystal Mode
:
:
Resonator Mode
= depends on selected ceramic resonator
C
C515C
Data Sheet
91
2003-02
Package Outlines

0.65
0.3
12.35
0.1
2
2.45 max
1
80
Index Marking
17.2
14
0.25 min
+0.1
0.88
1)
0.6x45
1) Does not include plastic or metal protrusions of 0.25 max per side
A-B
0.2
H
D
4x
A-B
0.2
D 80x
A
B
D
C
0.12
80x
D
A-B
M
C
1)
14
17.2
-0.05
H
7max
-0.02
+0.08
0.15
0.08
P-MQFP-80-1
(Plastic Metric Quad Flat Package)
GPM05249
You can find all of our packages, sorts of packing and others in our
Infineon Internet Page "Products": http://www.infineon.com/products.
Dimensions in mm
SMD = Surface Mounted Device
w w w . i n f i n e o n . c o m
Published by Infineon Technologies AG