2 digital i/o operation, 1 input register pxin, 2 output registers pxout – Texas Instruments MSP430x4xx User Manual

Page 186: 3 direction registers pxdir

Advertising
background image

Digital I/O Operation

9-3

Digital I/O

9.2

Digital I/O Operation

The digital I/O is configured with user software. The setup and operation of the
digital I/O is discussed in the following sections.

9.2.1

Input Register PxIN

Each bit in each PxIN register reflects the value of the input signal at the
corresponding I/O pin when the pin is configured as I/O function.

Bit = 0: The input is low

Bit = 1: The input is high

Note:

Writing to Read-Only Registers PxIN

Writing to these read-only registers results in increased current consumption
while the write attempt is active.

9.2.2

Output Registers PxOUT

Each bit in each PxOUT register is the value to be output on the corresponding
I/O pin when the pin is configured as I/O function and output direction.

Bit = 0: The output is low

Bit = 1: The output is high

9.2.3

Direction Registers PxDIR

Each bit in each PxDIR register selects the direction of the corresponding I/O
pin, regardless of the selected function for the pin. PxDIR bits for I/O pins that
are selected for other module functions must be set as required by the other
function.

Bit = 0: The port pin is switched to input direction

Bit = 1: The port pin is switched to output direction

Advertising