单片机 饮水机课程设计Word下载.docx
- 文档编号:13330968
- 上传时间:2022-10-09
- 格式:DOCX
- 页数:18
- 大小:132.28KB
单片机 饮水机课程设计Word下载.docx
《单片机 饮水机课程设计Word下载.docx》由会员分享,可在线阅读,更多相关《单片机 饮水机课程设计Word下载.docx(18页珍藏版)》请在冰豆网上搜索。
(10)二极管(DIODE)
(11)继电器(G5CLE-14-DC24)
(12)绿色发光二极管(LED-GREEN)
(13)直流电机模型(MOTOR)
(14)电阻(RES)
(15)排阻(RX8)
(16)带锁单刀按钮(SW-SPDT)
(17)达林顿三极管(TIPP112)
(18)中功率三极管(ZTX550)
四.电路设计及电路图
1.电路设计
(1)两电动机的驱动与控制电路
(2)24V和5V的电源电路
(3)其余部分为单片机89C2051控制电路
2.电路图
五.程序
LOWPBITP3.0
HIGHPBITP3.1
QBRUSHBITP3.2
INWFBITP3.3
BRUSHBITP3.4
LABABITP3.7
T01EQU32H
T02EQU33H
T03EQU34H
T011EQU35H
ORG00H
AJMPMAIN
ORG0BH
RETI
ORG1BH
AJMPT1F
ORG0030H
D1S:
MOVR1,#5
SJMPD501
D50MS:
MOVR1,#1
D501:
MOVR2,#200
MOVR7,#0
D50MS1:
DJNZR7,$
MOVTL0,#0
MOVTH0,#0
DJNZR2,D50MS1
DJNZR1,D501
RET
BRUSHF:
MOVP1,#1DH
CLR21H
ACALLD1S
JNBLOWP,BSH0
LJMPBAOJIN
BSH0:
SETBBRUSH
SETBINWF
SETBLABA
MOVR6,#60
MOVR5,#10
MOVTL1,#LOW(15536)
MOVTH1,#HIGH(15536)
SETBTR1
SETB22H
CLR23H
BSH1:
MOVTL0,#0
SETBLOWP
JNBLOWP,BSH2
ACALLD1S;
BSH2:
JNB23H,BSH1
CJNER6,#0,BSH1
BSH3:
MOVR4,#0
MOVP3,#8FH
CLR22H
MAIN:
MOVP3,#87H
SETBTR0
CLRTR1
MOVP1,#1DH
MOVA,P3
MOV36H,A
CJNEA,36H,MAIN
MOV24H,#0
MOVSP,#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SHT
JNB24H,T1F0
LJMPT1F2
T1F0:
INCR3
CJNER3,#10,WTD2
JB20H,WTD2
MOVA,R4
MOVDPTR,#TAB
MOVCA,@A+DPTR
MOVP1,A
INCR4
CJNER4,#7,WTD2
WTD2:
INCT01
MOVA,T01
JNZT1F1
INCT02
T1F1:
MOVA,T02
CJNEA,#HIGH(11970),T1F2
MOVA,T01;
CJNEA,#LOW(11970),T1F2
INCT03
INCT011
T1F2:
POPPSW
POPACC
BRSHT:
DJNZR5,T1F2
CPL21H
JNB21H,T0F1
MOVP1,#0FFH
SJMPT0F2
T0F1:
T0F2:
DJNZR6,T1F2
SETB23H
SJMPT1F2
LJMP7FDH
ORG7FDH
LJMPMAIN
END
六.调试与仿真
1.PROTEUS电路设计
根据图一所示的原理图及元器件列表,在PROTEUSISIS中进行电路设计。
完成后的结果如图二所示,以文件名Z1253
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 单片机 饮水机课程设计 饮水机 课程设计