基于單片機(jī)的步進(jìn)電機(jī)驅(qū)動電路設(shè)計(jì)
MOV 21H,#01H
AJMP QUIT
LOOP7: MOV P1,#0C0H
MOV 20H,#01H
MOV 21H,#80H
AJMP QUIT
;***************電機(jī)反轉(zhuǎn)*****************
FAN: JB 08H,LOOQ0
JB 09H,LOOQ1
JB 0AH,LOOQ2
JB 0BH,LOOQ3
JB 0CH,LOOQ4
JB 0DH,LOOQ5
JB 0EH,LOOQ6
JB 0FH,LOOQ7
LOOQ0: MOV P1,#0A0H
MOV 21H,#02H
MOV 20H,#40H
AJMP QUIT
LOOQ1: MOV P1,#0E0H
MOV 21H,#04H
MOV 20H,#20H
AJMP QUIT
LOOQ2: MOV P1,#0C0H
MOV 21H,#08H
MOV 20H,#10H
AJMP QUIT
LOOQ3: MOV P1,#0D0H
MOV 21H,#10H
MOV 20H,#08H
AJMP QUIT
LOOQ4: MOV P1,#050H
MOV 21H,#20H
MOV 20H,#04H
AJMP QUIT
LOOQ5: MOV P1,#070H
MOV 21H,#40H
MOV 20H,#02H
AJMP QUIT
LOOQ6: MOV P1,#030H
MOV 21H,#80H
MOV 20H,#01H
AJMP QUIT
LOOQ7: MOV P1,#0B0H
MOV 21H,#01H
MOV 20H,#80H
QUIT: RETI
END
4.結(jié)論
該驅(qū)動器經(jīng)實(shí)驗(yàn)驗(yàn)證能驅(qū)動0.5N.m的步進(jìn)電機(jī)。將驅(qū)動部分的電阻、電容及續(xù)流二極管的有關(guān)參數(shù)加以調(diào)整,可驅(qū)動1.2N.m的步進(jìn)電機(jī)。該驅(qū)動器電路簡單可靠,結(jié)構(gòu)緊湊,對于I/O口線與單片機(jī)資源緊張的系統(tǒng)來說特別適用。
光電開關(guān)相關(guān)文章:光電開關(guān)原理
評論