Ports; Description (Port 1) - Panasonic MN103S User Manual

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 7
I/O Port

7.3 Ports

7.3.1

Description (Port 1)

General Port Setup
Each bit can be set individually as either an input or output by the port 1 I/O control register (P1DIR). The control
flag of the P1DIR 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 P1DIR to "0" and read the value of the port 1 input register
(P1IN).
To output data to a pin, set the control flag of the P1DIR register to "1" and write data to the port 1 output register
(P1OUT).
Each bit can be set individually if pull-up resistor is added or not, by the port 1 pull-up control register (P1PLU).
Set the control flag of the P1PLU register to "1" to add pull-up resistor.
Special Function Pin Setup
P10 to P14 are used as external interrupt pins as well.
P16 is used as an I/O pin of timer 17 as well. Each bit can be selected individually as output mode by the port 1
output mode register (P1MD). P16 outputs special function data when the control flag of the P1MD is "1"and is
used as a general port when it is "0".
P17 is used as a serial 2 output pin as well. It is an output pin for the serial 2 and UART2 transmission data. When
the SC2SBOS flag of the serial interface 2 mode register 1 (SC2CTR1) and the P17M flag of the port 1 output
mode register (P1MD) are set to "1", P17 becomes an output pin for the serial data.
VII - 32
Ports

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents