s3c72m9 Samsung Semiconductor, Inc., s3c72m9 Datasheet - Page 349

no-image

s3c72m9

Manufacturer Part Number
s3c72m9
Description
The S3c72m5/s3c72m7/s3c72m9 Single-chip Cmos Microcontroller Has Been Designed For High Performance Using Samsung S
Manufacturer
Samsung Semiconductor, Inc.
Datasheet
S3C72M5/C72M7/C72M9/P72M9 (Preliminary Spec)
F
The following code converts the analog voltage input at the CIN0–CIN2 pins into 4-bit digital code.
WAIT0
WAIT1
WAIT2
PROGRAMMING TIP — Programming the Comparator
BITR
LD
LD
LD
LD
LD
LD
LD
INCS
JR
LD
DECS
JR
CPSE
JR
LD
EMB
A,#7H
P4MOD,A
EA,#0CXH
CMOD,EA
L,#1H
W,A
A,#0H
A
WAIT2
A,CMPREG
L
WAIT1
A,W
WAIT0
P2,A
; Analog input selection (CIN0–CIN2)
; x = 0–F, comparator enable
; Internal reference, conversion time (30.5 µs at 4.19 MHz)
; Read the result
; Output the result from port 2
COMPARATOR
14-5

Related parts for s3c72m9