8XC196MC, MD, MH USER’S MANUAL

Table 11-3. EPA Control and Status Registers (Continued)

Mnemonic

 

Address

 

Description

 

 

 

MC

MD

MH

 

 

 

 

 

 

 

INT_PEND

0009H

0009H

0009H

Interrupt Pending

 

 

 

 

Any set bit in this 8-bit register indicates a pending

 

 

 

 

interrupt request.

INT_PEND1

0012H

0012H

0012H

Interrupt Pending 1

 

 

 

 

Any set bit in this 8-bit register indicates a pending

 

 

 

 

interrupt request.

P2_DIR

1FD2H

1FD2H

1FD2H

Port x Direction

P7_DIR

1FD3H

Each bit of Px_DIR controls the direction of the

 

 

 

 

 

 

 

 

corresponding pin. Clearing a bit configures a pin

 

 

 

 

as a complementary output; setting a bit

 

 

 

 

configures a pin as an input or open-drain output.

 

 

 

 

(Open-drain outputs require external pull-ups.)

P2_MODE

1FD0H

1FD0H

1FD0H

Port x Mode

P7_MODE

1FD1H

Each bit of Px_MODE controls whether the corre-

 

 

 

 

 

 

 

sponding pin functions as a standard I/O port pin

 

 

 

 

or as a special-function signal. Setting a bit

 

 

 

 

configures a pin as a special-function signal;

 

 

 

 

clearing a bit configures a pin as a standard I/O

 

 

 

 

port pin.

P0_PIN

1FA8H

1FA8H

1FDAH

Port x Input

P1_PIN

1FA9H

1FA9H

1F9FH

Each bit of Px_PIN reflects the current state of the

P2_PIN

1FD6H

1FD6H

1FD6H

corresponding pin, regardless of the pin configu-

P7_PIN

1FD7H

ration.

 

 

 

 

P2_REG

1FD4H

1FD4H

1FD4H

Port x Data Output

P7_REG

1FD5H

For an input, set the corresponding Px_REG bit.

 

 

 

 

 

 

 

 

For an output, write the data to be driven out by

 

 

 

 

each pin to the corresponding bit of Px_REG.

 

 

 

 

When a pin is configured as standard I/O

 

 

 

 

(Px_MODE.y = 0), the result of a CPU write to

 

 

 

 

Px_REG is immediately visible on the pin. When a

 

 

 

 

pin is configured as a special-function signal

 

 

 

 

(Px_MODE.y = 1), the associated on-chip

 

 

 

 

peripheral or off-chip component controls the pin.

 

 

 

 

The CPU can still write to Px_REG, but the pin is

 

 

 

 

unaffected until it is switched back to its standard

 

 

 

 

I/O function.

 

 

 

 

This feature allows software to configure a pin as

 

 

 

 

standard I/O (clear Px_MODE.y), initialize or

 

 

 

 

overwrite the pin value, then configure the pin as a

 

 

 

 

special-function signal (set Px_MODE.y). In this

 

 

 

 

way, initialization, fault recovery, exception

 

 

 

 

handling, etc., can be done without changing the

 

 

 

 

operation of the associated peripheral.

11-4

Page 243
Image 243
Intel 8XC196MD, 8XC196MH, 8XC196MC manual P0PIN 1FA8H, P1PIN 1FA9H