z8f0813 ZiLOG Semiconductor, z8f0813 Datasheet - Page 137

no-image

z8f0813

Manufacturer Part Number
z8f0813
Description
High-performance 8-bit Microcontrollers
Manufacturer
ZiLOG Semiconductor
Datasheet
Comparator
Operation
Comparator Control Register Definitions
PS024314-0308
Caution:
Comparator Control Register
Z8 Encore! XP
pares two analog input signals. A GPIO (
input. The negative input (
internal reference. The output is available as an interrupt source or can be routed to an
external pin using the GPIO multiplex. The features of Comparator include:
One of the comparator inputs can be connected to an internal reference which is a user
selectable reference that is user programmable with 200 mV resolution.
The comparator can be powered down to save on supply current. For details, see
Control Register 0
The Comparator Control register (CMPCTL) configures the comparator inputs and sets
the value of the internal voltage reference.
Because of the propagation delay of the comparator, it is not recommended to enable
the comparator without first disabling interrupts and waiting for the comparator output
to settle. Doing so can result in spurious interrupts after comparator enabling. The fol-
lowing example shows how to safely enable the comparator:
di
ld cmp0
nop
nop
clr irq0 ; clear any spurious interrupts pending
ei
Two inputs which can be connected up using the GPIO multiplex (MUX)
One input can be connected to a programmable internal reference
One input can be connected to the on-chip temperature sensor
Output can be either an interrupt source or an output to an external pin
®
; wait for output to settle
F0823 Series devices feature a general purpose comparator that com-
on page 32.
CINN
) can be taken from either an external GPIO pin or an
CINP
) pin provides the positive comparator
Z8 Encore! XP
Product Specification
®
F0823 Series
Comparator
Power
127

Related parts for z8f0813