English
Language : 

C161V_96 Datasheet, PDF (94/260 Pages) Siemens Semiconductor Group – 16-Bit CMOS Single-Chip Microcontrollers
10Jul97@15:19h
Parallel Ports / C161
In the C161 certain ports provide Open Drain Control, which allows to switch the output driver of a
port pin from a push/pull configuration to an open drain configuration. In push/pull mode a port
output driver has an upper and a lower transistor, thus it can actively drive the line either to a high
or a low level. In open drain mode the upper transistor is always switched off, and the output driver
can only actively drive the line to a low level. When writing a ‘1’ to the port latch, the lower transistor
is switched off and the output enters a high-impedance state. The high level must then be provided
by an external pullup device. With this feature, it is possible to connect several port pins together to
a Wired-AND configuration, saving external glue logic and/or additional software overhead for
enabling/disabling output signals.
This feature is implemented for ports P2, P3 and P6 (see respective sections), and is controlled
through the respective Open Drain Control Registers ODPx. These registers allow the individual bit-
wise selection of the open drain mode for each port line. If the respective control bit ODPx.y is ‘0’
(default after reset), the output driver is in the push/pull mode. If ODPx.y is ‘1’, the open drain
configuration is selected. Note that all ODPx registers are located in the ESFR space.
Figure 6-2
Output Drivers in Push/Pull Mode and in Open Drain Mode
Alternate Port Functions
Each port line has one programmable alternate input or output function associated with it.
PORT0 and PORT1 may be used as the address and data lines when accessing external memory.
Port 4 outputs the additional segment address bits A21/19/17...A16 in systems where more than
64 KBytes of memory are to be accessed directly.
Port 6 provides the optional chip select outputs.
Port 2 is used for fast external interrupt inputs.
Port 3 includes alternate input/output functions of timers, serial interfaces and the optional bus
control signal BHE/WRH.
Port 5 is used for timer control signals.
Semiconductor Group
6-2