Datasheet

78K0/Ix2 CHAPTER 13 COMPARATORS
R01UH0010EJ0500 Rev.5.00 421
Feb 28, 2012
(5) Port mode register 2 (PM2)
PM2 is used to set port 2 input or output in 1-bit units.
When CMP0+/P24/ANI4, CMP1+/P25/ANI5, and CMP2+/P23/ANI3 pins, and CMPCOM/P26/ANI6 pin
Note
are used
for the comparator input and comparator common input respectively, set PM23 to PM25, PM26 bits to 1.
The output latches of P23 to P25, P26 at this time may be 0 or 1.
PM2 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation sets PM2 to FFH.
Note 78K0/IB2 only
Figure 13-10. Format of Port Mode Register 2 (PM2)
(1) 78K0/IY2
Address: FF22H After reset: FFH R/W
Symbol 7 6 5 4 3 2 1 0
PM2 1 1 PM25 PM24 PM23 PM22 1 PM20
Caution Be sure to set bits 1, 6 and 7 of PM2 to 1.
(2) 78K0/IA2
Address: FF22H After reset: FFH R/W
Symbol 7 6 5 4 3 2 1 0
PM2 1 1 PM25 PM24 PM23 PM22 PM21 PM20
Caution Be sure to set bits 6 and 7 of PM2 to 1.
(3) 78K0/IB2
Address: FF22H After reset: FFH R/W
Symbol 7 6 5 4 3 2 1 0
PM2 PM27 PM26 PM25 PM24 PM23 PM22 PM21 PM20
PM2n P2n pin I/O mode selection (n = 0 to 7)
0 Output mode (output buffer on)
1 Input mode (output buffer off)
Caution If the internal reference voltage is used, the port function shared by the CMPCOM pin can be used in
input mode. Using the port function in output mode, however, is prohibited. Also, accessing port
register 2 (P2) is prohibited.