English
Language : 

Z8F082ASH020SC Datasheet, PDF (140/244 Pages) Zilog, Inc. – Z8 Encore XP-R F08xA Series with eXtended Peripherals
Z8 Encore! XP® F08xA Series
Product Specification
122
Comparator
Overview
The Z8 Encore! XP® F08xA Series devices feature a general purpose comparator that
compares two analog input signals. A GPIO (CINP) pin provides the positive comparator
input. The negative input (CINN) may be taken from either an external GPIO pin or an
internal reference. The output is available as an interrupt source or can be routed to an
external pin using the GPIO multiplex. Features include:
• 2 inputs which can be connected up using the GPIO multiplex (MUX)
• 1 input can be connected to a programmable internal reference
• 1 input can be connected to the on-chip temperature sensor
• Output can be either an interrupt source or an output to an external pin
Operation
One of the comparator inputs may be connected to an internal reference which is a user
selectable reference that is user programmable with 200 mV resolution.
The comparator may be powered down to save on supply current. See the Power Control
Register 0 on page 29 for details.
Caution: 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 follow-
ing example shows how to safely enable the comparator:
di
ld cmp0
nop
nop
; wait for output to settle
clr irq0 ; clear any spurious interrupts pending
ei
PS024705-0405
PRELIMINARY
Comparator