beautypg.com

Port b – Zilog Z8PE002 User Manual

Page 36

background image

Z8PE002
Z8Plus OTP Microcontroller

ZiLOG

36

P R E L I M I N A R Y

DS008700-Z8X0799

PORT B
Port B Description

Port B is a 6-bit (bidirectional), CMOS-compatible I/O port.
These six I/O lines can be configured under software control
to be an input or output. Each bit is configured
independently from the other bits. That is, one bit may be
set to

INPUT

while another bit is set to

OUTPUT

.

In addition to standard input/output capability, five pins of
Port B provide special functionality as indicated in Table 15.

Special functionality is invoked via the Port B special func-
tion register. Port B, bit 5, is an open-drain-only pin when
in output mode. There is no high-side driver on the output
stage, nor is there any high-side protection device, because

PB5

acts as the

V

PP

pin for EPROM programming mode.

The user should always place an external protection diode
on this pin. See Figure 32.

Table 15. Port B Special Functions

Port
Pin

Input Special
Function

Output Special
Function

PB0

Stop Mode Recovery
Input

None

PB1

None

T0 Output

PB2

IRQ3

None

PB3

Comparator
Reference Input

None

PB4

Comparator Signal
Input/IRQ1/IRQ4

None

Figure 32. Port B Special Function Register

D7

D6

D5

D4

D3

D2

D1

D0

Register 0D7H

PTBSFR

1 = Enable PB0 as SMR Input
0 = No Special Functionality

1 = Enable PB1 as T0 Output
0 = No Special Functionality

1 = Enable PB2 as IRQ3 Input
0 = No Special Functionality

Reserved (must be 0)

1 = Analog Comparator on PB3 and PB4
0 = Digital Inputs on PB3 and PB4

1 = PB4 Interrupts Enabled
0 = PB4 Interrupts Disabled