28BYJ-48步進電機加ULN2003驅(qū)動的51單片機的代碼
#include
#define uint unsigned int
#define ucher unsigned char
unsigned char code ZZ[8]={0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08};//28BYJ-48正時鐘旋轉(zhuǎn)相序表
unsigned char code FZ[8]={0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09};//28BYJ-48逆時鐘旋轉(zhuǎn)相序表
void delay(unsigned int n)//毫秒級延時
{
}
void BGdelay(unsigned int n)//步進延時
{
}
void main(void)//入口函數(shù)
{
}
評論