Panasonic MN101C77C User Manual

Page of 544
IV - 37
Chapter 4    I/O Ports
Port 8
4-8 Port 8
4-8-1
Description
„
General Port Setup
Each bit of the port 8 control I/O direction register (P8DIR) can be set individually to set each pin as input
or output. The control flag of the port 8 direction control register (P8DIR) is set to "1" for output mode, and
"0" for input mode.
To read input data of pin, set the control flag of the port 8 direction control register (P8DIR) to "0" and
read the value of the port 8 input register (P8IN).
To output data to pin, set the control flag of the port 8 direction control register (P8DIR) to "1" and write
the value of the port 8 output register (P8OUT).
Each pin can be set individually whether pull-up resistor is added or not, by the port 8 pull-up resistor control
register (P8PLU). Set the control flag of the port  8 pull-up resistor control register (P8PLU) to "1" to add
pull-up resistor.
■ 
Special Function Pin Setup
P80 to P87 are used as LED driving pins, as well.