51單片機(jī)驅(qū)動(dòng)步進(jìn)電機(jī)(含電路圖和源程序代碼)
源程序:stepper.c stepper.hex /* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */ #i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.h register unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n; unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400 /* flag1 mask byte 0x01 run cw() 0x02 run ccw() */
標(biāo)簽:
51單片機(jī)
驅(qū)動(dòng)
步進(jìn)電機(jī)
C語言
上傳時(shí)間:
2013-11-09
上傳用戶:釣鰲牧馬