English
Language : 

C508_01 Datasheet, PDF (66/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
On-Chip Peripheral Components
6
On-Chip Peripheral Components
This chapter provides detailed information about all on-chip peripherals of the C508
except for the integrated interrupt controller, which is described separately in Chapter 7.
6.1
Parallel I/O
The C508 has one 8-bit analog or digital input port and five 8-bit I/O ports. Port 4 is a uni-
directional input port. Port 0 is an open-drain bi-directional I/O port; Ports 1, 2, 3, and 5
are quasi-bi-directional I/O ports with internal pull-up transistors. This means that when
these ports are configured as inputs, they will be pulled high and will source current when
externally pulled low. Port 0 will float when configured as input.
The output drivers of Ports 0 and 2 and the input buffers of Port 0 are also used for
accessing external memory. In this application, Port 0 outputs the low byte of the
external memory address, time multiplexed with the byte being written or read. Port 2
outputs the high byte of the external memory address when the address is 16 bits wide.
Otherwise, the Port 2 pins continue emitting the P2 SFR contents. In this function, Port 0
is not an open-drain port, but uses a strong internal pull-up FET.
Port 4 provides the analog input channels to the A/D Converter.
6.1.1 Port Structures
The C508 generally allows digital I/O on 32 lines grouped into four bi-directional 8-bit
ports and analog/digital input on one unidirectional 8-bit port. Except for Port 4 which is
the uni-directional input port, each port bit consists of a latch, an output driver, and an
input buffer. Read and write accesses to the I/O Ports P0-P5 (except P4) are performed
via their corresponding Special Function Registers.
When Port 4 is used as analog input, an analog channel is switched to the A/D Converter
through a 3-bit multiplexer, which is controlled by three bits in SFR ADCON (see
Chapter 6.5). Port 4 lines may also be used as digital inputs. In this case, they are
addressed as an input port via SFR P4. Since Port 4 has no internal latch, the contents
of SFR P4 only depend on the levels applied to the input lines. It makes no sense to
output a value to this input-only port by writing to the SFR P4. This will have no effect.
The parallel I/O ports of the C508 can be grouped into four different types which are
listed in Table 6-1.
User’s Manual
6-1
2001-05