CHAPTER 6 PORT FUNCTIONS
User’s Manual U14826EJ5V0UD
67
6.3 Port Function Control Registers
The following registers are used to control the ports.
• Port mode registers (PM0, PM2)
(1) Port mode registers (PM0, PM2)
PM0 and PM2 are registers for which port I/O settings can be controlled in 1-bit units.
Each port mode register is set with a 1-bit or 8-bit memory manipulation instruction.
RESET input sets these registers to FFH.
When port pins are used for alternate functions, the corresponding port mode register and output latch must
be set or reset as described in Table 6-3.
Figure 6-5. Format of Port Mode Register
PMmn
0
Output mode (output buffer on)
Input mode (output buffer off)
1
Pmn pin input/output mode selection
(m = 0, 2, n = 0 to 7)
PM07
PM06
PM05
PM04
PM03
PM02
PM01
PM00
PM0
7
6
5
4
Symbol
Address
After reset
R/W
FF20H
FFH
R/W
3
2
1
0
1
1
1
1
1
1
PM21
PM20
PM2
FF22H
FFH
R/W
Table 6-3. Port Mode Register and Output Latch Settings for Using Alternate Functions
Alternate Function
Pin Name
Name Input/Output
PM
××
P
××
TMO Output
0
0
P20
BSFO Output
0 0
P21 TMI
input
1
×
Remark
×
: don’t
care
PM
××
: Port mode register
P
××
:
Port output latch
Содержание PD789860
Страница 2: ...User s Manual U14826EJ5V0UD 2 MEMO ...