资源描述:
《《格力空调遥控》doc版》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、经过本人几天的努力,格力空调遥控诞生了,有兴趣的可以转载,附有原理图和PCB,以及源码上图为PCB三维图板效果以上为原理图 /************************************************************************-- Copyright(c) UESTCWangShijing---------------**----------------------------------------------------------------------** ProjectName:air_co
2、nditioner** ProjectDate:May9,2010 ** ProjectAuth:Wangshijing** Description:ThisprojectisjustfortheGreeAir_conditionerinfraredremote** controller** **----------------------------------------------------------------------** Revision:** Da
3、te: ** Notes:-----------------------------------------------------------------------**********************************************************************/#include#include#defineucharunsignedchar#defineuint unsignedint//#include"Infrared.h" //justforthe
4、Greeair_conditioner#defineenTransmitt flag=1#definedisTransmitt flag=0sfr T2MOD =0XC9;sbitir=P1^2;sbitIR38k=P1^0;sbitspeaker=P3^7; #definekeyboard P2bit flag=0;sbitkey1=P3^0;sbitkey2=P3^1;sbitkey3=P3^2;sbitkey4=P3^3;uintcount=0,set_count=0;//=============================
5、=================ucharfengliang_value=0;ucharkey_value=0;ucharwendu_value=0;ucharmode_value=0;ucharswitch_value=0;ucharzhuanye_value=0;ucharcodezhuanye[][5]={{0x39,0x04,0x00,0x50,0x02},{0x79,0x04,0x00,0x50,0x02}}; // 手动,自动转页(20度,冷气)/*ucharcode fengliang[][5]={
6、 {0x5b,0x0e,0x00,0x50,0x02},{0x6b,0x0e,0x00,0x50,0x02}, {0x7b,0x0e,0x00,0x50,0x02} }; */ucharcode fengliang[][5]={{0x28,0x08,0x00,0x50,0x02},{0x19,0x08,0x00,0x50,0x02}, {0x09,0x08,0x00,0x50,0x02} }
7、;//自动模式风量小,中,大 (20度)ucharcode mode[][5]={ {0x58,0x00,0x00,0x50,0x02},{0x59,0x04,0x00,0x50,0x02}, {0x5a,0x04,0x00,0x50,0x02},{0x5b,0x04,0x00,0x50,0x02} }; //自动,冷气,除湿,送风/*ucharcode on_or_off[][5]={{0x40,0x00,0x00,0x50,0x02},{0x
8、48,0x00,0x00,0x50,0x02}}; */ucharcode on_or_off[][5]={ {0x39,0