Port 4, Port 5 – Rainbow Electronics AT89C5122 User Manual

Page 56

Advertising
background image

56

AT8xC5122/23

4202E–SCR–06/06

Port 4

Port 4 has the following functions:

Default function: Port 4 is an 6-bit I/O port.

Alternate functions: see table below

Port 4 has the following configurations:

Default configuration: Pseudo bi-directional “Port51” digital input/output with
internal pull-ups.

Alternate configurations: See Table 33.

Table 33. Port 4 Description

Port 5

Port 5 has the following functions:

Default function: Port 5 is an 8-bit I/O port.

Alternate function 1: Port 5 is an 8-bit keyboard port KB0 to KB7.

Port 5 has the following configurations:

Default configuration: Pseudo bi-directional “Port51” digital input/output with
internal pull-ups.

Alternate configuration: see Table 34.

Table 34. Port 5 Description

Port

Alternate Functions

Configurations

Signal

Description

Mode 1

Mode 2

Mode 3

P4.0

MISO

SPI Master In Slave Out I/O

P4.1

MOSI

SPI Master Out Slave In I/O

P4.2

SCK

SPI clock

P4.3

Push-pull

KB_OUT

Input MPU

P4.4

Push-pull

KB_OUT

Input MPU

P4.5

Push-pull

KB_OUT

Input MPU

Port

Configurations

Mode 1

Mode 2

Mode 3

Comments

P5.0

Push-pull

Input MPU

Input WPU

First cluster

P5.1

Push-pull

Input MPU

Input WPU

P5.2

Push-pull

Input MPU

Input WPU

P5.3

Push-pull

Input WPD

Input WPU

Second cluster

P5.4

Push-pull

Input WPD

Input WPU

P5.5

Push-pull

Input WPD

Input WPU

P5.6

Push-pull

Input WPD

Input WPU

Third cluster

P5.7

Push-pull

Input WPD

Input WPU

Advertising