CHAPTER 4 PORT FUNCTIONS
User’s Manual U17446EJ3V1UD
64
(1) Port mode registers (PM0, PM2, PM3, PM4, PM12)
These registers are used to set the corresponding port to the input or output mode in 1-bit units.
Each port mode register can be set by a 1-bit or 8-bit memory manipulation instruction.
Generation of reset signal sets these registers to FFH.
When a port pin is used as an alternate-function pin, set its port mode register and output latch as shown in
Table 4-3.
Caution Because P30, P31, and P43 are also used as external interrupt pins, the corresponding
interrupt request flag is set if each of these pins is set to the output mode and its output level
is changed. To use the port pin in the output mode, therefore, set the corresponding
interrupt mask flag to 1 in advance.
Figure 4-15. Format of Port Mode Register
Address: FF20H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM0
1 1 1 1
PM03
PM02
PM01
PM00
Address: FF22H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM2
1 1 1 1
PM23
PM22
PM21
PM20
Address: FF23H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM3
1 1 1 1
PM33
PM32
PM31
PM30
Address: FF24H After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM4 PM47 PM46 PM45 PM44 PM43 PM42 PM41 PM40
Address: FF2CH After reset: FFH R/W
Symbol
7 6 5 4 3 2 1 0
PM12
1 1 1 1
PM123
PM122
PM121
PM120
PMmn
Selection of I/O mode of Pmn pin (m = 0, 2, 3, 4, or 12; n = 0 to 7)
0
Output mode (output buffer ON)
1
Input mode (output buffer OFF)
Содержание 78K0S/KB1+
Страница 2: ...User s Manual U17446EJ3V1UD 2 MEMO ...