文件名称:ultra-sonic
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [ASM] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- lawr****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
--- -3.2 TIMER DELAY
#include <sfr51.inc>
--- --- -----MAIN PROGRAM
MAIN:
MOV R6,#1 Ajustment:R6 start at #1
ACALL PWM_SETUP
ACALL PWM
SJMP MAIN
PWM_SETUP: 11.0592M/12/256/240/30 = 2SEC
MOV TMOD,#10H timer1, mode1
MOV TH0,#16 ---------SET DELAY VALUE
MOV TL0,#00 11.0592M/12/256/240/30 = 2SEC
RET
PWM:
SETB TR1
JNB F0,DO_LOW FLAG(F0) TO INDICATE DO_LOW/HIGH
DO_HIGH:
JNB TF1,$ WAIT FOR TF1 SET
DJNZ R6,LEAVE LEAVE FROM SUBROUTINE IF R6 NOT ZERO
SETB P1.0
MOV R6,#24 Ton=6/30=80 --------3.2 TIMER DELAY
#include <sfr51.inc>
-----------------MAIN PROGRAM
MAIN:
MOV R6,#1 Ajustment:R6 start at#1
ACALL PWM_SETUP
ACALL PWM
SJMP MAIN
PWM_SETUP: 11.0592M/12/256/240/30 = 2SEC
MOV TMOD,#10H timer1, mode1
MOV TH0,#16 ---------SET DELAY VALUE
MOV TL0,#00 11.0592M/12/256/240/30 = 2SEC
RET
PWM:
SETB TR1
JNB F0,DO_LOW FLAG(F0) TO INDICATE DO_LOW/HIGH
DO_HIGH:
JNB TF1,$ WAIT FOR TF1 SET
DJNZ R6,LEAVE LEAVE FROM SUBROUTINE IF R6 NOT ZERO
SETB P1.0
MOV R6,#24 Ton=6/30=80
#include <sfr51.inc>
--- --- -----MAIN PROGRAM
MAIN:
MOV R6,#1 Ajustment:R6 start at #1
ACALL PWM_SETUP
ACALL PWM
SJMP MAIN
PWM_SETUP: 11.0592M/12/256/240/30 = 2SEC
MOV TMOD,#10H timer1, mode1
MOV TH0,#16 ---------SET DELAY VALUE
MOV TL0,#00 11.0592M/12/256/240/30 = 2SEC
RET
PWM:
SETB TR1
JNB F0,DO_LOW FLAG(F0) TO INDICATE DO_LOW/HIGH
DO_HIGH:
JNB TF1,$ WAIT FOR TF1 SET
DJNZ R6,LEAVE LEAVE FROM SUBROUTINE IF R6 NOT ZERO
SETB P1.0
MOV R6,#24 Ton=6/30=80 --------3.2 TIMER DELAY
#include <sfr51.inc>
-----------------MAIN PROGRAM
MAIN:
MOV R6,#1 Ajustment:R6 start at#1
ACALL PWM_SETUP
ACALL PWM
SJMP MAIN
PWM_SETUP: 11.0592M/12/256/240/30 = 2SEC
MOV TMOD,#10H timer1, mode1
MOV TH0,#16 ---------SET DELAY VALUE
MOV TL0,#00 11.0592M/12/256/240/30 = 2SEC
RET
PWM:
SETB TR1
JNB F0,DO_LOW FLAG(F0) TO INDICATE DO_LOW/HIGH
DO_HIGH:
JNB TF1,$ WAIT FOR TF1 SET
DJNZ R6,LEAVE LEAVE FROM SUBROUTINE IF R6 NOT ZERO
SETB P1.0
MOV R6,#24 Ton=6/30=80
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ultra sonic.asm