精选优质文档-倾情为你奉上#include #define uchar unsigned char#define uint unsigned int #define ulong unsigned long#define CLK_WISE 0/顺时针方向转动#define INVERSE 1/逆时针方向转动bit direction=CLK_WISE;/*方向标志,取值为CLK_WISE 或INVERSE*/static uchar speedcount=0;/加速标志,越大转速越快,最大到7,然后回归到0,循环。/程序中可以依据它来改变占空比uchar step8=0x01,0x09,0x08,0x0c,0x04,0x06,0x02,0x03;/8个步uchar th_08=0x5D,0x85,0x9E,0xAE,0xBA,0xC2,0xC9,0xCF;/8个定时器值,高8位uchar tl_08=0x3D,0xEE,0x58,0x9E,0x3E,0xF7,0x