
80C196KB USER’S GUIDE
12.4 Ports 3 and 4/AD0 – 15
These pins have two functions. They are either bidirec-
tional ports with open-drain outputs or System Bus
pins which the memory controller uses when it is ac-
cessing off-chip memory. If the EA line is low, the pins
always act as the System Bus. Otherwise they act as bus
pins only during a memory access. If these pins are
being used as ports and bus pins, ones must be written
to them prior to bus operations.
Accessing Port 3 and 4 as I/O is easily done from inter-
nal registers. Since the LD and ST instructions require
the use of internal registers, it may be necessary to first
move the port information into an internal location be-
fore utilizing the data. If the data is already internal,
the LD is unnecessary. For instance, to write a word
value to Port 3 and 4 . . .
LD intreg, portdata
; register
w
; data
; not needed if
; already
; internal
ST intreg, 1FFEH
; register
x
; Port 3 and 4
To read Port 3 and 4 requires that ‘‘ones’’ be written to
the port registers to first setup the input port configura-
tion circuit. Note that the ports are reset to this input
condition, but if zeroes have been written to the port,
then ones must be re-written to any pins which are to
be used as inputs. Reading Port 3 and 4 from a previ-
ously written zero condition is as follows . . .
LD intregA,
#
0FFFFH
; setup port
; change mode
; pattern
ST intregA, 1FFEH
; register
x
; Port 3 and 4
; LD & ST not
; needed if
; previously
; written as ones
LD intregB, 1FFEH
; register
w
; Port 3 and 4
Note that while the format of the LD and ST instruc-
tions are similar, the source and destination directions
change.
When acting as the system bus the pins have strong
drivers to both V
CC
and V
SS
. These drivers are used
whenever data is being output on the system bus and
are not used when data is being output by Ports 3 and
4. The pins, external input buffers and pulldowns are
shared between the bus and the ports. The ports use
different output buffers which are configured as open-
drain, and require external pullup resistors. (open-drain
is the MOS version of open-collector.) The port pins
and their system bus functions are shown in Figure
12-5.
270651 – 41
Figure 12-5. Port 3, 4/AD0-15 Pins
63
数控原理与维修
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...