
80C196KB USER’S GUIDE
12.0 I/O PORTS
There are five 8-bit I/O ports on the 80C196KB. Some
of these ports are input only, some are output only,
some are bidirectional and some have alternate func-
tions. In addition to these ports, the HSI/O unit pro-
vides extra I/O lines if the timer related features of
these lines are not needed.
Port 0 is an input port which is also used as the analog
input for the A/D converter. Port 0 is read at location
0EH. Port 1 is a quasi-bidirectional port and is read or
written to through location 0FH. The three most signif-
icant bits of Port 1 are the control signals for the
HOLD/HLDA bus port pins. Port 2 contains three
types of port lines: quasi-bidirectional, input and out-
put. Port2 is read or written from location 10H. The
ports cannot be read or written in Window 15. The
input and output lines are shared with other functions
in the 80C196KB as shown in Figure 12-1. Ports 3 and
4 are open-drain bidirectional ports which share their
pins with the address/data bus. On EPROM and ROM
parts, Port 3 and 4 are read and written through loca-
tion 1FFEH.
PIN FUNC.
ALTERNATE
CONTROL
FUNCTION
REG.
2.0
Output TXD (Serial Port Transmit)
IOC1.5
2.1
Input
RXD (Serial Port Receive)
SPCON.3
P2.2 Input
EXTINT
IOC1.1
2.3
Input
T2CLK (Timer2 Clock & Baud) IOC0.7
2.4
Input
T2RST (Timer2 Reset)
IOC0.5
2.5
Output PWM Output
IOC1.0
2.6
QBD
*
Timer2 up/down select
IOC2.1
2.7
QBD
*
Timer2 Capture
N/A
*
QBD
e
Quasi-bidirectional
Figure 12-1. Port 2 Multiple Functions
While discussing the characteristics of the I/O pins
some approximate current or voltage specifications will
be given. The exact specifications are available in the
latest version of the data sheet that corresponds to the
part being used.
12.1 Input Ports
Input ports and pins can only be read. There are no
output drivers on these pins. The input leakage of these
pins is in the microamp range. The specific values can
be found in the data sheet for the device being consid-
ered. Figure 12-2 shows the input port structure.
The high impedance input pins on the 80C196KB have
an input leakage of a few microamps and are predomi-
nantly capacitive loads on the order of 10 pF.
In addition to acting as a digital input, each line of Port
0 can be selected to be the input of the A/D converter
as discussed in Section 11. The capacitance on these
pins is approximately 1 pF and will instantaneously in-
crease by around 2 pF when the pin is being sampled by
the A/D converter.
Port 0 pins are special in that they may individually be
used as digital inputs and analog inputs at the same
time. A Port 0 pin being used as a digital input acts as
the high impedance input ports just described. Howev-
er, Port 0 pins being used as analog inputs are required
to provide current to the internal sample capacitor
when a conversion begins. This means that the input
characteristics of a pin will change if a conversion is
being done on that pin. In either case, if Port 0 is to be
used as analog or digital I/O, it will be necessary to
provide power to this port through the V
REF
pin and
ANGND pins.
Port 0 is only sampled when the SFR is read to reduce
the noise in the A/D converter. The data must be stable
one state time before the SFR is read.
270651 – 76
NOTE:
*
Q1 and Q2 are ESD Protection Devices
Figure 12-2. Input Port Structure
12.2 Quasi-Bidirectional Ports
Port 1 and Port 2 have quasi-bidirectional I/O pins.
When used as inputs the data on these pins must be
stable one state time prior to reading the SFR. This
timing is also valid for the input-only pins of Port 2 and
is similar to the HSI in that the sample occurs during
PH1 or during CLKOUT low. When used as outputs,
the quasi-bidirectional pins will change state shortly af-
ter CLKOUT falls. If the change was from ‘0’ to a ‘1’
60
数控原理与维修
http://www.agreenleaf.cn
Содержание 80C196KB Series
Страница 1: ...November 1990 80C196KB User s Guide Order Number 270651 003 http www agreenleaf cn...
Страница 59: ...80C196KB USER S GUIDE Figure 11 7 Ideal A D Characteristic 270651 37 55 http www agreenleaf cn...
Страница 60: ...80C196KB USER S GUIDE Figure 11 8 Actual and Ideal Characteristics 270651 38 56 http www agreenleaf cn...
Страница 61: ...80C196KB USER S GUIDE Figure 11 9 Terminal Based Characteristic 270651 39 57 http www agreenleaf cn...
Страница 70: ...80C196KB USER S GUIDE Figure 13 5 Reset Sequence 80C196KB Reset Sequence 270651 45 66 http www agreenleaf cn...
Страница 83: ...80C196KB USER S GUIDE 270651 80 Figure 15 14 AC Timing Diagrams 79 http www agreenleaf cn...
Страница 84: ...80C196KB USER S GUIDE 270651 81 270651 84 Figure 15 14 AC Timing Diagrams Continued 80 http www agreenleaf cn...