beautypg.com

Analog comparators, Comparator description, Figure 56 – Zilog Z86193 User Manual

Page 75

background image

Z8

®

CPU

User Manual

UM001604-0108

Input/Output Ports

68

Analog Comparators

Select Z8 devices include two independent on-chip analog comparators. See the device
product specification for feature availability and use. Port 3, Pins P31, and P32 each has a
comparator front end. The comparator reference voltage, pin P33, is common to both com-
parators. In analog mode, the P31, and P32 are the positive inputs to the comparators and
P33 is the reference voltage supplied to both comparators. In digital mode, pin P33 can be
used as a P33 register input or IRQ1 source. P34, P35, or P37 may output the comparator
outputs by software-programming the PCON Register bit D0 to 1.

Comparator Description

Two on-board comparators process analog signals on P31 and P32 with reference to the
voltage on P33. The analog function is enabled by programming the Port 3 Mode Register
(P3M bit 1). For interrupt functions during analog mode, P31 and P32 are programmable
as rising, falling, or both edge triggered interrupts (IRQ register bits 6 and 7).

P33 cannot generate an external interrupt while in this mode. P33 can only generate inter-
rupts in DIGITAL mode.

Figure 56. Port 3 Mode Reset

0 0 0 0 0 0 0 0

(Write-Only)

0 P31, P32 Digital Mode

1 P31, P32 Analog Mode

0 P32 = Input P35 = Output

1 P32 = DAV0/RDY0 P35 = RDY0/DAV0

0 Port 2 Open-Drain

1 Port 2 Push–Pull

00 P33 = Input P34 = Output

01 P33 = Input P34 = DM

Port 3 Mode Register (P3M)

Register F7h

10 P33 = Input P34 = DM

11 P33 = DAV1/RDY1 P34 = RDY1/DAV1

0 P31 = Input P36 = Output

1 P32 = DAV2/RDY2 P36 = RDY2/DAV2

0 P30 = Input P37 = Output

1 P30 = Serial In P37 = Serial Out

0 Parity OFF

1 Parity ON

Note: