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
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.
1
of the Semiconductor Group of Siemens AG, may only be used in life-support devices or systems
2
with the express
8-Bit CMOS Microcontroller
Advance Information
C540U
C541U
Enhanced 8-bit C500 CPU
•
– Full software/toolset compatible to standard 80C51/80C52 microcontrollers
12 MHz external operating frequency
•
– 500 ns instruction cycle
Built-in PLL for USB synchronization
•
On-chip OTP program memory
•
– C540U : 4K byte
– C541U : 8K byte
– Alternatively up to 64K byte external program memory
– Optional memory protection
On-chip USB module
•
– Compliant to USB specification
– Full speed or low speed operation
– Five endpoints : one bidirectional control endpoint
four versatile programmable endpoints
– Registers are located in special function register area
– On-chip USB transceiver
Oscillator
Watchdog
Power
Saving
Modes
On-Chip Emulation Support Module
The shaded units are not available in the C540U.
Semiconductor Group31997-10-01
Watchdog
Timer
SSCT0
USB
Module
USB Transceiver
D+D-
T1
RAM
256 x 8
CPU
OTP Prog. Memory
C540U : 4 k x 8
C541U : 8 k x 8
Port 0
Port 1
Port 2
Port 3
I/O
I/O
I/O
I/O
MCA03373
Features (cont’d) :
•
Up to 64K byte external data memory
•
256 byte on-chip RAM
•
Four parallel I/O ports
– P-LCC-44 package :three 8-bit ports and one 6-bit port
– P-SDIP-52 package :four 8-bit ports
– LED current drive capability for 3 pins (10 mA)
•
Two 16-bit timer/counters (C501 compatible)
•
SSC synchronous serial interface (SPI compatible) (only C541U)
– Master and slave capable
– Programmable clock polarity / clock-edge to data phase relation
– LSB/MSB first selectable
– 1.5 MBaud transfer rate at 12 MHz operating frequency
•
7 interrupt sources (2 external, 5 internal with 2 USB interrupts) selectable at 2 priority levels
The pin D+ can be directly connected to USB cable
(transceiver is integrated on-chip).
D-44I/O USB D- Data Line
The pin D- can be directly connected to USB cable
(transceiver is integrated on-chip).
C540U
C541U
P1.0 - P1.45 - 7,
12, 34, 44
5
6
7
12
34
44
–
–
7 - 9, 14, 41,
51, 15, 40
7
8
9
13
41
51
15
40
I/O Port 1
is an 6-bit (P-LCC-44) or 8-bit (P-SDIP-52) quasibidirectional 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
in the DC characteristics) because of the internal
pullup resistors.
Port 1 also contains two outputs with LED drive
capability as well as the four pins of the SSC
(C541U only). 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 / LED0 LED0 output
P1.1 / LED1 LED1 output
P1.2 / SCLK SSC Master Clock Output /
A high level on this pin for the duration of two
machine cycles while the oscillator is running
resets the C540U/C541U. A small internal pulldown
resistor permits power-on reset using only a
capacitor connected to V
*) I = Input
O = Output
CC
.
Semiconductor Group81997-10-01
Table 2
Pin Definitions and Functions (cont’d)
SymbolPin NumbersI/O*) Function
P-LCC-44P-SDIP-52
P3.0 - P3.711, 13 - 19 13, 16 - 22I/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
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 / LED2LED2 output
P3.1 / DADDDevice attached input
P3.2 / INT0
P3.3 / INT1External interrupt 1 input /
P3.4 / T0Timer 0 counter input
P3.5 / T1Timer 1 counter input
P3.6 / WRWR control output; latches the
P3.7 / RD
C540U
C541U
, in the DC characteristics) because of
IL
External interrupt 0 input /
timer 0 gate control input
timer 1 gate control input
data byte from port 0 into the
external data memory
RD control output; enables the
external data memory
XTAL22023–
XTAL12124–
*) I = Input
O = Output
Semiconductor Group91997-10-01
XTAL2
is the output of the inverting oscillator amplifier.
This pin is used for the oscillator operation with
crystal or ceramic resonator.
XTAL1
is the 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.
low times as well as rise/fall times specified in the
AC characteristics must be observed.
Minimum and maximum high and
Table 2
Pin Definitions and Functions (cont’d)
SymbolPin NumbersI/O*) Function
P-LCC-44P-SDIP-52
P2.0 - P2.724 - 3128 - 35I/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
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.
C540U
C541U
, in the DC characteristics) because of
IL
PSEN
3238OThe 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.
ALE3339OThe 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.
EA
3542I
External Access Enable
When held high, the C540U/C541U executes
instructions from the internal ROM as long as the
PC is less than 1000H for the C540U or less than
2000H for the C541U. When held low, the C540U/
C541U fetches all instructions from external
program memory. For the C540U-L/C541U-L this
pin must be tied low.
*) I = Input
O = Output
Semiconductor Group101997-10-01
Table 2
Pin Definitions and Functions (cont’d)
SymbolPin NumbersI/O*) Function
P-LCC-44P-SDIP-52
P0.0 - P0.744 - 3650 - 43I/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.
C540U
C541U
V
CCU
V
SSU
V
CC
V
SS
*) I = Input
O = Output
11 –
Supply voltage
for the on-chip USB transceiver circuitry.
22 –
Ground (0V)
for the on-chip USB transceiver circuitry.
8, 2310, 26–
Supply voltage
for ports and internal logic circuitry during normal,
idle, and power down mode.
9, 2211, 25–
Ground (0V)
for ports and internal logic circuitry during normal,
idle, and power down mode.
The C540U/C541U 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 12 MHz crystal, 58% of the instructions are executed in 500ns.
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 Group131997-10-01
Memory Organization
The C540U/C541U CPU manipulates operands in the following four address spaces:
– 8 or 4 KByte on-chip OTP program memory
– Totally up to 64 Kbyte internal/external program memory
– up to 64 Kbyte of external data memory
– 256 bytes of internal data memory
– a 128 byte special function register area
Figure 6 illustrates the memory address spaces of the C540U/C541U.
C540U
C541U
Internal
(EA = 1)
External
FFFF
2000 1)
External
(EA = 0)
H
H
1FFF 1)
FFFF
H
H
H
Direct
Addr.
Special
Function
Register
7F
H
FF
80
H
H
External
Indirect
Addr.
FF
Internal
RAM
80
H
Internal
RAM
0000
H
0000
H
00
H
"Code Space""External Data Space""Internal Data Space"
1) For the C504U the int. / ext. program memory boundary is at 0FFF / 1000 .
H
H
MCD03375
Figure 6
C540U/C541U Memory Map Memory Map
Semiconductor Group141997-10-01
C540U
C541U
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 7 shows the possible reset circuitries.
V
CC
a)
+
C540U
C541UC541U
RESETRESET
V
CC
V
CC
c)
+
C540U
C541U
RESET
&
b)
C540U
MCD03376
Figure 7
Reset Circuitries
Semiconductor Group151997-10-01
C540U
C541U
The oscillator and clock generation circuitry of the C540U/C541U is shown in figure 5-8. The crystal
oscillator generates the system clock for the microcontroller. The USB module can be provided with
the following clocks :
– Full speed operation : 48 MHz with a data rate of 12 Mbit/s
– Low speed operation : 6 MHz with a data rate of 1.5 Mbit/s
The low speed clock is generated by a dividing the system clock by 2. The full speed clock is
generated by a PLL, which multiplies the system clock by a fix factor of 4. This PLL can be enabled
or disabled by bit PCLK of SFR DCR. Depending on full or low speed operation of the USB bit
SPEED of SFR has to be set or cleared for the selection of the USB clock. Bit UCLK is a general
enable bit for the USB clock.
XTAL1
12 MHz
XTAL2
Pin
Oscillator
Pin
6 MHz
C540U / C541U
Crystal
DividerPLL
by 2
12 MHz
48 MHz
Figure 8
Block Diagram of the Clock Generation Circuitry
x 4
1
0
SPEED
DCR.7
System Clock
of the
Microcontroler
Enable
PCLK
DCR.0
to USB
Module
UCLK
DCR.1
MCB03377
Semiconductor Group161997-10-01
C540U
C541U
The clock generator provides the internal clock signals to the chip. These signals define the internal
phases, states and machine cycles. Figure 9 shows the recommended oscillator circuits for crystal
and external clock operation.
C
XTAL2
C = 20 pF 10 pF for crystal operation
External
Clock
Signal
Figure 9
Recommended Oscillator Circuitries
12 MHz
C
V
CC
N.C.
C540U
C541U
XTAL1
C540U
C541U
XTAL2
XTAL1
MCD03378
Semiconductor Group171997-10-01
C540U
C541U
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 programm 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 Group181997-10-01
C540U
C541U
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. One special
function register of the C540U/C541U (PCON1) is located in the mapped special function register
area. All other SFRs are located in the standard special function register area.
For accessing PCON1 in the mapped special function register area, bit RMAP in special function
register SYSCON must be set.
Special Function Register SYSCON (Address B1H) Reset Value : XX10XXXX
Bit No.MSBLSB
76543210
B1
H
BitFunction
RMAPSpecial function register map bit
As long as bit RMAP is set, a mapped special function register 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.
––
The functions of the shaded bits are not described in this section.
RMAP = 0 : The access to the non-mapped (standard) special function
RMAP = 1 : The access to the mapped special function register area
EALERMAP–
register area is enabled.
(PCON1) is enabled.
––
–
SYSCON
B
The registers, except the program counter and the four general purpose register banks, reside in
the special function register area. All SFRs with addresses where address bits 0-2 are 0 (e.g. 80H,
88H, 90H, 98H, ..., F8H, FFH) are bitaddressable.
The 75 special function registers (SFRs) in the SFR area include pointers and registers that provide
an interface between the CPU and the other on-chip peripherals. The SFRs of the C540U/C541U
are listed in table 3 to table 4. In table 3 they are organized in groups which refer to the functional
blocks of the C540U/C541U. Table 4 and table 4 illustrate the contents of the SFRs in numeric
order of their addresses.
Semiconductor Group191997-10-01
C540U
C541U
Table 3
Special Function Registers - Functional Blocks
BlockSymbolNameAddressContents after
Reset
CPUACC
B
DPH
DPL
PSW
SP
VR0
VR1
VR2
SYSCON
Interrupt
System
IEN0
IEN1
IP0
IP1
ITCON
PortsP0
P1
P2
P3
Timer 0 /
Timer 1
TCON
TH0
TH1
TL0
TL1
TMOD
SSC
Interface
(C541U
only)
SSCCON
STB
SRB
SCF
SCIEN
SSCMOD
Watchdog
(C541U
WDCON
WDTREL
only)
Accumulator
B Register
Data Pointer, High Byte
Data Pointer, Low Byte
Program Status Word Register
Stack Pointer
Version Register 0
Version Register 1
Version Register 2
System Control Register