Datasheet

78K0/Kx2-L CHAPTER 4 PORT FUNCTIONS
R01UH0028EJ0400 Rev.4.00 171
Sep 27, 2010
Figure 4-34. Format of Port Mode Register (78K0/KC2-L)
7
1
Symbol
PM0
6
1
5
1
4
1
3
1
2
PM02
Note 1
1
PM01
0
PM00
Address
FF20H
After reset
FFH
R/W
R/W
PM17
PM1
PM16 PM15 PM14 PM13
PM12
Note 2
PM11
Note 2
PM10
Note 2
FF21H FFH R/W
PM27
Note 2, 3
PM2
PM26
Note 2
PM25
Note 2
PM24
Note 2
PM23
Note 2
PM22
Note 2
PM21
Note 2
PM20
Note 2
FF22H FFH R/W
1
PM3
1 1 1 PM33 PM32 PM31 PM30
FF23H FFH R/W
PM4
Note 3
1
PM42
Note 1
PM41
Note 3
PM40
Note 3
FF24H FFH R/W
PM6
PM63
Note 3
PM62 PM61 PM60
FF26H FFH R/W
1
PM7
1
PM75
Note 1
PM74
Note 1
PM73 PM72 PM71 PM70 FF27H FFH R/W
1
PM12
1 1 1 1 1 1 PM120
FF2CH FFH R/W
1111
1111
PMmn
Pmn pin I/O mode selection
(m = 0 to 4, 6, 7, 12; n = 0 to 7)
0 Output mode (output buffer on)
1 Input mode (output buffer off)
Notes 1. 48-pin products only
2. If this pin is set as an analog input by using the ADPC1 or ADPC0 register, be sure to set it to input
mode.
3. For 40-pin products, clear it to 0.
Cautions 1. For 40-pin products, be sure to set bits 2 to 7 of PM0, bit 7 of PM2, bits 4 to 7 of PM3, bits 2
to 7 of PM4, bits 3 to 7 of PM6, bits 4 to 7 of PM7, and bits 1 to 7 of PM12 to 1. Set P40, P41,
and P63 to output mode (PM40 = PM41 = PM63 = 0) by using software after release of reset.
2. For the 44-pin products, be sure to set bits 2 to 7 of PM0, bits 4 to 7 of PM3, bits 2 to 7 of
PM4, bits 4 to 7 of PM6, bits 4 to 7 of PM7, and bits 1 to 7 of PM12 to “1”.
3. For the 48-pin products, be sure to set bits 3 to 7 of PM0, bits 4 to 7 of PM3, bits 3 to 7 of
PM4, bits 4 to 7 of PM6, bits 6 and 7 of PM7, and bits 1 to 7 of PM12 to “1”.
<R>