Datasheets»National Semiconductor (acquired by TI (Texas Instruments))»ADC0801 Datasheet

ADC0801 Datasheet - Page 24

Download or read online National Semiconductor ADC0801 8-Bit Microprocessor Compatible A/D Converters pdf datasheet.
Also see for ADC0801: Datasheet #2 (41 pages)



Page
24 of 36
prevnext
Functional Description
(Continued)
SAMPLE PROGRAM FOR FIGURE 14 ADC0801-MC6800 CPU INTERFACE
0010
DF 36
DATAIN
0012
CE 00 2C
0015
FF FF F8
0018
B7 50 00
001B
0E
001C
3E
CONVRT
001D
DE 34
001F
8C 02 0F
0022
27 14
0024
B7 50 00
0027
08
0028
DF 34
002A
20 F0
002C
DE 34
INTRPT
002E
B6 50 00
0031
A7 00
0033
3B
0034
02 00
TEMP1
0036
00 00
TEMP2
0038
CE 02 00
ENDP
003B
DF 34
003D
DE 36
003F
39
Note 1 In order for the microprocessor to service subroutines and interrupts the stack pointer must be dimensioned in the user’s program
FIGURE 15 ADC0801 – MC6820 PIA Interface
STX
TEMP2
Save contents of X
LDX
$002C
Upon IRQ low CPU
STX
$FFF8
jumps to 002C
STAA
$5000
Start ADC0801
CLI
WAI
Wait for interrupt
LDX
TEMP1
CPX
$020F
Is final data stored
BEQ
ENDP
STAA
$5000
Restarts ADC0801
INX
STX
TEMP1
BRA
CONVRT
LDX
TEMP1
LDAA
$5000
Read data
STAA
X
Store it at X
RTI
FDB
$0200
Starting address for
data storage
FDB
$0000
LDX
$0200
Reinitialize TEMP1
STX
TEMP1
LDX
TEMP2
RTS
Return from subroutine
To user’s program
24
TL H 5671 – 25

Comments to this Datasheet