The information herein is given to descr ibe certain components and shall not be considere d as warranted
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 her ein.
Infineon Technologies is an approved CECC manufacturer.
Information
For further information on tech nology, delivery terms and conditions and prices please contact your nearest
Infineon Technologies Office in Germany or our Infineon Technologies Representatives worldwide (see address
list).
Warnings
Due to technical requirements co mponents may contain dangerous substan ce s. For information on the t yp es in
question please contact your neares t Infineon Technologies Office.
Infineon Technologies Components may only be used in life-support devices or systems with the express written
approval of Infineon T echnologies, if a f ailure of such components can reasonably be expected to cause the failure
of that lif e - su ppo rt de vi ce o r system, or to aff ec t th e sa fety or effectiveness of th a t d evice or system. L i fe support
devices or systems are inten ded to be implante d 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.
C505
C505C
Data Sheet, Dec. 2000
C505A
C505CA
8-Bit Single-Chip Microcontroller
Microcontrollers
Never stop thinking.
C505/C505C/C505A/C505CA Data Sheet
Revision History :Current Version : 2000-12
2424Version register VR2 for C505A-4R/C505CA-4R BB step is updated.
Page
(in current
version)
Subjects (major changes since last revision)
Controller Area Network (CAN): License of Robert Bosch GmbH
We Listen to Your Comments
Any information within this document that you feel is wrong, unc lea r 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
8-Bit Single-Chip Microcontroller
C500 Family
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(C)(A)-2R : 16K byte on-chip ROM
– C505A-4R/C505CA-4R: 32K byte on-chip ROM
– C505A-4E/C505CA-4E: 32K byte on-chip OTP
– alternatively up to 64k byte external program memory
• 256 byte on-chip RAM
• On-chip XRAM
– C505/C505C :256 byte
– C505A/C505CA : 1K byte
(more features on next page)
C505/C505C/C505A/
C505CA
Oscillator
Watchdog
A/D Converter
C505/C505C : 8-bit
C505A/C505CA : 10-bit
Timer 2
Full-CAN Controller
C505C/C505CA only
Watchdog Timer
On-Chip Emulation Support Module
Figure 1
C505 Functional Units
XRAM
C505/C505C: 256 byte
C505A/C505CA: 1K byte
Timer
0
Timer
1
Program Memory
C505A-4R/C505CA -4R : 32K ROM
C505A-4E/C505CA-4E : 32K OTP
C500
Core
8 Datapointers
C505(C)(A)-2R : 16K ROM
RAM
256 byte
8-bit
USART
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)
Data Sheet1 12.00
C505/C505C/C505A/C505CA
Features (continued) :
• 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
• 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
TM
)
• 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
or P4.1/RXDC pin
• P-MQFP-44 package
• Pin configuration is compatible to C501, C504, C511/C513-family
Note: The term C505 refers to all versions described within this document unless otherwise noted.
However the term C505 may also be restricted by the context to refer to only CAN-less
derivatives with 8-Bit ADC which are C505-2R and C505-L in this document.
Resolution
CAN
Controller
Note: The term C505(C)(A)-2R, for simplicity, is used to stand for C505 16K byte ROM versions
within this document which are C505-2R, C505C-2R, C505A-2R and C505CA-2R.
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 specificed temperature rage
• the package and the type of delivery
For the available ordering codes for the C505 please refer to the “Product information
Microcontrollers”, which summarizes all available microcontroller variants.
Data Sheet3 12.00
C505/C505C/C505A/C505CA
V
DDVSS
RESET
Figure 2
Logic Symbol
V
AREF
V
AGND
XTAL1
XTAL2
EA
ALE
PSEN
C505
C505C
C505A
C505CA
Port 0
8-bit Digital I/O
Port 1
8-bit Digital I/O /
8-bit Analog Inputs
Port 2
8-bit Digital I/O
Port 3
8-bit Digital I/O
Port 4
2-bit Digital I/O
Note: The ordering codes for the Mask-ROM versions are defined for each product after
is an 8-bit quasi-bidirecti onal port with internal pull-up
arrangement. Port 1 pins can be used for digital inpu t/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 (I
internal pullup transistors. Port 1 pins are assigned to be
used as analog inputs via the register P1ANA.
As secondary digital functions, port 1 c ontains the i nterrupt,
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 ROM versions (i.e. C505(C)(A)-2R/
C505A-4R/C505CA-4R).
, in the DC characteristics) because of the
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 3 I/O
external reload / trigger input
system clock output
counter 2 input
*) I = Input
O=Output
Data Sheet6 12.00
Table 2
Pin Definitions and Functions (cont’d)
C505/C505C/C505A/C505CA
SymbolPin NumberI/O
Function
*)
RESET4IRESET
A high level on this pin for two machine cycle while the
oscillator is running resets the device. An internal diffused
resistor to V
external capacitor to V
P3.0-P3.75, 7-13
I/OPort 3
is an 8-bit quasi-bidirecti onal port with internal pull-up
arrangement. Port 3 pins that have 1’s written to them are
pulled high by t he internal pull-up tr ansistors and in tha t
state can be used as inputs. As inputs, port 3 pins being
externally pulled low will source current (I
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:
clock output (synch.) of serial interface
External interrupt 0 input / timer 0 gate
control input
External interrupt 1 input / timer 1 gate
control input
WR control output; latches the data
byte from port 0 into the external data
memory
RD control output; enables the external
data memory
*) I = Input
O=Output
Data Sheet7 12.00
Table 2
Pin Definitions and Functions (cont’d)
C505/C505C/C505A/C505CA
SymbolPin NumberI/O
*)
P4.0
P4.1
XTAL214OXTAL2
XTAL115IXTAL1
6
28
I/O
I/O
Function
Port 4
is a 2-bit quasi-bidirectional por t with internal pull-up
arrangement. Port 4 pins that have 1’s written to them are
pulled high by t he internal pull-up tr ansistors and in tha t
state can be used as inputs. As inputs, port 4 pins being
externally pulled low will source current (I
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 functi on 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
Output of the inverting oscillator amplifier.
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 character istics must be
observed.
, in the DC
IL
*) I = Input
O=Output
Data Sheet8 12.00
Table 2
Pin Definitions and Functions (cont’d)
C505/C505C/C505A/C505CA
SymbolPin NumberI/O
*)
P2.0-P2.718-25I/OPort 2
PSEN
26OThe Program StoreEnable
Function
is a an 8-bit quasi-bidirectional I/O port with internal pullup
resistors. Port 2 pins that have 1’s written to them a re pulled
high by the internal pullup res istors, and in that st ate can be
used as inputs. As inputs, port 2 pins being e xternally pulled
low will source current (I
because of the internal pullup resistors. Port 2 emits the
high-order ad dress byte during fetches from ex ternal
program memor y 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 (M OVX @Ri), port 2 issues the
contents of the P2 special function register and uses only
the internal pullup resistors.
output is a control signal that enables the external program
memory to the bus during extern al fetch operations. It is
activated every three oscillator periods except during
external data m emory accesses. Remains high dur ing
internal prog ram execution. This pin should n ot be driven
during reset operation.
, in the DC characteristics)
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 exc ept 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
Data Sheet9 12.00
Table 2
Pin Definitions and Functions (cont’d)
C505/C505C/C505A/C505CA
SymbolPin NumberI/O
Function
*)
EA29IExternal Access Enable
When held at high level, instructions are fetched from th e
internal program memory when the PC is less than 4000
(C505(C)(A)-2R) or 8000
4E/C505CA-4E). When held at low level, the C505 fetches
all instructions from external program memory.
For the C505 romless versions (i.e. C505-L, C505C-L,
C505A-L and C505CA-L) this pin must be tied low.
For the ROM protection version EA
reset.
P0.0-P0.737-30I/OPort 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 in puts. Port 0 is also the multiplexe d
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 ROM versions. External pullup
resistors are required during program verification.
(C505A-4R/C505CA-4R/C505A-
H
pin is latched during
H
V
AREF
V
AGND
V
SS
V
DD
*) I = Input
O=Output
38–Reference voltage for the A/D converter.
39–Reference ground for the A/D converter.
16–Ground (0V)
17–Power Supply (+5V)
Data Sheet10 12.00
a
XTAL1
XTAL2
RESET
PSEN
V
DD
Vss
ALE
EA
Oscillator Watchdog
OSC & Timing
CPU
8 datapointers
Programmable
Watchdog Timer
XRAM
1)
256 Byte
or 1K Byte
RAM
256 Byte
C505/C505C/C505A/C505CA
ROM/
OTP
1)
16K or 32K
Byte
Port 0
Port 0
8-bit digit. I/O
V
V
AREF
AGND
Timer 0
Timer 1
Timer 2
USART
Baudrate generator
Full-CAN
Controller
Interrupt Unit
A/D Converter
8-/10-Bit
S&H
1)
MUX
Port 1
Port 1
8-bit digit. I/O /
8-bit analog In
Port 2
Port 3
Port 4
256 Byte
Reg./Dat
Port 2
8-bit digit. I/O
Port 3
8-bit digit. I/O
Port 4
2-bit digit. I/O
Emulation
Support
Logic
C505C/C505CA only.
1) Please refer to Table 1 for device specific configuration.
Figure 4
Block Diagram of the C505/C505C/C505A/C505CA
Data Sheet11 12.00
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 s et 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 (20MHz:
300 ns).
Special Function Register PSW (Address D0H) Reset Value : 00H
Bit No. MSBLSB
H
D7
CYACF0RS1RS0OVF1PD0
H
D6
H
D5
H
D4
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.
Data Sheet12 12.00
C505/C505C/C505A/C505CA
Memory Organization
The C505 CPU manipulates operands in the following four address spaces:
– On-chip program memory :16K byte ROM (C505(C)(A)-2R) or
32K byte ROM (C505A-4R/C505CA-4R) or
32K byte OTP (C505A-4E/C505CA-4E)
– Totally up to 64K byte 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
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
Indirect
H
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
Data Sheet13 12.00
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 resist or is internally connected to
an external capacitor only. An automatic reset can be obtained when
the RESET pin to
V
via a capacitor. Figure 6shows the possible reset circuitries.
DD
V
to allow a power-up reset with
SS
V
is applied by connecting
DD
a)
C505
V
DD
C505C
C505A
C505CA
b)
C505
C505C
C505A
C505CA
+
RESET
RESET
&
c)
V
DD
V
DD
C505
C505C
C505A
+
C505CA
RESET
Figure 6
Reset Circuitries
Data Sheet14 12.00
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 = 20pF ± 10pF for crystal operation
C= 20 pF± 10pF for crystal operation
C505C
C505A
C505CA
XTAL1
V
External
Clock
Signal
Figure 7
Recommended Oscillator Circuitries
DD
N.C.
XTAL2
C505
C505C
C505A
C505CA
XTAL1
Data Sheet15 12.00
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 in struction 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
Data Sheet16 12.00
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)
TM
The Enhanced Hooks Technology
together with an EH-IC to function similar to a bond-ou t chip. This simpli fies the design and redu ces
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.
, 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 Infineon
Technologies.
Data Sheet17 12.00
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 mapp ed spec ial func tion regi ster area. Fiv e spec ial
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 regi ster 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
CSWOCAN Controller switch-off bit
––
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 register
RMAP = 1 : The access to the mapped special function register area is enabled.
CSWO = 0 : CAN Controller is enabled (default after reset).
CSWO = 1 : CAN Controller is switched off.
EALERMAP CMOD
area is enabled.
CSWO
1)
XMAP1
XMAP0
SYSCON
B
B
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 regist ers are to be accessed,
the bit RMAP must be cleared/set respectively by software.
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 3 and Table 4. In Table 3 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 3. Table 4 illustrates the contents of the SFRs in numeric order of
their addresses. Table 5 list the CAN-SFRs in numeric order of their addresses.
Data Sheet18 12.00
C505/C505C/C505A/C505CA
Table 3
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)
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
4)
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
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
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 3
Special Function Registers - Functional Blocks (cont’d)
BlockSymbolNameAddressContents after
Reset
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 RM AP in SFR SYSCON must be set.
5) The notation “n“ (n= 1 to F) in the me ssage object address definition def ines 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
The C505 has four 8-bit I/O ports and one 2-bit I/O port. Port 0 is an open-drain bidirectional I/O
port, while ports 1 to 4 are quasi-bidirectional I/O ports with internal pullup resistors. That means,
when configured as inputs, ports 1 to 4 will be pulled high and will source current when externally
pulled low. Port 0 will float when configured as input.
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 h igh byte of t he external m emory
address when the address is 16 bits wide. Otherwise, the port 2 pins continue emitting the P2 SFR
contents. In this function, port 0 is not an open-drain port, but uses a strong internal pullup FET .
Port 4 is 2-bit I/O port with CAN controller specific alternate functions. The eight analog input lines
are realized as mixed digital/analog inputs. The 8 analog inputs, AN0-AN7, are located at the port
1 pins P1.0 to P1.7. After reset, all analog inputs are disabled and the related pins of port 1 are
configured as digital inputs. The analog function of a specific port 1 pin is enabled by bits in the SFR
P1ANA. Writing a 0 to a bit position of P1ANA assigns the corresponding pin to operate as analog
input.
Note : P1ANA is a mapped SFR and can be only accessed if bit RMAP in SFR SYSCON is set.
Data Sheet27 12.00
C505/C505C/C505A/C505CA
Timer / Counter 0 and 1
Timer/Counter 0 and 1 can be used in four operating modes as listed in Table 6 :
Table 6
Timer/Counter 0 and 1 Operating Modes
ModeDescriptionTMODInput Clock
M1M0internalexternal (max)
f
08-bit timer/counter with a
00
divide-by-32 prescaler
116-bit timer/counter01
/6x32f
OSC
OSC
/12x32
28-bit timer/counter with
10
8-bit autoreload
3Timer/counter 0 used as one
11
/6f
OSC
OSC
/12
f
8-bit timer/counter and one
8-bit timer
Timer 1 stops
In the “timer” function (C/T
count rate is
f
OSC
/6.
= ‘0’) the register is incremented every machine cycle. Therefore the
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
/12. External inputs INT0 and INT1 (P3.2, P3.3) can be
OSC
programmed to function as a gate to facilitate pulse width measurem ents. Figure 10 illustrates the
input clock logic.
P3.4/T0
P3.5/T1
OSC
÷
6
C/T = 0
C/T = 1
Control
f
/6
OSC
Timer 0/1
Input Clock
Gate
(TMOD)
P3.2/INT0
P3.3/INT1
=1
TR0
TR1
_
<
1
&
MCS03117
Figure 10
Timer/Counter 0 and 1 Input Clock Logic
Data Sheet28 12.00
C505/C505C/C505A/C505CA
Timer/Counter 2 with Compare/Capture/Reload
The timer 2 of the C505 provides additional compare/capture/reload features. which allow the
selection of the following operating modes:
– Compare: up to 4 PWM signals with 16-bit/300 ns resolution (@ 20 MHz clock)
– Capture: up to 4 high speed capture inputs with 300 ns resolution
– Reload: modulation of timer 2 cycle time
The block diagram in Figure 11 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.
P1.5/
T2EX
P1.7/
T2
OSC
Sync.
T2I0
T2I1
Sync.
&
÷6
f
OSC
÷12
T2PS
Bit1616 Bit16 Bit16 Bit
Comparator
Comparator
Comparator
EXEN2
Reload
EXF2
Reload
Timer 2
TH2TL2
Compare
Comparator
Capture
_
<
1
TF2
Input/
Output
Control
Interrupt
Request
P1.0/
INT3/
CC0
P1.1/
INT4/
CC1
P1.2/
INT5/
CC2
P1.2/
INT6/
CCL3/CCH3
CCL2/CCH2
CCL1/CCH1
CRCL/CRCH
CC3
MCB02730
Figure 11
Timer 2 Block Diagram
Data Sheet29 12.00
C505/C505C/C505A/C505CA
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 a ll 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 :
offers the possibility of selecting a count rate of 1/6 or 1/12 of the oscillator frequency.
Gated Timer Mode :
the input of timer 2. lf T2 is high, the internal clock input is gated to the timer. T2 = 0 stops the
counting procedure. This facilitates pu lse width measurements. The external gate signal is sampled
once every machine cycle.
Event Counter Mode :
to-0 transition at its corresponding ex ternal input pin T2 (P1.7). In this func tion, the ex ternal input is
sampled every machine cycle. Since it tak es two machine cycles (12 oscillator periods) to recogn ize
a 1-to-0 transition, the maximum count rate is 1/6 of the oscillator frequency. There are no
restrictions on the duty cycle of the exte rnal input signal, but to en sure that a given level i s sampled
at least once before it changes, it must be held for at least one full machine cycle.
Reload of Timer 2 :
In mode 0, when timer 2 rolls over fro m 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 i n SFR IEN1 has been
set.
In timer function, the count rate is derived from the oscillator frequency. A prescaler
In gated timer function, the external input pin T2 (P1.7) functions as a gate to
In the event counter function. the timer 2 is incremented in response to a 1-
Two reload modes are selectable:
Data Sheet30 12.00
C505/C505C/C505A/C505CA
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 registe r is com pared with the c ontents of t he tim er regi ster; i f the
count value in the timer reg ister matches the stored value, an appropriate out put 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 12 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.
Compare Register
Circuit
Compare Reg.
16 Bit
Comparator
Bit16
Timer Register
Timer Circuit
Compare
Match
Timer
Overflow
Figure 12
Port Latch in Compare Mode 0
Port Circuit
Internal
Bus
Write to
Latch
S
D
CLK
R
Port
Latch
Read Latch
Q
Q
Read Pin
V
DD
Port
Pin
MCS02661
Data Sheet31 12.00
C505/C505C/C505A/C505CA
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 13) the port cir cuit consists of two separat e 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.
Port Circuit
Compare Register
Circuit
Compare Reg.
Internal
16 Bit
Comparator
16 Bit
Timer Register
Timer Circuit
Compare
Match
Bus
Write to
Latch
Figure 13
Compare Function in Compare Mode 1
Timer 2 Capture Modes
D
Shadow
Latch
CLK
Read Latch
Q
D
Port
Latch
Read Pin
Q
QCLK
V
DD
Port
Pin
MCS02662
Each of the compare/capture registers CC1 to CC3 and the CRC register can be used to latch the
current 16-bit value of the timer 2 registers TL 2 and TH2. Two different m odes are provi ded for this
function.
In mode 0
, the external event causing a capture is :
– for CC registers 1 to 3: a positive transition at pins CC1 to CC3 of port 1
– for the CRC register:a positive or negative transition at the corresponding pin, depending
on the status of the bit I3FR in SFR T2CON.
In mode 1
a capture occurs in response to a write instruction to the low order byte of a capture
register. The write-to-register signal (e.g. write-to-CRCL) is used to initiate a capture. The timer 2
contents will be latched into the appropriate capture register in the cycle following the write
instruction. In this mode no interrupt request will be generated.
Data Sheet32 12.00
C505/C505C/C505A/C505CA
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 7.
Table 7
USART Operating Modes
Mode
000Shift register mode, fixed baud rate
1018-bit UART, variable baud rate
2109-bit UART, fixed baud rate
3119-bit UART, variable baud rate
For clarification some terms regarding the difference between "baud rate clock" and "baud rate"
should be mentioned. In the asynchronous modes
16 times the baud rate for internal synchronization. Therefore, the baud rate generators/timers have
to provide a "baud rate clock" (output si gnal in Figure 14 to the serial interface which - there divided
by 16 - results in the actual "baud rate". Further, the abbrevation f
frequency (crystal or external clock operation).
The variable baud rates for modes 1 and 3 of the serial interfac e can be derive d either from timer 1
or from a decdicated baud rate generator (see Figure 14).
SCONDescription
SM0SM1
Serial data enters and exits through R×D; T×D outputs th e shift
clock; 8-bit are transmitted/received (LSB first)
10 bits are transmitted (through T×D) or received (at R×D)
11 bits are transmitted (through T×D) or received (at R×D)
Like mode 2
the serial interfaces require a clock rate which is
refers to the oscillator
OSC
Data Sheet33 12.00
Timer 1
Overflow
f
OSC
Baud
Rate
Generator
(SRELH
SRELL)
6÷÷
ADCON0.7
(BD)
0
1
Mode 2
Mode 0
Mode 1
Mode 3
C505/C505C/C505A/C505CA
SCON.7
SCON.6
(SM0/
SM1)
Only one mode
can be selected
PCON.7
2
(SMOD)
0
1
Baud
Rate
Clock
Note: The switch configuration shows the reset state.
MCS02733
Figure 14
Block Diagram of Baud Rate Generation for the Serial Interface
Table 8 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 8
Serial Interface - Baud Rate Dependencies
Serial Interface
Operating Modes
Mode 0 (Shift Register)––
Mode 1 (8-bit UART)
Mode 3 (9-bit UART)
Active Control Bits Baud Rate Calculation
BDSMOD
f
/ 6
OSC
0XControlled by timer 1 overflow :
SMOD
(2
× timer 1 overflow rate) / 32
1XControlled by baud rate generator
SMOD
× f
(2
OSC
) /
(32 × baud rate generator overflow rate)
Mode 2 (9-bit UART)–0
1
f
f
OSC
OSC
/ 32
/ 16
Data Sheet34 12.00
C505/C505C/C505A/C505CA
CAN Controller (C505C and C505CA only)
The on-chip CAN controller, compliant to version 2.0B, 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 controll ing many different m essage 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
C505C/C505CA.
The internal bus interface connects the on-chip CAN controller to the internal bus of the
microcontroller. The registers and data loc ations of the CAN interface are mapped to a specific 256
byte wide address range of the external data memory area (F700H to F7FFH) and can be accessed
using MOVX instructions. Figure 15 shows a block diagram of the on-chip CAN controller.
The TX/RXShift Register holds the destuffed bit stream from the bus line to allow the parallel
access to the whole data or remo te frame for the acc eptance mat ch test and the para llel trans fer 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 a nd the Intelligent Me mory such that the
processes of reception, arbitration, transmission, and error signalling are performed according to
the CAN protocol. Note that the automatic retransmission of mes sages which have been c orrupted
by noise or other external error conditions on the bus line is handled by the BSP.
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 n ot transmit a dominant bi t (resynchroni zation). 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 microcontroller actions.
Data Sheet35 12.00
C505/C505C/C505A/C505CA
TXDCRXDC
Messages
Handlers
BTL-Configuration
TX/RX Shift Register
Intelligent
Memory
Interrupt
Register
CRC
Gen./Check
Messages
Bit
Timing
Logic
Timing
Generator
Clocks
(to all)
Control
Status +
Control
Status
Register
to internal Bus
Figure 15
CAN Controller Block Diagram
Bit
Stream
Processor
Error
Management
Logic
MCB02736
Data Sheet36 12.00
C505/C505C/C505A/C505CA
CAN Controller Software Initialization
The very first step of the initialization is the CAN controller input clock selection. A divide-by-2
prescaler is enabled by default after res et (Figure 16). Setting bit CMOD (SYSCON.3) disables the
prescaler. The purpose of the prescaler selection is:
– to ensure that the CAN controller is operable when f
– to achieve the maximum CAN baudrate of 1 Mbaud when f
SYSCON.3
(CMOD)
f
OSC
2
1
0
f
CAN
is over 10 MHz (bit CMOD =0)
osc
is 8 MHz (bit CMOD=1)
osc
Full-CAN
Module
Condition: CMOD = 0, when > 10 MHz
f
OSC
Frequency (MHz)CMOD
f
OSC
f
CAN
8 81000000
8 40000000
16 80000000
Note : The switch configuration s hows the reset state of bit CMOD.
Figure 16
CAN controller Input Clock Selection
(SYSCON.3)
BRP
(BTR0.0-5)
B
B
B
MCS03296
CAN
baudrate
(Mbaud/sec)
1
0.5
1
Data Sheet37 12.00
C505/C505C/C505A/C505CA
8-Bit A/D Converter (C505 and C505C only)
The C505/C505C includes a high performance / high speed 8-bit A/D conv erter (ADC) with 8 analog
input channels. It operates with a successive approximation technique and provides the following
features:
– 8 multiplexed input channels (port 1), which can also be used as digital outputs/inputs
– 8-bit resolution
– Internal start-of-conversion trigger
– Interrupt request generation after each conversion
– Single or continuous conversion mode
The 8-bit ADC uses two clock signals for operation : the conversion clock f
input clock f
(1/tIN). f
IN
is derived from the C505 system cloc k f
ADC
which is applied at the XTAL
OSC
ADC
(=1/t
pins via the ADC clock presca ler as shown in Figure 17. The input clock is equal to f
conversion clock f
is limited to a maximum frequency of 1.25 MHz. Therefore, the ADC clock
ADC
ADC
) and the
. The
OSC
prescaler must be programmed to a value which assures that the c onversion clock does not exceed
1.25 MHz. The prescaler ratio is selected by the bits ADCL1 and ADCL0 of SFR ADCON1.
Shaded Bit locations are not used in ADC-functions.
Write to ADST
MCB03298
Figure 18
Block Diagram of the 8-Bit A/D Converter
Data Sheet39 12.00
C505/C505C/C505A/C505CA
10-Bit A/D Converter (C505A and C505CA only)
The C505A/C505CA 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 1), which can also be used as digital inputs/outputs
– 10-bit resolution
– Single or continuous conversion mode
– Internal 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 10-bit ADC uses two clock signals for op eration : the c onve rsion cloc k f
input clock f
(=1/tIN). f
IN
XTAL pins. The input clock f
is derived from the C505 system clock f
ADC
is equal to f
IN
The conversion f
OSC
OSC
clock is limited to a maximum
ADC
(=1/t
ADC
which is applied at the
ADC
) and the
frequency of 2 MHz. Therefore, the ADC clock prescaler must be pr ogrammed to a value which
assures that the conversion clock does not exceed 2 MHz. The prescaler ratio is selected by the
bits ADCL1 and ADCL0 of SFR ADCON1.
Shaded Bit locations are not used in ADC-functions.
Write to ADDATL
MCB03636
Figure 20
Block Diagram of the 10-Bit A/D Converter
Data Sheet41 12.00
C505/C505C/C505A/C505CA
Interrupt System
The C505 provides 12 interrupt vectors with four priority levels. Five interrupt requests can be
generated by the on-chip peripherals (timer 0, timer 1, timer 2, serial interface, A/D converter). One
interrupt can be generated by the CAN controller (C505C an d C505CA only) or by a software setting
and in this case the interrupt vector is the same. Six interrupts may be triggered externally (P3.2/
INT0
CC3). Additionally, the P1.5/AN5/T2EX can trigger an interrupt. The wake-up from power-down
mode interrupt has a special functi onali ty whic h a llows to exit from the software power-down mode
by a short low pulse at either pin P3.2/INT0
Figure 21 to Figure 23 give a general overview of the interrupt sources and illustrate the request
and the control flags which are described in the next secti ons. Table 9 lists all interrupt sources with
their request flags and interrupt vector addresses.
IE0
TF0
IE1
TF1
RI / TI
TF2 / EXF2
IADC
– / SWI
IEX3
IEX4
IEX5
IEX6
–
Data Sheet42 12.00
P3.2 /
INT0
A / D Converter
Timer 0
Overflow
Status
Error
IT0
TCON.0
SWI
IRCON.1
SIE
CR.2
EIE
>1
IE0
TCON.1
IADC
IRCON.0
TF0
TCON.5
>1
IE
CR.1CR.3
EX0
IEN0.0
EADC
IEN1.0
ET0
IEN0.1
ECAN
ECAN
IEN1.1
0003
0043
000B
004B
C505/C505C/C505A/C505CA
Highest
Priority Level
H
Lowest
Priority Level
H
IP1.0IP0.0
H
H
P
o
l
l
i
n
g
S
e
q
u
e
n
c
e
Message
Transmit
TXIE
MCR0.5 / 4
CAN Controller Interrupt Sources
Message
>1
INTPND
MCR0.0 / 1
Receive
RXIE
MCR0.3 / 2
EA
IEN0.7
IP1.1
IP0.1
Bit addressable
Request flag is cleared by hardware
C505C and C505CA Only
MCB03303
Figure 21
Interrupt Structure, Overview Part 1
Note: Each of the 15 CAN controller message objects (C505C and C505CA only), shown in the
shaded area of Figure 21 provides the bits/flags.
Data Sheet43 12.00
P3.3 /
INT1
P1.0 /
AN0 /
INT3 /
CC0
IT1
TCON.2
I3FR
T2CON.6
IE1
TCON.3
IEX3
IRCON.2
EX1
IEN0.2
EX3
IEN1.2
0013
0053
C505/C505C/C505A/C505CA
Highest
Priority Level
H
Lowest
Priority Level
P
H
IP1.2
IP0.2
o
l
l
i
n
g
Timer 1
Overflow
TF1
TCON.7
P1.1 /
AN1 /
INT4 /
CC1
IEX4
IRCON.3
Bit addressable
Request flag is cleared by hardware
Figure 22
Interrupt Structure, Overview Part 2
ET1
IEN0.3
EX4
IEN1.3
001B
H
005B
H
EA
IEN0.7
S
e
q
u
e
n
c
e
IP0.3IP1.3
MCB03304
Data Sheet44 12.00
USART
P1.2 /
AN2 /
INT5 /
CC2
Timer 2
Overflow
P1.5 /
AN5 /
T2EX
P1.3 /
INT6 /
CC3
RI
SCON.0
TI
SCON.1
EXEN2
IEN1.7
Bit addressable
IRCON.4
TF2
IRCON.6
EXF2
IRCON.7
IRCON.5
>1
IEX5
>1
IEX6
ES
IEN0.4
EX5
IEN1.4
ET2
IEN0.5
EX6
IEN1.5
0023
H
0063
H
002B
H
006B
H
EA
IEN0.7
C505/C505C/C505A/C505CA
Highest
Priority Level
Lowest
Priority Level
P
o
l
IP1.4
IP0.4
IP0.5IP1.5
l
i
n
g
S
e
q
u
e
n
c
e
Request flag is cleared by hardware
Figure 23
Interrupt Structure, Overview Part 3
MCB03305
Data Sheet45 12.00
C505/C505C/C505A/C505CA
Fail Save Mechanisms
The C505 offers enhanced fail s afe mechanisms , which all ow an automati c recovery from soft ware
upset or hardware failure :
– a programmable watchdog timer (WDT), with variable time-out period from 192 µs up to
approx. 393.2 ms at 16 MHz (314.5 ms at 20 MHz).
– an oscillator watchdog (OWD) which monitors the on-chip oscillator and forces the
microcontroller into reset state in case the on-chip oscill ator fails; it also provides the clock for
a fast internal reset after power-on.
The watchdog timer in the C505 is a 15-bit timer, which is incremented by a count rate of
upto
f
/192. The system clock of the C505 is divided by two prescalers, a divide-by-two and a
OSC
f
OSC
/12
divide-by-16 prescaler. For programmi ng of the watchdog timer o verflow rate, the upper 7 bits of the
watchdog timer can be written. Figure 24 shows the block diagram of the watchdog timer unit.
07
f
/ 6
OSC
2
16
14
WDTL
8
WDT Reset - Request
WDTH
IP0 (A9 )
H
OWDS
WDTS
WDTPSEL
External HW Reset
670
WDTREL (86 )
H
Control Logic
WDT
SWDT
IEN0 (A8 )
IEN1 (B8 )
H
H
MCB03306
Figure 24
Block Diagram of the Programmable Watchdog Timer
The watchdog timer can be started by software (bit SWDT in SFR IEN1) but it cannot be stopped
during active mo de of the device. I f the software fails t o refresh the runni ng watchdog timer a n
internal reset will be initiated on watchdog timer overflow. For refreshing of the watchdog timer the
content of the SFR WDTREL is transfered to the upper 7-bit of the watchdog timer. The refresh
sequence consists of two consequtive 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 b e noted, however, tha t the watchdog time r is halted during the idle mode and
power down mode of the processor.
Data Sheet46 12.00
C505/C505C/C505A/C505CA
Oscillator Watchdog
The oscillator watchdog unit serves for three 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 onchip oscillator has a higher frequency than the RC oscillator), the part, in order to allow the
oscillator to stabilize, executes a final reset phase of typ. 1 ms; then the oscillator watchdog
reset is released and the part starts program execution from address 0000H again.
– Fast internal reset after power-on
The oscillator watchdog unit provides a clock s upply for the reset before the on -chip oscillator
has started. The oscillator watchdog unit also works identically to the monitoring function.
– Control of external wake-up from software power-down mode
When the power-down mode is left by a low level at the P3.2/INT0
the oscillator watchdog unit assures that the microco ntrolle r resumes operatio n (exec ution 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 microcontr oller starts program execution by process ing a power down
interrupt after a final delay of typ. 1 ms in order to allow the on-chip oscillator to stabilize.
pin or the P4.1/RXDC pin,
Data Sheet47 12.00
C505/C505C/C505A/C505CA
EWPD
P4.1 / RXDC
P3.2 / INT0
XTAL1
XTAL2
Control
Logic
RC
Oscillator
On-Chip
Oscillator
WS
(PCON1.4)(PCON1.7)
Start /
Stop
f
RC
3 MHz
Start /
Stop
Power - Down
Mode Activated
f
10
1
f
2
OWDS
Frequency
Comparator
Power-Down Mode
Wake - Up Interrupt
Control
Logic
<
f
f
2
1
Delay
Internal Reset
>1
IP0 (A9 )
H
Int. Clock
MCB03308
Figure 25
Functional Block Diagram of the Oscillator Watchdog
Data Sheet48 12.00
C505/C505C/C505A/C505CA
Power Saving Modes
The C505 provides two basic power saving modes, the idle mode and the power down mode.
Additionally, a slow down mode is available. This power saving mod e reduces the internal clock rate
in normal operating mode and it can be also used for further power reduction in idle mode.
– Idle mode
In the idle mode the main oscillator of the C505 continues to run, but the CPU is gated off from
the clock signal. All peripheral units are further provided with the clock. The CPU status is
preserved in its entirety. The idle mode can be terminate d by any enabled interrupt of a
peripheral unit or by a hardware reset.
– Power down mode
The operation of the C505 is completely stopped a nd the oscill ator is turned off. Th is mode is
used to save the contents of the internal RAM with a very low standby current. Power down
mode is entered by software and can be left by reset or by a short low pulse at pin P3.2/
.or P4.1/RXDC.
INT0
– Slow down mode
The controller keeps up the fu ll operating functionality, but its n ormal clock frequency is
internally divided by 32. T his slows down all parts of the controller, the CP U and all
peripherals, to 1/32-th of their norma l operating frequency. Slo wing down the frequen cy
significantly reduces power consumption.
V
In the power down mode of operation,
V
be ensured, however, that
is not reduced before the power down mode is invoked, and that V
DD
can be reduced to minimize power consumpti on. It must
DD
DD
is restored to its normal operating level, before the power down mode is terminat ed. Table 10 gives
a general overview of the entry and exit procedures of the power saving modes.
Table 10
Power Saving Modes Overview
ModeEntering
Leaving byRemarks
(Instruction
Example)
Idle ModeORL PCON, #01H
ORL PCON, #20H
Ocurrence of an
interrupt from a
peripheral unit
Hardware Reset
CPU clock is stopped;
CPU maintains their data;
peripheral units are active (if
enabled) and provided with
clock
Power Down ModeORL PCON, #02H
ORL PCON, #40H
Hardware ResetOscillator is stopped;
Short low pulse at
pin P3.2/INT0
or
contents of on-chip RAM and
SFR’s are maintained;
P4.1/RXDC
Slow Down ModeORL PCON,#10HANL PCON,#0EFH
or
Hardware Reset
Oscillator frequency is
reduced to 1/32 of its nominal
frequency
Data Sheet49 12.00
C505/C505C/C505A/C505CA
OTP Memory Operation (C505A-4E and C505CA-4E only)
The C505A-4E/C505CA-4E contains a 32K byte one-time programmable (OTP) program me mory.
With the C505A-4E/C505CA-4E fast programming cycles are achieved (1 byte in 100
several levels of OTP memory protection can be selected.
For programming of the device, the C505A-4E/C505CA-4E 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 C505A-4E/C505CA-4E operates as a slave device similar as an EPROM
standalone memory device and mus t be controlled wi th address/data informatio n, control lines, and
an external 11.5V programming voltage. Figure 26 shows the pins of the C505A-4E/C505CA-4E
which are required for controlling of the OTP programming mode.
µsec). Also
A0-A7 /
A8-A14
PALE
PMSEL0
PMSEL1
XTAL1
XTAL2
Figure 26
Programming Mode Configuration
V
DD
Port 2
C505A-4E
C505CA-4E
V
SS
Port 0
D0-D7
EA
/V
PP
PROG
PRD
RESET
PSEN
PSEL
Data Sheet50 12.00
Pin Configuration in Programming Mode
D4D5D6D7EA
32 31 30 29 28 27 26 25 24 23
33
D3
D2
D1
D0
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
N.C.
34
35
36
37
38
39
40
41
42
43
44
123456789 10 11
C505A-4E
C505CA-4E
/ V
PP
N.C.
PROG
PSEN
C505/C505C/C505A/C505CA
A5 / A13
A6 / A14
A7
22
21
20
19
18
17
16
15
14
13
12
A4 / A12
A3 / A11
A2 / A10
A1 / A9
A0 / A8
V
DD
V
SS
XTAL1
XTAL2
N.C.
N.C.
N.C.
N.C.
N.C.
RESET
PMSEL0
N.C.
PSEL
PMSEL1
N.C.
PRD
PALE
Figure 27
P-MQFP-44 Pin Configuration of the C505A-4E/C505CA-4E in Programming Mode (Top View)
Data Sheet51 12.00
C505/C505C/C505A/C505CA
The following Table 11 contains the functional description of all C505A-4E/C505CA-4E pins which
are required for OTP memory programming.
Table 11
Pin Definitions and Functions in Programming Mode
Symbol
Pin Number
I/O*)Function
RESET4IReset
This input must be at static “1“ (active) level during the whole
programming mode.
PMSEL0
PMSEL157
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.
This input is used for the basic programming mode selection
and must be switched according Figure 28.
PRD
9IProgramming mode read strobe
This input is used for read access c ontrol for OTP memory read,
Version Register read, and lock bit read operations.
PALE10IProgramming address latch enable
PALE is used to latch the high a ddress lines. The high address
lines must satisfy a setup a nd hold time to/from the falling edge
of PALE. PALE must be at low level when the logic level of
PMSEL1,0 is changed.
XTAL214OXTAL2
Output of the inverting oscillator amplifier.
XTAL115IXTAL1
Input to the oscillator amplifier.
V
SS
16–Circuit ground potential
must be applied in programming mode.
V
DD
17–Power supply terminal
must be applied in programming mode.
*) I = Input
O=Output
Data Sheet52 12.00
C505/C505C/C505A/C505CA
Table 11
Pin Definitions and Functions in Programming Mode (cont’d)
Symbol
Pin Number
I/O*)Function
P2.0-718-25IAddress lines
P2.0-7 are used as multiplexed address input lines A0-A7 and
A8-A14. A8-A14 must be latched with PALE.
PSEN
26IProgram store enable
This input must be at static “0“ level during the whole
programming mode.
PROG
27IProgramming 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 lo w level must be appli ed
.
EA
/V
PP
to PROG
29–External Access / Programming voltage
This pin must be at 11.5V (V
programming of an OTP memory byte or lock bit. During an
OTP memory read operation this pin must be at V
This pin is also used for basic programming mode selectio n. At
basic programming mode selection a lo w level must be appli ed
/VPP.
to EA
) voltage level during
PP
high level.
IH
D7-030-37I/OData lines 0-7
During programming mode, data bytes are transferred via the
bidirectional port 0 data lines.
N.C.1-3, 6, 11-13,
28, 38-44
–Not Connected
These pins should not be connected in programming mode.
*) I = Input
O=Output
Data Sheet53 12.00
C505/C505C/C505A/C505CA
Basic Programming Mode Selection
The basic programming mode selection scheme is shown in Figure 2 8 .
V
DD
Clock
(XTAL1/XTAL2)
RESET
PSEN
PMSEL1,0
PROG
PRD
PSEL
PALE
5V
stable
“1“
“0“
0,1
“0“
“1“
“0“
EA/V
PP
During this period signals
are not actively driven
Figure 28
Basic Programming Mode Selection
0V
V
PP
V
IH
Ready for access
mode selection
Data Sheet54 12.00
Table 12
Access Modes Selection
C505/C505C/C505A/C505CA
Access Mode
V
Program OTP memory byteV
Read OTP memory byteV
Program OTP lock bitsV
Read OTP lock bitsV
Read OTP version byteV
EA
/
PROGPRD
PP
PP
IH
PP
IH
IH
H
H
HLHByte addr.
HH HA0-7
HH L–D1,D0 see
PMSELAddress
10
(Port 2)
A8-14
Data
(Port 0)
D0-7
Table 13
D0-7
of sign. byte
Lock Bits Programming / Read
The C505A-4E/C505CA-4E has two programmable lock bits which, when programmed according
to Table 13, provide four levels of protection for the on-chip OTP code memory. The state of the
lock bits can also be read.
Table 13
Lock Bit Protection Types
Lock Bits at D1,D0Protection
D1D0
Level
Protection Type
11Level 0The OTP lock feature is disabled. During normal operation of
the C505A-4E/C505CA-4E, the state of the EA
pin is not
latched on reset.
10Level 1During normal operation of the C505A-4E/C505CA-4E, MOVC
instructions executed from external program memory are
disabled from fetching code bytes from internal me mory. EA
is
sampled and latched on reset. An OTP memory read ope ration
is only possible using the ROM/OTP verification mode 2 for
protection level 1. Further programming of the OTP memory is
disabled (reprogramming security).
01Level 2Same as level 1, but also OTP memory read operation using
OTP verification mode is disabled.
00Level 3Same as level 2; but additionally external code execution by
setting EA
=low during normal operation of the C505A-4E/
C505CA-4E 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.
Data Sheet55 12.00
C505/C505C/C505A/C505CA
Absolute Maximum Ratings
ParameterSymbolLimit ValuesUnit Notes
min.max.
Storage temperature
Voltage on V
to ground (
pins with respect
DD
V
)
SS
Voltage on any pin with respect
to ground (
V
)
SS
Input current on any pin during
T
ST
V
DD
V
IN
– 65150° C–
– 0.56.5V–
– 0.5VDD + 0.5V–
– 1010mA–
overload condition
Absolute sum of all input currents
| 100 mA |mA–
during overload condition
Power dissipation
P
DISS
1W–
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
> VDD or VIN< VSS) the voltage on VDD pins with respect to ground (VSS) must not
(V
IN
exceed the values defined by the absolute maximum ratings.
Data Sheet56 12.00
C505/C505C/C505A/C505CA
Operating Conditions
ParameterSymbol Limit ValuesUnitNotes
min.max.
Supply voltageV
DD
4.255.5VActive mode,
f
osc max
= 20 MHz
25.5VPowerDown mode
Ground voltageV
Ambient temperature
SAB-C505 T
SAF-C505 T
SAH-C505 T
SAK-C505 T
Analog reference
V
SS
A
A
A
A
AREF
0VReference voltage
°C–
070
-4085
-40110
-40125
4V
+ 0.1V–
DD
voltage
Analog ground voltage
Analog input voltage
XTAL clockf
V
V
osc
AGND
AIN
V
– 0.1V
SS
V
-0.2V
AGND
+ 0.2V–
SS
+0.2V–
AREF
220
MHz
1)
(with 50% duty
cycle)
1) For the extended temperature range -40 °C to 110 °C (SAH) and -40 °C to 125 °C (SAK), the
devices C505-2R, C505-L, C505C-2R and C505C-L have the max. operating frequency of
16MHz with 50% clock duty cycle.
Parameter Interpretation
The parameters listed in the following partly represent the characteristi cs of the C505 and partly its
demands on the system. To aid in interpreting the parameters right, when evaluating them for a
design, they are marked in column “Symbol”:
CC (Controller Characteristics):
The logic of the C505 will provide signals with the respective characteristics.
SR (System Requirement):
The external system must provide signals with the respective characteristics to the C505.
Data Sheet57 12.00
C505/C505C/C505A/C505CA
DC Characteristics
(Operating Conditions apply)
ParameterSymbolLimit ValuesUnitTest Condition
min.max.
Input low voltages
all except EA
pin
EA
RESET pin
Input high voltages
all except XTAL1, RESET
XTAL1 pin
RESET pin
1) Capacitive loading on ports 0 and 2 may c ause spurious noise puls es t o be superimposed on th e VOL 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 t ransitions during b us opera tion. In the wo rst case (c apacitiv e loading > 100 pF), the noise
pulse on ALE line may exceed 0.8 V. In such cases it may be desira ble to qualify ALE with a schmitt-trigge r,
or use an address latch with a schm it t- trig ger strobe input.
2) Capacitive loading on ports 0 and 2 may cause the
V
0.9
specification when the address lines are stabilizing.
DD
V
on ALE and PSEN to mom entarily fall below the
OH
3) Overload conditions under operating conditions occur if the voltage on the respective pin exceeds the specified
operating range (i.e.
pins may not exceed 50 mA. T he s upply voltage
V
> VDD+0.5V or VOV< VSS- 0.5 V). The absolute sum of input currents on all po rt
OV
V
and VSS must remain within the specified limits.
DD
4) Not 100% tested, gua rant eed by design characterizatio n.
5) Only valid for C505A-4E and C505CA-4E.
6) Only valid for C505A-4E and C505CA-4E in programming mode.
7)
I
(active mode) is measured with:
DD
XTAL1 driven with
=Port 0=RESET=VDD; all other pins are disconnected.
EA
8)
I
(idle mode) is measured with all output pins disconnected and with all peripherals disabled;
(power-down mode) is meas ured under following conditions :
PD
Port 0 = E
A = VDD; RESET =VSS; XTAL2 = N.C.; XTAL1 = VSS; V
AGND
= VSS; V
AREF
= VDD;
all other pins are disconnected.
12) The typi c al
13) The max im um
I
values are periodically measured at T
DD
I
values are measured under worst case conditions (T
DD
= +25 °C but not 100% tested.
A
= 0 °C or -40 °C an d V
A
=5.5V)
DD
14) The values are valid for C505C A-4R, C505CA-2R, C505CA-L, C5 05A-4R, C505A-2R and C505A -L only.
Data Sheet60 12.00
C505/C505C/C505A/C505CA
I
DD
[mA]
40
35
30
25
20
15
e
d
o
M
e
v
i
t
c
A
c
A
e
d
o
M
e
v
i
t
ode
e M
l
Id
d
I
e
d
o
M
e
l
C505
C505C
I
DD
max
I
DD
typ
10
ive
t
c
A
5
12842016
+S
e
d
o
M
e
d
o
M
e
l
d
I
wn
o
d
-
w
lo
n
w
o
d
-
w
o
l
S
+
Figure 29
I
Diagram of C505 and C505C
DD
C505/C505C : Power Supply Current Calculation Formulas
ParameterSymbolFormula
Active mode
Idle mode
Active mode with
slow-down enabled
Idle mode with
slow-down enabled
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
1.5 * ff
1.5
*
0.74 * ff
1.0
*
0.11 * f
0.25
*
0.1 * f
0.25
*
OSC
OSC
OSC
f
OSC
f
+ 1.3
+ 9.0
OSC
+ 1.0
OSC
OSC
+ 2.0
OSC
+ 1.4
+ 2.6
+ 2.5
+ 2.0
f
OSC
[MHz]
Note:
f
is the oscillator frequency in MHz. IDD values are given in mA.
osc
Data Sheet61 12.00
C505/C505C/C505A/C505CA
I
DD
[mA]
40
35
30
25
20
15
10
5
C505A-4E
C505CA-4E
e
d
o
M
e
v
i
t
c
A
d
I
e
v
i
t
c
A
12842016
e
d
o
M
e
l
n
w
o
d
-
w
o
l
S
+
e
d
o
M
n
w
do
-
ow
l
S
e+
od
M
e
l
d
I
f
OSC
[MHz]
I
DD
max
I
DD
typ
Figure 30
Diagram of C505A-4E and C505CA-4E
I
DD
C505A-4E/C505CA-4E : Power Supply Current Calculation Formulas
ParameterSymbolFormula
Active mode
Idle mode
Active mode with
slow-down enabled
Idle mode with
slow-down enabled
f
Note:
is the oscillator frequency in MHz. IDD values are given in mA.
osc
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
1.63 * f
1.74
*
0.69 * f
0.74
*
0.6 * ff
0.7
*
0.3 * ff
0.3
*
f
f
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
+ 0.3
+ 1.6
+ 0.3
+ 0.8
+ 2.6
+ 2.8
+ 3.9
+ 4.1
Data Sheet62 12.00
C505/C505C/C505A/C505CA
I
DD
[mA]
40
35
30
25
20
15
10
5
C505A-4R
C505A-2R
C505A-L
C505CA-4R
C505CA-2R
C505CA-L
I
DD
max
e
d
o
M
e
v
i
t
c
A
A
e
l
I
d
12842016
d
I
d
o
M
e
v
i
t
c
S
+
e
d
o
M
e
d
o
M
e
l
n
w
o
d
-
w
o
l
S
+
e
n
w
o
d
-
w
o
l
f
OSC
[MHz]
I
DD
typ
Figure 31
Diagram of C505A-4R/C505A-2R/C505A-L/C505CA-4R/C505CA-2R/C505CA-L
I
DD
C505A-4R/C505A-2R/C505A-L/C505CA-4R/C505CA-2R/C505CA-L :
Power Supply Current Calculation Formulas
ParameterSymbolFormula
Active mode
Idle mode
Active mode with
slow-down enabled
Idle mode with
slow-down enabled
f
Note:
is the oscillator frequency in MHz. IDD values are given in mA.
osc
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
I
DD typ
I
DD max
1.19 * f
1.54
*
0.57 * f
0.75
*
0.18 * f
0.28
*
0.07 * f
0.14
*
f
f
f
f
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
+ 3.77
+ 4.47
+ 3.55
+ 4.26
+ 3.74
+ 3.67
+ 3.91
+ 3.64
Data Sheet63 12.00
C505/C505C/C505A/C505CA
A/D Converter Characteristics of C505 and C505C
(Operating Conditions apply)
ParameterSymbolLimit ValuesUnitTest Condition
min.max.
Analog input voltage
V
AIN
V
AGND
0.2
-
V
+
AREF
V
0.2
1)
Sample timet
Conversion cycle timet
Total unadjusted errorT
Internal resistance of
R
reference voltage source
Internal resistance of
R
analog source
ADC input capacitanceC
Notes see next page.
Clock calculation table :
Clock Prescaler
ADCL1, 0t
Ratio
S
ADCC
UE
AREF
ASRC
AIN
t
ADC
–64 x t
32 x t
16 x t
8 x t
–320 x t
160 x t
80 x tIN
40 x t
–± 2LSBV
–t
ADC
IN
IN
IN
IN
IN
IN
IN
/ 500
nsPrescaler ÷ 32
Prescaler
Prescaler
Prescaler
nsPrescaler ÷ 32
Prescaler
Prescaler
kΩ
Prescaler
+0.5V ≤ V
SS
t
in [ns]
ADC
- 1
t
–tS / 500
kΩ
in [ns]
S
- 1
–50pF
t
S
ADCC
6)
÷ 16
÷ 8
÷ 4
÷ 16
÷ 8
÷ 4
5) 6)
2) 6)
2)
3)
≤VDD-0.5V
AIN
4)
÷ 32 1 132 x t
÷ 16 1 016 x t
÷ 8 0 1 8 x t
÷ 4 0 0 4 x t
Further timing conditions : t
min = 800 ns
ADC
= 1 / f
t
IN
64 x tIN 320 x tIN
IN
32 x tIN 160 x tIN
IN
16 x tIN 80 x tIN
IN
8 x tIN 40 x tIN
IN
= t
OSC
CLP
Data Sheet64 12.00
Note:
C505/C505C/C505A/C505CA
1) V
2) During the samp le time the in put c apac itance C
3) This parameter includes the sample time t
4) T
may exeed V
AIN
these cases will be 00
or V
AGND
H
AREF
or FFH, respectively.
up to the absolute maximum ratings. However, the conversion result in
must be charged/dis charg ed by the e xternal so urce. T he
AIN
internal resistance of the analog source must allow the capacitanc e to reac h th eir fi nal v olt age level within t
After the end of the sample time t
conversion clock t
(max.) is te sted at –40 ≤ TA ≤= 125 °C ; VDD ≤ 5.5 V; V
UE
depend on programming and can be taken from the table on the previous page.
ADC
, changes of the analog input voltage have no effect on the conversion result.
S
, the time for determining the digital result. Values for the
S
≤VDD + 0.1 V and VSS= ≤ V
AREF
AGND
. It is
S
guaranteed by design characterization for all other voltages within the defined voltage range.
If an overload condition occurs on maximum 2 unused analog input pins and the absolute sum of input overload
currents on all analog input pins does not excee d 10 mA, an additional conversion error of 1/2 LSB is
permissible.
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 maxim um int ernal resistance results from the programmed conversion timin g.
6) Not 100% tested, but guaranteed by design characteriz at ion.
.
Data Sheet65 12.00
C505/C505C/C505A/C505CA
A/D Converter Characteristics of C505A and C505CA
(Operating Conditions apply)
ParameterSymbolLimit ValuesUnitTest Condition
min.max.
Analog input voltage
V
Sample timet
Conversion cycle timet
Total unadjusted errorT
Internal resistance of
R
reference voltage source
Internal resistance of
R
analog source
ADC input capacitanceC
AIN
S
ADCC
UE
AREF
ASRC
AIN
V
AGND
–64 x t
–384 x t
V
AREF
32 x t
16 x t
8 x t
192 x t
V
nsPrescaler ÷ 32
IN
IN
IN
IN
nsPrescaler ÷ 32
IN
IN
96 x tIN
48 x t
–± 2LSBV
–± 4LSBV
–t
ADC
- 0.25
–tS / 500
- 0.25
–50pF
IN
/ 250
kΩ
kΩ
1)
Prescaler
Prescaler
Prescaler
Prescaler
Prescaler
Prescaler
+0.5V ≤ V
SS
< V
SS
V
t
ADC
t
S
6)
AIN
- 0.5 V < V
DD
in [ns]
in [ns]
÷ 16
÷ 8
÷ 4
÷ 16
÷ 8
÷ 4
AIN
<VDD+0.5V
5) 6)
2) 6)
2)
3)
≤VDD-0.5V
<VDD
AIN
4)
4)
Notes see next page.
Clock calculation table :
Clock Prescaler
ADCL1, 0t
ADC
Ratio
÷ 32 1 132 x t
÷ 16 1 016 x t
÷ 8 0 1 8 x t
÷ 4 0 0 4 x t
Further timing conditions : t
min = 500 ns
ADC
= 1 / f
t
IN
t
IN
IN
IN
IN
OSC
t
S
ADCC
64 x tIN 384 x tIN
32 x tIN 192 x tIN
16 x tIN 96 x tIN
8 x tIN 48 x tIN
= t
CLP
Data Sheet66 12.00
Note:
C505/C505C/C505A/C505CA
1) V
2) During the samp le time the in put c apac itance C
3) This parameter incl udes the sample time t
may exeed V
AIN
these cases will be X000
AGND
or V
or X3FFH, respecti vely.
H
up to the absolute maximum ratings. However, the conversion result in
AREF
must be charged/dis charg ed by the e xternal so urce. T he
AIN
internal resistance of the analog source must allow the capacitanc e to reac h th eir fi nal v olt age level within t
After the end of the sample time t
calibration. Values for the conversion clock t
, changes of the analog input voltage have no effect on the conversion result.
S
, the time for determinin g the digital result and the tim e for the
S
depend on programming and can be taken from the table on
ADC
S
the previo us page.
4) T
is tested at V
UE
AREF
= 5.0 V, V
= 0 V, VDD = 4.9 V. It is guaranteed by design characterization for all
AGND
other voltages within the defined voltage range.
If an overload condition occurs on maximum 2 unused analog input pins and the absolute sum of input overload
currents on all analog input pins does not excee d 10 mA, an additional conversion error of 1/2 LSB is
permissible.
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 maxim um int ernal resistance results from the programmed conversion timin g.
6) Not 100% tested, but guaranteed by design characteriz at ion.
.
Data Sheet67 12.00
C505/C505C/C505A/C505CA
AC Characteristics (16 MHz, 0.4 to 0.6 Duty Cycle)
(Operating Conditions apply)
(
C
for port 0, ALE and PSEN outputs = 100 pF; CL for all other outputs = 80 pF)
L
Program Memory Characteristics
ParameterSymbolLimit ValuesUnit
ALE pulse width
Address setup to ALE
Address hold after ALE
ALE to valid instruction in
ALE to PSEN
PSEN
pulse widtht
PSEN
to valid instruction int
Input instruction hold after PSEN
Input instruction float after PSEN
Address valid after PSEN
Address to valid instruction in
Address float to PSEN
t
LHLL
t
AVLL
t
LLAX
t
LLIV
t
LLPL
PLPH
PLIV
t
PXIX
t
PXIZ
t
PXAV
t
AVIV
t
AZPL
16-MHz clock
Duty Cycle
Variable Clock
1/CLP= 2 MHz to 16 MHz
0.4 to 0.6
min.max.min.max.
48–CLP - 15–ns
10–TCL
10–TCL
-15–ns
Hmin
-15 –ns
Hmin
–75–2 CLP - 50ns
10–TCL
73–CLP+
TCL
–38–CLP+
-15–ns
Lmin
–ns
-15
Hmin
TCL
Hmin
ns
- 50
0–0–ns
*)
–15–TCL
*)
20–TCL
- 5–ns
Lmin
–95–2 CLP +
TCL
Lmin
Hmin
-10ns
ns
-55
-5–-5–ns
*)
Interfacing the C505 to devices with float times up to 20 ns is permissible. Th is lim it ed bus contention will not
cause any damage to port 0 driv ers.
Data Sheet68 12.00
C505/C505C/C505A/C505CA
AC Characteristics (16 MHz, 0.4 to 0.6 Duty Cycle, cont’d)
External Data Memory Characteristics
ParameterSymbolLimit ValuesUnit
pulse width
RD
WR
pulse width
Address hold after ALE
RD
to valid data in
Data hold after RD
Data float after RD
ALE to valid data in
Address to valid data in
Interfacing the C505 to devices with float times up to 20 ns is permissible. Th is lim it ed bus contention will not
cause any damage to port 0 driv ers.
t
AZPL
- 5–- 5–ns
Data Sheet71 12.00
C505/C505C/C505A/C505CA
AC Characteristics (20 MHz, 0.5 Duty Cycle, cont’d)
External Data Memory Characteristics
ParameterSymbolLimit ValuesUnit
pulse width
RD
pulse width
WR
Address hold after ALE
to valid data in
RD
Data hold after RD
Data float after RD
ALE to valid data in
Address to valid data in
ALE to WR
or RD
Address valid to WR
WR
or RD high to ALE high
Data valid to WR
transition
Data setup before WR
Data hold after WR
Address float after RD
ALE pulse width
ALE period
Data valid after ALE
Data stable after ALE
P3.5 setup to ALE low
t
AWD
t
ACY
t
DVA
t
DSA
t
AS
–CLP–ns
–6 CLP–ns
––2 CLPns4 CLP––ns
–t
CL
–ns
Oscillator frequency1/ CLP4–6MHz
t
ACY
t
AWD
ALE
t
DSA
t
DVA
Port 0
t
AS
Data Valid
P3.5
MCT02613
Figure 41
ROM/OTP Verification Mode 2
Data Sheet81 12.00
C505/C505C/C505A/C505CA
VDD-0.5 V
0.45 V
V
+0.90.2
DD
VDD0.2-0.1
Test Points
MCT00039
AC Inputs during testing are driven at VDD- 0.5 V for a logic ’1’ and 0 .45 V for a logi c ’0’.
Timing measurements are made at
for a logic ’1’ and V
IHmin
for a logic ’0’.
ILmax
V
Figure 42
AC Testing: Input, Output Waveforms
V
OH
V
OL
-0.1 V
+0.1 V
V
Load
V
V
Load
Load
+0.1 V
Timing Reference
Points
-0.1 V
MCT00038
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
I
OL/IOH
≥±20 mA
V
OH/VOL
level occurs.
Figure 43
AC Testing : Float Waveforms
Crystal Oscillator ModeDriving from External Source
Figure 44
Recommended Oscillator Circuits for Crystal Oscillator
Data Sheet82 12.00
P-MQFP-44-2 (SMD)
(Plastic Metric Quad Flat Package)
C505/C505C/C505A/C505CA
Figure 45
P-MQFP-44 Package Outline
Sorts of Packing
Package outlines for tubes, trays etc. are contained in our
Data Book “Package Information”
SMD = Surface Mounted Device
GPM05622
Dimensions in mm
Data Sheet83 12.00
Infineon goes for Business Excellence
“Business excellence means intelligent approaches and clearly
defined processes, which are both constantly under review and
ultimately lead to good operating results.
Better operating results and business excellence mean less
idleness and wastefulness for all of us, more professional
success, more accurate information, a bet ter overview and,
thereby, less frustration and more satisfaction.”
Dr. Ulrich Schumacher
http://www.infineon.com
Published by Infineon Technologies AG
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.