Chapter 7I/O PortPorts VII - 377.3.9 Description (Port 9)■ General Port SetupEach bit can be set individually as either an input or output by the port 9 I/O control register (P9DIR). The controlflag of the P9DIR register is set to “1” for output mode, and to “0” for input mode.To read input data of a pin, set the control flag of the P9DIR register to “0” and read the value of the port 9 inputregister (P9IN).To output data to a pin, set the control flag of the P9DIR register to “1” and write data to the port 9 output register(P9OUT).Each bit can be set individually if pull-up resistor is added or not, by the port 9 pull-up control register (P9PLU).Set the control flag of the P9PLU register to “1” to add pull-up resistor.■ Special Function Pin SetupP90 to P97 are used as analog input pins as well. Each bit can be selected individually as input mode by the port 9output mode register (P9MD). P90 to P97 are analogue pins when the control flag of the P9MD is“1” and areused as general ports when it is “0”.7.3.10 Description (Port A)■ General Port SetupEach bit can be set individually as either an input or output by the port A I/O control register (PADIR). The con-trol flag of the PADIR register is set to “1” for output mode, and to “0” for input mode.To read input data of a pin, set the control flag of the PADIR register to “0” and read the value of the port A inputregister (PAIN).To output data to a pin, set the control flag of the PADIR register to “1” and write data to the port A output register(PAOUT).Each bit can be set individually if pull-up resistor is added or not, by the port A pull-up control register (PAPLU).Set the control flag of the PAPLU register to “1” to add pull-up resistor.■ Special Function Pin SetupPA0 to PA7 are used as analogue input pins as well. Each bit can be selected individually as input mode by theport A output mode register (PAMD). PA0 to PA7 are analogue pins when the control flag of the PAMD is“1” andare used as general ports when it is “0”.