IBM EM78P259N/260N manual AD power on

Models: EM78P259N/260N

1 89
Download 89 pages 38.24 Kb
Page 56
Image 56

EM78P259N/260N

8-Bit Microprocessor with OTP ROM

RETI

 

INITIAL:

; To define P50 as an analog input

MOV A,@0B00000001

MOV AISR,A

; To select P50 as an analog input channel, and

MOV A,@0B00001000

MOV ADCON,A

AD power on

; To define P50 as an input pin and set clock

En_ADC:

rate at fosc/16

; To define P50 as an input pin, and the others

MOV A, @0BXXXXXXX1

IOW PORT5

; are dependent on applications

MOV A, @0BXXXX1XXX

; Enable the ADWE wake-up function of ADC, “X”

MOV RE,A

by application

; Enable the ADIE interrupt function of ADC,

MOV A, @0BXXXX1XXX

IOW C_INT

“X” by application

; Enable the interrupt function

ENI

BS ADCON, ADRUN

; Start to run the ADC

;If the interrupt function is employed, the following three lines may be ignored

;If Sleep:

SLEP

;

;(User program section)

;

or

 

;If Polling:

 

POLLING:

; To check the ADRUN bit continuously;

JBC ADCON, ADRUN

JMP POLLING

; ADRUN bit will be reset as the AD conversion

 

is completed

;

;(User program section)

;

50 •

Product Specification (V1.2) 05.18.2007

 

(This specification is subject to change without further notice)

Page 56
Image 56
IBM EM78P259N/260N manual AD power on