#include //51芯片管脚定义头文件
#include //内部包含延时函数 _nop_();
#define uchar unsigned char
#define uint unsigned int
uchar code FFW[8]={0x01,0x03,0x02,0x06,0x04,0x0c,0x08,0x09}; //四相八拍正转编码
uchar code REV[8]={0x09,0x08,0x0c,0x04,0x06,0x02,0x03,0x01}; 四相八拍反转编码
sbit K1 = P3^2; //正转
sbit K2 = P3^3; //反转
sbit K3 = P3^4; //停止
sbit BEEP = P3^6; //蜂鸣器
/********************************************************/
/*
/* 延时t毫秒
/* 11.0592MHz时钟,延时约1ms
/*
/********************************************************/
void delay(uint t)
{
uint k;
while(t--)
{
for(k=0; k<125; k++)
{ }
}
}
/**********************************************************/