English
Language : 

Z86E3016PSG Datasheet, PDF (121/348 Pages) Zilog, Inc. – Z86E3016PSG
Z8 CPU
User Manual
103
LD RP, #%0Fh
LD R0, #XXXX XXX1b
;Sets register pointer to
;working register group 0
;and Expanded Register
;File Bank F.
;Enables comparator
;outputs using PCON
;Register programming.
Comparator Operation
After enabling the Analog Comparator mode, P33 becomes a common
reference input for both comparators. The P33 (Ref) is hard wired to the
reference inputs to both comparators and cannot be separated. P31 and
P32 are always connected to the positive inputs to the comparators. P31 is
the positive input to comparator AN1 while P32 is the positive input to
comparator AN2. The outputs to comparators AN1 and AN2 are AN1-out
and AN2-out, respectively.
The comparator output reflects the relationship between the positive input
to the reference input.
Example
If the voltage on AN1 is higher than the voltage on Ref then AN1-out will
be at a high state. If voltage on AN2 is lower than the voltage on Ref then
AN2-out will be at a Low state. In this example, when the Port 3 register
is read, Bits D1 = 1 and D2 = 0. If the comparator outputs are enabled to
come out on P34 and P37, then P34 = 1 and P37 = 0. Please note that the
previous data stored in P34 and P37 is not disturbed. Once the comparator
outputs are de-selected the stored values in the P34 and P37 register bits
will be reflected on these pins again.
UM001602-0904
I/O Ports