DJNZ DJNZ
R6,$ R7,$ BUZZ
AJMP
EXINT1: PUSH PSW
;外部中断1服务子程序
PUSH CLR MOV MOVX MOV SETB POP
POP
RETI TIME0: CLR MOV MOV MOV MOVX SETB RETI ;
END
ACC
EX0
DPTR,#AD0809
A,@DPTR
DAT0809,A
EX0 ACC PSW
TR0 TH0,#TIME0H TL0,#TIME0L DPTR,#AD0809
@DPTR,A
TR0
;读取A/D转换结果
;存放数据
;定时器0中断时间可换算为模拟量采样频率 ;赋初值
;重新启动A/D转换
Page 17 of 17