8XC196MC, MD, MH USER’S MANUAL

Px_REG

Px_REG

x = 2–5 (8XC196MC)

x = 2–5, 7 (8XC196MD) x = 1–5 (8XC196MH)

Address: Table C-10 Reset State:

For an input, set the corresponding port x data output (Px_REG) register 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.

 

7

 

 

 

 

 

 

 

0

x = 1 (MH)

 

 

PIN3

PIN2

PIN1

PIN0

 

 

7

 

 

 

 

 

 

 

0

x = 2–5 (M x)

 

 

 

 

 

 

 

 

 

 

 

PIN7

PIN6

PIN5

PIN4

 

PIN3

PIN2

PIN1

PIN0

 

 

7

 

 

 

 

 

 

 

0

x = 7 (MD)

 

 

 

 

 

 

 

 

 

 

 

PIN7

PIN6

PIN5

PIN4

 

PIN3

PIN2

PIN1

PIN0

 

 

 

 

 

 

 

 

 

 

 

Bit Number

 

Bit

 

 

 

Function

 

 

 

Mnemonic

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:0

PIN7:0

Port x Pin y Output

 

 

 

 

 

 

 

 

 

To use Px.y for output, write the desired output data to this bit. To use

 

 

 

Px.y for input, set this bit.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The bits shown as dashes (—) are reserved; for compatibility with future devices, write zeros to these bits.

Table C-10. Px_REG Addresses and Reset Values

Register

Address

Reset Value

 

 

 

P1_REG (8XC196MH)

1F9DH

FFH

 

 

 

P2_REG (8XC196Mx)

1FD4H

FFH

 

 

 

P3_REG (8XC196Mx)

1FFCH

FFH

 

 

 

P4_REG (8XC196Mx)

1FFDH

FFH

 

 

 

P5_REG (8XC196MC, MD)

1FF5H

FFH when pin is not driven

P5_REG (8XC196MH)

1FF5H

FFH

 

 

 

P7_REG (8XC196MD)

1FD5H

FFH

 

 

 

C-34

Page 511
Image 511
Intel manual Table C-10. PxREG Addresses and Reset Values, PxREG = 2-5 8XC196MC = 2-5, 7 8XC196MD x = 1-5 8XC196MH