基于單片機的步進電機驅(qū)動電路設計
MOV 21H,#01H
AJMP QUIT
LOOP7: MOV P1,#0C0H
MOV 20H,#01H
MOV 21H,#80H
AJMP QUIT
;***************電機反轉(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.結論
該驅(qū)動器經(jīng)實驗驗證能驅(qū)動0.5N.m的步進電機。將驅(qū)動部分的電阻、電容及續(xù)流二極管的有關參數(shù)加以調(diào)整,可驅(qū)動1.2N.m的步進電機。該驅(qū)動器電路簡單可靠,結構緊湊,對于I/O口線與單片機資源緊張的系統(tǒng)來說特別適用。
光電開關相關文章:光電開關原理
評論