Samsung S3C84E5 user manual Port 0 Control Register P0CONH/P0CONL

Models: S3C84E5

1 316
Download 316 pages 61.65 Kb
Page 227
Image 227

S3C84E5/C84E9/P84E9

I/O PORTS

 

 

PORT 0

Port 0 is an 8-bit I/O port that you can use two ways:

General-purpose digital I/O

Alternative function: TACAP, TACK, T1CAP0, T1OUT1, T1CK1, T1CAP1, XTIN, XTOUT

Port 0 is accessed directly by writing or reading the port 0 data register, P0 at location E0H in set 1, bank 0.

Port 0 Control Register (P0CONH/P0CONL)

Port 0 has two 8-bit control registers: P0CONH for P0.4–P0.7 and P0CONL for P0.0–P0.3. A reset clears the P0CONH and P0CONL registers to “00H” and “0FH”, configuring all pins to input modes. You use control registers settings to select input or output mode (push-pull) and enable the alternative functions.

When programming the port, please remember that any alternative peripheral I/O function you configure using the port 0 control registers must also be enabled in the associated peripheral module.

Port 0 Control Register, High Byte (P0CONH)

E6H, Set1, Bank0, R/W, Reset value="00"

MSB

.7

.6

.5

.4

.3

.2

.1

.0

LSB

[.7-.6] P0.7/TACAP Configuration Bits

0 0 = Input mode with pull-up; TACAP input 0 1 = Input mode; TACAP input

1 X = Push-pull output mode

[.5-.4] P0.6/TACK Configuration Bits

0 0 = Input mode with pull-up; TACK input 0 1 = Input mode; TACK input

1 X = Push-pull output mode

[.3-.2] P0.5/T1CAP0 Configuration Bits

00 = Input mode with pull-up; T1CAP0 input

01 = Input mode; T1CAP0 input

1X = Push-pull output mode

[.1-.0] P0.4/T1OUT1 Configuration Bits

00 = Input mode with pull-up

01 = Input mode

10 = Push-pull output mode

1 1 = Alternative function mode: T1OUT1 output

Figure 9-1. Port 0 High Byte Control Register (P0CONH)

9-3

Page 227
Image 227
Samsung S3C84E5 user manual Port 0 Control Register P0CONH/P0CONL