A/D CONVERTER

S3C84E5/C84E9/P84E9

 

 

FPROGRAMMING TIP — Configuring A/D Converter

 

 

 

 

 

 

 

 

 

LD

P3CONH, #11111111B

; P3.7–P3.4 A/D Input MODE

 

LD

P3CONL, #11111111B

; P3.3–P3.0 A/D Input MODE

 

 

 

 

 

 

 

 

 

LD

ADCON, #00000001B

; Channel ADC0, fxx, Conversion start

AD0_CHK:

TM

ADCON, #00001000B

;

A/D conversion end EOC check

 

JR

Z, AD0_CHK

;

No

 

LD

AD0BUFH, ADDATAH

;

8-bit conversion data

 

LD

AD0BUFL, ADDATAL

;

2-bit conversion data

 

 

 

 

 

 

 

 

 

LD

ADCON, #00110001B

; Channel ADC3, fxx, Conversion start

AD3_CHK:

TM

ADCON, #00001000B

;

A/D conversion end EOC check

 

JR

Z, AD3_CHK

;

No

 

LD

AD3BUFH, ADDATAH

;

8-bit conversion data

 

LD

AD3BUFL, ADDATAL

;

2-bit conversion data

 

 

 

 

 

 

 

 

15-6

Page 287
Image 287
Samsung S3C84E5 user manual Programming TIP Configuring A/D Converter