beautypg.com

I/o port reset conditions, Analog comparator, Comparator operation – Zilog Z8PE002 User Manual

Page 43

background image

Z8PE002

ZiLOG

Z8Plus OTP Microcontroller

DS008700-Z8X0799

P R E L I M I N A R Y

43

I/O PORT RESET CONDITIONS

Full Reset

Port A and Port B output value registers are not affected by

RESET

.

On

RESET

, the Port A and Port B directional control reg-

isters are cleared to all zeros, which defines all pins in both
ports as inputs.

On

RESET

, the directional control registers redefine all pins

as inputs, and the Port A and Port B input value registers

overwrites the previously held data with the current sample
of the input pins.

On

RESET

, the Port A and Port B special function registers

are cleared to

00h

, which deactivates all port special func-

tions.

Note: The

SMR

and

WDT

time-out events are

not

full device

resets. The port control registers are not affected by ei-
ther of these events.

ANALOG COMPARATOR

The device includes one on-chip analog comparator. Pin

PB4

features a comparator front end. The comparator ref-

erence voltage is on pin

PB3

.

Comparator Description

The on-chip comparator can process an analog signal on

PB4

with reference to the voltage on

PB3

. The analog func-

tion is enabled by programming the Port B special function
register bits 3 and 4.

When the analog comparator function is enabled, bit 4 of
the input register is defined as holding the synchronized out-
put of the comparator, while bit 3 retains a synchronized
sample of the reference input.

If the interrupts for

PB4

are enabled when the comparator

special function is selected, the output of the comparator
generates interrupts.

COMPARATOR OPERATION

The comparator output reflects the relationship between the
analog input to the reference input. If the voltage on the an-
alog input is higher than the voltage on the reference input,
then the comparator output is at a High state. If the voltage
on the analog input is lower than the voltage on the reference
input, then the analog output is at a Low state.

Comparator Definitions

V

ICR

The usable voltage range for the positive input and
reference input is called the Comparator Input Common
Mode Voltage Range (

V

ICR

).

Note: The comparator is not guaranteed to work if the input is

outside of the

V

ICR

range.

V

OFFSET

The absolute value of the voltage between the positive input
and the reference input required to make the comparator
output voltage switch is the Comparator Input Offset Volt-
age (

V

OFFSET

).

I

IO

For the CMOS voltage comparator input, the input offset current
(

I

IO

) is the leakage current of the CMOS input gate.

HALT Mode

The analog comparator is functional during

HALT

mode. If

the interrupts are enabled, an interrupt generated by the
comparator causes a return from

HALT

mode.

STOP Mode

The analog comparator is disabled during

STOP

mode. The

comparator is powered down to prevent it from drawing any
current.

Low Voltage Protection.

An on-board Voltage Compar-

ator checks that the

V

CC

is at the required level to ensure

correct operation of the device. A reset is globally driven
if

V

CC

is below the specified voltage (Low Voltage Protec-

tion).

The device functions normally at or above 3.0V under all
conditions, and is guaranteed to function normally at supply
voltages above the Low Voltage Protection trip point. Be-
low 3.0V, the device functions normally until the Low Volt-