智能小车的制作

时间:2016-06-28 14:51:58
【文件属性】:

文件名称:智能小车的制作

文件大小:10KB

文件格式:RAR

更新时间:2016-06-28 14:51:58

程序

c程序/******************************************************************************** * 描述: * * lcd1602显示 遥控键值读取器 * * lcd1602显示 遥控器接p3.2 * * 喇叭接p1.5 继电器接p1.4 * * 17(40h)键按下,继电器吸合。19(04h)键按下,继电器关闭。 * * 连接方法:使用红外功能时 J1跳线短接 * ********************************************************************************/ #include #include #define uchar unsigned char #define uint unsigned int void delayus (uint us);//电机延时程序 void dianji(); //电机驱动 sbit key1=P2^0; sbit key2=P2^1; sbit key3=P2^2; sbit key4=P2^3; sbit key5=P2^4; sbit key6=P2^5; sbit led=P3^0; sbit led1=P3^1; uchar code zheng[48]={0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9,0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9,0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9,0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9,0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9,0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9};//电机正转表 uchar code fan[48]={0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1,0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1,0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1,0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1,0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1,0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1};//电机反转表 uchar Y0; uchar flag=0; /*******************************************************************/ void main() { led=1; led1=0; while(1)dianji(); } void delayus (uint us) { uint i,j; for (i=0;i


【文件预览】:
简易遥控小车
----yaokong.LST(5KB)
----yaokong.OBJ(2KB)
----12.plg(122B)
----12.lnp(41B)
----12.M51(7KB)
----12_Opt.Bak(961B)
----12.Opt(961B)
----12.hex(1KB)
----12(2KB)
----12.Uv2(2KB)
----12_Uv2.Bak(2KB)
----yaokong.c(2KB)

网友评论

相关文章