S1C6S3N2 TECHNICAL SOFTWARE
EPSON
II-101
CHAPTER 5: PERIPHERAL CIRCUITS (Analog Comparator)
With OSC1 as the CPU clock, this program sets the AMP
circuit to ON, allows a delay, reads the result into A register,
and sets the circuit to OFF.
LD
X,0F7H
;
LD
MX,0001B
;
LD
A,0FH
;
AMDLLP:ADD
A,0FH
;
JP
NZ,AMDLLP ;
LD
A,MX
;
LD
MX,1110B
;
AMP circuit ON
Delay: Preparation
Delay loop
Load the result to A register
AMP circuit OFF
With OSC3 as the CPU clock, this program sets the AMP
circuit to ON, allows a delay, reads the result into A register,
and sets the circuit to OFF.
(1) Setting the analog comparator ON and OFF, and reading data
(when OSC1 is running)
(2) Setting the analog comparator ON and OFF, and reading data
(when OSC3 is running)
LD
X,0F7H
;
LD
MX,0001B
;
LD
Y,54H
;
AMDLLP:ADD
Y,0FH
;
JP
NZ,AMDLLP ;
LD
A,MX
;
AND MX,1110B
;
AMP circuit ON
Delay: Preparation
Delay loop
Load the result to A register
AMP circuit OFF
The delay is made to allow the output to stabilize.
The delay is made to allow the output to stabilize.
Note To keep the current consumption low, set the analog com-
parator to OFF when it is not needed.
Example of program
for analog
comparator
Specifications
Program
Program
Note
Note
Specifications
Summary of Contents for S1C6S3N2
Page 4: ......
Page 6: ......
Page 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Page 8: ......
Page 141: ...Software Software S1C6S3N2 II Technical Software ...
Page 142: ......
Page 146: ......