I/O PORTSKS57C2308/P2308/C2316/P2316

Table 10-1. I/O Port Overview

Port

I/O

Pins

Pin Names

Address

Function Description

 

 

 

 

 

 

0

I

4

P0.0–P0.3

FF0H

4-bit input port.

 

 

 

 

 

1-bit and 4-bit read and test are possible.

 

 

 

 

 

P0.1 and P0.2 are software configurable as

 

 

 

 

 

input or output for SCK and SO by SMOD

 

 

 

 

 

register.

 

 

 

 

 

4-bit pull-up resistors are software assignable.

 

 

 

 

 

 

1

I

4

P1.0–P1.3

FF1H

4-bit input port.

 

 

 

 

 

1-bit and 4-bit read and test are possible.

 

 

 

 

 

4-bit pull-up resistors are software assignable.

 

 

 

 

 

 

2

I/O

4

P2.0–P2.3

FF2H

4-bit I/O port.

 

 

 

 

 

1-bit and 4-bit read/write and test is possible.

 

 

 

 

 

4-bit pull-up resistors are software assignable.

 

 

 

 

 

 

3

I/O

4

P3.0–P3.3

FF3H

4-bit I/O Port.

 

 

 

 

 

1-bit and 4-bit read/write and test are possible.

 

 

 

 

 

4-bit pull-up resistors are software assignable.

 

 

 

 

 

Each pin is individually software configurable

 

 

 

 

 

as input or output.

 

 

 

 

 

 

4, 5

I/O

8

P4.0–P4.3

FF4H

4-bit I/O port. Each pin can be set to N-channel

 

 

 

P5.0–P5.3

FF5H

open-drain output, up to 5 volts. 1-, 4-, and 8-

 

 

 

 

 

bit read/write/test are possible. Ports 4 and 5

 

 

 

 

 

can be paired to support 8-bit data transfer.

 

 

 

 

 

Pull-up resistors are software assignable; pull-

 

 

 

 

 

up resistor are automatically disable for output.

 

 

 

 

 

 

6, 7

I/O

8

P6.0–P6.3

FF6H

4-bit I/O port. Port 6 pins are individually

 

 

 

P7.0–P7.3

FF7H

software configurable as input or output. 1-,

 

 

 

 

 

and 4-bit read/write/test are possible. 4-bit

 

 

 

 

 

pull-up resistors are software assignable. Ports

 

 

 

 

 

6 and 7 can be paired for 8-bit data transfer.

 

 

 

 

 

 

8

O

8

P8.0–P8.7

1F8H–1FFH

Output port for 1-bit data (for use as CMOS

 

 

 

 

 

driver only)

 

 

 

 

 

 

Table 10-2. Port Pin Status During Instruction Execution

 

Instruction Type

Example

Input Mode Status

Output Mode Status

 

 

 

 

 

 

 

1-bit test

BTST

P0.1

Input or test data at each pin

Input or test data at output latch

 

1-bit input

LDB

C,P1.3

 

 

 

4-bit input

LD

A,P0

 

 

 

8-bit input

LD

EA,P4

 

 

 

 

 

 

 

 

 

1-bit output

BITR

P2.3

Output latch contents undefined

Output pin status is modified

 

 

 

 

 

 

 

4-bit output

LD

P2,A

Transfer accumulator data to the

Transfer accumulator data to the

 

8-bit output

LD

P6,EA

output latch

output pin

 

 

 

 

 

 

 

 

 

 

 

 

10-2

Page 212
Image 212
Samsung KS57C2308 manual FF0H, P6,EA