文件名称:DCMotor
介绍说明--下载内容来自于网络,使用问题请自行百度
ADC EQU 35H
CLOCK BIT P2.4 定义ADC0808时钟位
ST BIT P2.5
EOC BIT P2.6
OE BIT P2.7
PWM BIT P3.7
ORG 00H
SJMP START
ORG 0BH
LJMP INT_T0
START: MOV TMOD,#02H
MOV TH0,#20
MOV TL0,#00H
MOV IE,#82H
SETB TR0
WAIT: CLR ST
SETB ST
CLR ST 启动AD转换
JNB EOC,$ 等待转换结束
SETB OE
MOV ADC,P1 读取AD转换结果
CLR OE
SETB PWM PWM输出
MOV A,ADC
LCALL DELAY
CLR PWM
MOV A,#255
SUBB A,ADC
LCALL DELAY
SJMP WAIT
INT_T0: CPL CLOCK 提供ADC0808时钟信号
RETI
DELAY: MOV R6,#1
D1: DJNZ R6,D1
DJNZ ACC,D1
RET
END-fgfdsg
CLOCK BIT P2.4 定义ADC0808时钟位
ST BIT P2.5
EOC BIT P2.6
OE BIT P2.7
PWM BIT P3.7
ORG 00H
SJMP START
ORG 0BH
LJMP INT_T0
START: MOV TMOD,#02H
MOV TH0,#20
MOV TL0,#00H
MOV IE,#82H
SETB TR0
WAIT: CLR ST
SETB ST
CLR ST 启动AD转换
JNB EOC,$ 等待转换结束
SETB OE
MOV ADC,P1 读取AD转换结果
CLR OE
SETB PWM PWM输出
MOV A,ADC
LCALL DELAY
CLR PWM
MOV A,#255
SUBB A,ADC
LCALL DELAY
SJMP WAIT
INT_T0: CPL CLOCK 提供ADC0808时钟信号
RETI
DELAY: MOV R6,#1
D1: DJNZ R6,D1
DJNZ ACC,D1
RET
END-fgfdsg
相关搜索: EoC
(系统自动生成,下载前可以参看下载内容)
下载文件列表
69 DC Motor/Backup Of DC Motor.DBK
69 DC Motor/DC Motor
69 DC Motor/DC Motor.asm
69 DC Motor/DC Motor.DSN
69 DC Motor/DC Motor.hex
69 DC Motor/DC Motor.lnp
69 DC Motor/DC Motor.LST
69 DC Motor/DC Motor.M51
69 DC Motor/DC Motor.OBJ
69 DC Motor/DC Motor.Opt
69 DC Motor/DC Motor.plg
69 DC Motor/DC Motor.PWI
69 DC Motor/DC Motor.Uv2
69 DC Motor/DC Motor_Uv2.Bak
69 DC Motor/Last Loaded DC Motor.DBK
69 DC Motor
69 DC Motor/DC Motor
69 DC Motor/DC Motor.asm
69 DC Motor/DC Motor.DSN
69 DC Motor/DC Motor.hex
69 DC Motor/DC Motor.lnp
69 DC Motor/DC Motor.LST
69 DC Motor/DC Motor.M51
69 DC Motor/DC Motor.OBJ
69 DC Motor/DC Motor.Opt
69 DC Motor/DC Motor.plg
69 DC Motor/DC Motor.PWI
69 DC Motor/DC Motor.Uv2
69 DC Motor/DC Motor_Uv2.Bak
69 DC Motor/Last Loaded DC Motor.DBK
69 DC Motor
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.