As far as patents or other rights of third parties are concerned, liability is only assumed for components, not for applications, processes
and circuits implemented within components or assemblies.
The information describes the type of component and shall not be considered as assured characteristics.
Terms of delivery and rights to change design reserved.
For questions on technology, delivery and prices please contact the Semiconductor Group Offices in Germany or the Siemens Companies
and Representatives worldwide (see address list).
Due to technical requirements components may contain dangerous substances. For information on the types in question please contact
your nearest Siemens Office, Semiconductor Group.
Siemens AG is an approved CECC manufacturer.
Packing
Please use the recycling operators known to you. We can also help you – get in touch with your nearest sales office. By agreement we
will take packing material back, if it is sorted. You must bear the costs of transport.
For packing material that is returned to us unsorted or which we are not obliged to accept, we shall have to invoice you for any costs incurred.
Components used in life-support devices or systems must be expressly authorized for such purpose!
Critical components
1
of the Semiconductor Group of Siemens AG, may only be used in life-support devices or systems
2
with the express
written approval of the Semiconductor Group of Siemens AG.
1 A critical component is a component used in a life-support device or system whose failure can reasonably be expected to cause the
failure of that life-support device or system, or to affect its safety or effectiveness of that device or system.
2 Life support devices or systems are intended (a) to be implanted in the human body, or (b) to support and/or maintain and sustain hu-
man life. If they fail, it is reasonable to assume that the health of the user may be endangered.
8-Bit CMOS Microcontroller
Advance Information
•Fully compatible to standard 8051 microcontroller
•Superset of the 8051 architecture with 8 datapointers
•Up to 20 MHz operating frequency
– 375 ns instruction cycle time @16 MHz
– 300 ns instruction cycle time @20 MHz (50 % duty cycle)
•On-chip program memory (with optional memory protection)
– C505-2R/C505C-2R :16k byte on-chip ROM
– C505A-4E/C505CA-4E:32k byte on-chip OTP
– alternatively up to 64k byte external program memory
•32 + 2 digital I/O lines
– Four 8-bit digital I/O ports
– One 2-bit digital I/O port (port 4)
– Port 1 with mixed analog/digital I/O capability
C505
C505C
C505A
C505CA
(more features on next page)
Oscillator Watchdog
A / D Converter
C505 / C505C: 8-Bit
C505A / C505CA: 10-Bit
Timer 2
Support Module
On-Chip Emulation
Full-CAN Controller
C505C / C505CA only
Watchdog Timer
Figure 1
C505 Functional Units
XRAM
C505 / C505C: 256 Byte
C505A / C505CA: 1 KByte
Timer
0
Timer
1
C500
Core
8 Datapointers
Program Memory
C505 / C505C: 16 k ROM
C505A / C505CA: 32 k OTP
USART
RAM
256 Byte
8-Bit
Port 0
Port 1
Port 2
Port 3
Port 4
I / O
8 Analog Inputs /
8 Digit. I / O
I / O
I / O
I / O (2-Bit I / O Port)
MCB03628
Semiconductor Group31997-12-01
✓
C505A / C505CA
Features (cont’d):
•Three 16-bit timers/counters
– Timer 0 / 1 (C501 compatible)
– Timer 2 with 4 channels for 16-bit capture/compare operation
•Full duplex serial interface with programmable baudrate generator (USART)
•Full CAN Module, version 2.0 B compliant (C505C and C505CA only)
– 256 register/data bytes located in external data memory area
– 1 MBaud CAN baudrate when operating frequency is equal to or above 8 MHz
– internal CAN clock prescaler when input frequency is over 10 MHz
•On-chip A/D Converter
– up to 8 analog inputs
– C505/C505C: 8-bit resolution
– C505A/C505CA: 10-bit resolution
•Twelve interrupt sources with four priority levels
• On-chip emulation support logic (Enhanced Hooks Technology
•Programmable 15-bit watchdog timer
•Oscillator watchdog
•Fast power on reset
•Power Saving Modes
– Slow-down mode
– Idle mode (can be combined with slow-down mode)
– Software power-down mode with wake up capability through P3.2/INT0
•P-MQFP-44 package
•Pin configuration is compatible to C501, C504, C511/C513-family
is an 8-bit quasi-bidirectional port with internal pull-up arrangement. Port 1 pins can be used for digital input/output
or as analog inputs of the A/D converter. Port 1 pins that
have 1’s written to them are pulled high by internal pull-up
transistors and in that state can be used as inputs. As inputs, port 1 pins being externally pulled low will source current (
pullup transistors. Port 1 pins are assigned to be used as
analog inputs via the register P1ANA.
As secondary digital functions, port 1 contains the interrupt,
timer, clock, capture and compare pins. The output latch
corresponding to a secondary function must be programmed to a one (1) for that function to operate (except for
compare functions). The secondary functions are assigned
to the pins of port 1 as follows:
Port 1 is used for the low-order address byte during program
verification of the C505-2R and C505C-2R.
, in the DC characteristics) because of the internal
I
IL
/ CC0Analog input channel 0
interrupt 3 input /
capture/compare channel 0 I/O
interrupt 4 input /
capture/compare channel 1 I/O
interrupt 5 input /
capture/compare channel 2 I/O
interrupt 6 input /
capture/compare channel 4 I/O
external reload / trigger input
system clock output
counter 2 input
*) I = Input
O= Output
Semiconductor Group81997-12-01
Table 3
Pin Definitions and Functions (cont’d)
C505 / C505C
C505A / C505CA
SymbolPin NumberI/O
*)
RESET4I
P3.0-P3.75, 7-13
5
7
8
9
10
11
12
13
I/O
Function
RESET
A high level on this pin for one machine cycle while the
oscillator is running resets the device. An internal diffused
resistor to
external capacitor to
Port 3
is an 8-bit quasi-bidirectional port with internal pull-up
arrangement. Port 3 pins that have 1’s written to them are
pulled high by the internal pull-up transistors and in that
state can be used as inputs. As inputs, port 3 pins being
externally pulled low will source current (
characteristics) because of the internal pullup transistors.
The output latch corresponding to a secondary function
must be programmed to a one (1) for that function to operate
(except for TxD and WR
assigned to the pins of port 3 as follows:
P3.0 / RxDReceiver data input (asynch.) or data
WR control output; latches the data
byte from port 0 into the external data
memory
data memory
*) I = Input
O= Output
Semiconductor Group91997-12-01
Table 3
Pin Definitions and Functions (cont’d)
C505 / C505C
C505A / C505CA
SymbolPin NumberI/O
*)
P4.0
P4.1
XTAL214O
XTAL115I
6
28
I/O
I/O
Function
Port 4
is a 2-bit quasi-bidirectional port with internal pull-up
arrangement. Port 4 pins that have 1’s written to them are
pulled high by the internal pull-up transistors and in that
state can be used as inputs. As inputs, port 4 pins being
externally pulled low will source current (
characteristics) because of the internal pullup transistors.
The output latch corresponding to the secondary function
RXDC must be programmed to a one (1) for that function to
operate. The secondary functions are assigned to the two
pins of port 4 as follows (C505C and C505CA only) :
P4.0 / TXDCTransmitter output of CAN controller
P4.1 / RXDCReceiver input of CAN controller
XTAL2
Output of the inverting oscillator amplifier.
XTAL1
Input to the inverting oscillator amplifier and input to the
internal clock generator circuits.
To drive the device from an external clock source, XTAL1
should be driven, while XTAL2 is left unconnected. To
operate above a frequency of 16 MHz, a duty cycle of the
etxernal clock signal of 50 % should be maintained.
Minimum and maximum high and low times as well as rise/
fall times specified in the AC characteristics must be
observed.
, in the DC
I
IL
*) I = Input
O = Output
Semiconductor Group101997-12-01
Table 3
Pin Definitions and Functions (cont’d)
C505 / C505C
C505A / C505CA
SymbolPin NumberI/O
*)
P2.0-P2.718-25I/O
PSEN
26OThe Program Store
Function
Port 2
is a 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 (
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 transistors when
issuing 1s. During accesses to external data memory that
use 8-bit addresses (MOVX @Ri), port 2 issues the
contents of the P2 special function register and uses only
the internal pullup resistors.
Enable
output is a control signal that enables the external program
memory to the bus during external fetch operations. It is
activated every three oscillator periods except during
external data memory accesses. Remains high during
internal program execution. This pin should not be driven
during reset operation.
, in the DC characteristics)
I
IL
ALE27OThe Address Latch Enable
output is used for latching the low-byte of the address into
external memory during normal operation. It is activated
every three oscillator periods except during an external data
memory access. When instructions are executed from
internal ROM or OTP (EA
disabled by bit EALE in SFR SYSCON.
ALE should not be driven during reset operation.
*) I = Input
O= Output
=1) the ALE generation can be
Semiconductor Group111997-12-01
Table 3
Pin Definitions and Functions (cont’d)
C505 / C505C
C505A / C505CA
SymbolPin NumberI/O
*)
EA
P0.0-P0.737-30I/O
29I
Function
External Access Enable
When held at high level, instructions are fetched from the
internal ROM or OTP memory when the PC is less than
4000H (C505 and C505C) or less than 8000H (C505A and
C505CA). When held at low level, the C505 fetches all
instructions from external program memory. EA
be driven during reset operation.
For the C505-L and the C505C-L this pin must be tied low.
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-impendance inputs. Port 0 is also the multiplexed
low-order address and data bus during accesses to external
program or data memory. In this application it uses strong
internal pullup transistors when issuing 1’s.
Port 0 also outputs the code bytes during program
verification in the C505-2R/C505C-2R. External pullup
resistors are required during program verification.
should not
V
AREF
V
AGND
V
SS
V
CC
*) I = Input
O= Output
38–Reference voltage for the A/D converter.
39–Reference ground for the A/D converter.
16–Ground (0 V)
17–Power Supply (+ 5 V)
Figure 4
Block Diagram of the C505/C505C/C505A/C505CA
Semiconductor Group131997-12-01
C505 / C505C
C505A / C505CA
CPU
The C505 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% threebyte instructions. With a 16 MHz crystal, 58% of the instructions are executed in 375 ns.
Special Function Register PSW (Address D0H) Reset Value : 00H
Bit No.MSBLSB
H
D7
CYAC
H
D6
H
D5
F0
H
D4
RS1RS0OVF1PD0
BitFunction
CYCarry Flag
Used by arithmetic instruction.
ACAuxiliary Carry Flag
Used by instructions which execute BCD operations.
F0General Purpose Flag
RS1
RS0
Register Bank Select Control Bits
These bits are used to select one of the four register banks.
RS1RS0Function
00Bank 0 selected, data address 00H-07
01Bank 1 selected, data address 08H-0F
10Bank 2 selected, data address 10H-17
11Bank 3 selected, data address 18H-1F
H
D3
H
D2
H
D1
H
D0
H
PSW
H
H
H
H
OVOverflow Flag
Used by arithmetic instruction.
F1General Purpose Flag
PParity Flag
Set/cleared by hardware after each instruction to indicate an odd/even
number of "one" bits in the accumulator, i.e. even parity.
Semiconductor Group141997-12-01
Memory Organization
The C505 CPU manipulates operands in the following four address spaces:
– On-chip program memory :16 Kbyte ROM (C505-2R/C505C-2R) or
32 Kbyte OTP (C505A-4E/C505CA-4E)
– Totally up to 64 Kbyte internal/external program memory
– up to 64 Kbyte of external data memory
– 256 bytes of internal data memory
– Internal XRAM data memory :256 byte (C505/C505C)
1k byte (C505A/C505CA)
– a 128 byte special function register area
Figure 5 illustrates the memory address spaces of the C505 versions.
Alternatively
C505 / C505C
C505A / C505CA
FFFF
H
Ext.
4000 /
H
8000
H
3FFF /
7FFF
Int.
(EA = 1)
Ext.
(EA = 0)
0000
"Code Space""Data Space""Internal Data Space"
"Data Space" F700 to FFFF :
Device
C505
C505C
C505A
C505CA
HH
CAN Area
F700 F7FF
HH
F700 F7FF
HH
Unused Area
F700 FEFF
F800 FEFF
F700 FBFF
F800 FBFF
Ext.
Data
Memory
H
H
Ext.
Data
Memory
H
XRAM Area
HH
HH
H
H
FF00 FFFF
FF00 FFFF
FC00 FFFF
H
FC00 FFFF
H
FFFF
Internal
XRAM
Unused
Area
Int. CAN
H
See table below
for detailed
Data Memory
partitioning
Contr.
(256 Byte)
F6FF
H
F700
H
Indirect
Addr.
Internal
RAM
0000
H
HH
HH
HH
HH
FF
H
80
H
Internal
RAM
Direct
Addr.
Special
Function
Regs.
7F
H
00
H
MCB03632
FF
80
H
H
Figure 5
C505 Memory Map Memory Map
Semiconductor Group151997-12-01
C505 / C505C
C505A / C505CA
Reset and System Clock
The reset input is an active high input at pin RESET. Since the reset is synchronized internally, the
RESET pin must be held high for at least two machine cycles (12 oscillator periods) while the
oscillator is running. A pulldown resistor is internally connected to VSS to allow a power-up reset with
an external capacitor only. An automatic reset can be obtained when VCC is applied by connecting
the RESET pin to VCC via a capacitor. Figure 6 shows the possible reset circuitries.
V
CC
a)
C505
+
C505C
C505A
C505CA
RESETRESET
V
CC
V
CC
c)
C505
+
C505C
C505A
C505CA
RESET
&
b)
C505
C505C
C505A
C505CA
MCS03633
Figure 6
Reset Circuitries
Semiconductor Group161997-12-01
C505 / C505C
C505A / C505CA
Figure 7 shows the recommended oscillator circuits for crystal and external clock operation.
C
XTAL2
C505
2 - 20 MHz
C
C = 20 pF 10 pF for crystal operation
C505C
C505A
C505CA
XTAL1
External
Clock
Signal
Figure 7
Recommended Oscillator Circuitries
V
CC
N.C.
XTAL2
C505
C505C
C505A
C505CA
XTAL1
MCS03634
Semiconductor Group171997-12-01
C505 / C505C
C505A / C505CA
Multiple Datapointers
As a functional enhancement to the standard 8051 architecture, the C505 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 regsiter DPSEL.
Figure 8 illustrates the datapointer addressing mechanism.
Figure 8
External Data Memory Addressing using Multiple Datapointers
External Data Memory
MCD00779
Semiconductor Group181997-12-01
C505 / C505C
C505A / C505CA
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 supprt 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.
1)
The Enhanced Hooks Technology
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.
TM
, which requires embedded logic in the C500 allows the C500
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.
1)
“Enhanced Hooks Technology” is a trademark and patent of Metalink Corporation licensed to Siemens.
Semiconductor Group191997-12-01
C505 / C505C
C505A / C505CA
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. Five special
function register of the C505 (PCON1,P1ANA, VR0, VR1, VR2) 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“).
The registers and data locations of the CAN controller (CAN-SFRs) are located in the external data
memory area at addresses F700H to F7FFH..
Special Function Register SYSCON (Address B1H) Reset Value : XX100X01
(C505CA only) Reset Value : XX100001
Bit No.MSBLSB
76543210
B1
H
BitFunction
RMAPSpecial function register map bit
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 respectively by software.
––
The functions of the shaded bits are not described here.
1) This bit is only available in the C505CA.
RMAP = 0 : The access to the non-mapped (standard) special function
RMAP = 1 : The access to the mapped special function register area is
EALERMAP CMOD
register area is enabled.
enabled.
CSWO
1)
XMAP1
XMAP0
SYSCON
B
B
All SFRs with addresses where address bits 0-2 are 0 (e.g. 80H, 88H, 90H, 98H, ..., F8H, FFH) are
bitaddressable.
The 52 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 C505 are listed in table 4 and table 5. In table 4 they are organized in groups which
refer to the functional blocks of the C505. The CAN-SFRs (applicable for the C505C and C505CA
only) 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. .
Semiconductor Group201997-12-01
C505 / C505C
C505A / C505CA
Table 4
Special Function Registers - Functional Blocks
BlockSymbolNameAddressContents after
Reset
CPUACC
B
DPH
DPL
DPSEL
PSW
SP
SYSCON
VR0
VR1
VR2
A/DConverter
ADCON0
ADCON1
ADDAT
ADST
ADDATH
4)
4)
4)
Accumulator
B-Register
Data Pointer, High Byte
Data Pointer, Low Byte
Data Pointer Select Register
Program Status Word Register
Stack Pointer
2)
System Control Register
Version Register 0
Version Register 1
Version Register 2
2)
A/D Converter Control Register 0
A/D Converter Control Register 1
A/D Converter Data Reg. (C505/C505C)
A/D Converter Start Reg. (C505/C505C)
A/D Converter High Byte Data Register
(C505A/C505CA)
ADDATL
A/D Converter Low Byte Data Register
(C505A/C505CA)
This special function register is listed repeatedly since some bits of it also belong to other functional blocks.
3)
“X” means that the value is undefined and the location is reserved
4)
SFR is located in the mapped SFR area. For accessing this SFR, bit RMAP in SFR SYSCON must be set.
PCON
PCON1
2)
Port 0
Port 1
2) 4)
Port 1 Analog Input Selection Register
Port 2
Port 3
Port 4
2)
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
Timer 0/1 Control Register
Timer 0, High Byte
Timer 1, High Byte
Timer 0, Low Byte
Timer 1, Low Byte
Timer Mode Register
Table 4
Special Function Registers - Functional Blocks (cont’d)
BlockSymbolNameAddressContents after
Reset
H
H
H
H
H
01
H
3)
XX
H
3)
XX
H
3)
UU
H
0UUUUUUU
3)
UU
H
UUU11111
3)
UU
H
3)
UU
H
3)
UU
H
UUUUU000
3)
UU
H
3)
UU
H
3)
UU
H
UUUUU000
B
B
B
B
CAN
Controller
(C505C/
C505CA
only)
CR
SR
IR
BTR0
BTR1
GMS0
GMS1
UGML0
UGML1
LGML0
LGML1
UMLM0
UMLM1
LMLM0
LMLM1
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
2) This special function register is listed repeatedly since some bits of it also belong to other functional blocks.
3) “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
4) SFR is located in the mapped SFR area. For accessing this SFR, bit RMAP in SFR SYSCON must be set.
5) The notation “n” (n= 1 to F) in the message object address definition defines the number of the related
message object.
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
X means that the value is undefined and the location is reserved
Bit-addressable special function registers
SFR is located in the mapped SFR area. For accessing this SFR, bit RMAP in SFR SYSCON must be set.