AT89C2051的AD转换应用实例

[复制链接]
查看1647 | 回复0 | 2011-9-7 22:54:26 | 显示全部楼层 |阅读模式
<




At89c2051 Successive Approximation A-to-D conversion

NAME SA_ADC_Test

; Test program to loop on Successive Approximation A-to-D conversion.
; Allows digital codes and resulting DAC output to be viewed on "scope.


DSEG AT 0020H

ORG 0060H ; stack origin
stack: DS 0020H ; stack depth


CSEG

ORG 0000H ; power on/reset vector
jmp on_reset

ORG 0003H ; external interrupt 0 vector
reti ; undefined

ORG 000BH ; timer 0 overflow vector
reti ; undefined

ORG 0013H ; external interrupt 1 vector
reti ; undefined

ORG 001BH ; timer 1 overflow vector
reti ; undefined

ORG 0023H ; serial I/O interrupt vector
reti ; undefined

ORG 0040H ; begin constant data space

ORG 0080H ; begin code space
USING 0 ; register bank zero
on_reset:
mov sp, #(stack-1) ; initialize stack pointer

mov IE, #0 ; deactivate all interrupts
mov a, #0ffh ; deactivate output ports
mov p1, a ;
mov p3, a ;
本新闻共4页,当前在第1页 [1] [2] [3] [4]
热帖推荐
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则