Z8
®
CPU
User Manual
UM001604-0108
Input/Output Ports
71
Comparator Programming
Example of enabling analog comparator mode.
X
= any binary number
Example of enabling analog comparator output.
Figure 60. Port 3 Configuration
LD P3M, #XXXX XX1Xb
LD RP, #%0Fh
;Sets register
pointer to
;working register
group 0
;and Expanded
Register
;File Bank F.
PIN
P37
0 P34, P37 Standard Output
1 P34, P37 Comparator Output
D0
P37 OUT
PCON
P32
REF (P33)
+
-
PIN
P34
P34 OUT
P31
REF (P33)
+
-