Port Programming Assembly 8086
Port Programming Assembly 8086
CHAPTER 4
I/O PORT
PROGRAMMING
OBJECTIVES
1
11/6/2015
2
11/6/2015
Port 0
Figure 42
Port 0 with Pull-Up Resistors
5
Port 0
3
11/6/2015
Port 0 as input
4
11/6/2015
Port 1
It can be used as input or output.
This port does not need any pull-up
resistors since it already has pull-up
resistors internally
internally.
Upon reset, port I is configured as an
input port.
Port 1 as input
10
5
11/6/2015
Port 1 as input
11
Port 2
Port 2 occupies a total of 8 pins (pins 21 through
28).
It can be used as input or output.
Port 2 does not need any pull-up resistors since
it already
l d has
h pull-up
ll resistors
i t internally.
i t ll
Upon reset, port 2 is configured as an input port.
12
6
11/6/2015
Port 2 as input
13
14
7
11/6/2015
Port 3
15
Port 3
Table 41
Port 3 Alternate Functions
16
8
11/6/2015
17
18
9
11/6/2015
20
10
11/6/2015
21
Table 43
Single-Bit Addressability
of Ports
22
11
11/6/2015
23
24
12
11/6/2015
25
26
13
11/6/2015
27
14
11/6/2015
Read-modify-write feature
29
15