145CHAPTER 6 PORT FUNCTIONS6.2.11 Port 13This is a 2-bit input/output port with output latches. Input mode/output mode can be specified bit-wise by meansof port mode register 13 (PM13). When pins P130 and P131 are used as input port pins, an on-chip pull-up resistorcan be used as a 2-bit unit by means of pull-up resistor option register H (PUOH).Alternate function includes D/A converter analog output.RESET input sets the input mode.Figure 6-18 shows a block diagram of port 13.Caution When only either one of the D/A converter channels is used with AV REF1< V DD , the other pinsthat are not used as analog outputs must be set as follows:• Set PM13 × bit of the port mode register 13 (PM13) to 1 (input mode) and connect the pinto V SS .• Set PM13 × bit of the port mode register 13 (PM13) to 0 (output mode) and the output latchto 0, to output low level from the pin.Figure 6-18. P130 and P131 Block DiagramPUO : Pull-up resistor option registerPM : Port mode registerRD : Port 13 read signalWR : Port 13 write signalP-chWRPMWRPORTRDWRPUOAVDDSelectorPUO13Output Latch(P130 and P131)PM130, PM131Internal busP130/ANO0,P131/ANO1