文件名称:ultra-sonic
介绍说明--下载内容来自于网络,使用问题请自行百度
--- -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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.