资源预览内容
第1页 / 共9页
第2页 / 共9页
第3页 / 共9页
第4页 / 共9页
第5页 / 共9页
第6页 / 共9页
第7页 / 共9页
第8页 / 共9页
第9页 / 共9页
亲,该文档总共9页全部预览完了,如果喜欢就下载吧!
资源描述
/*/PT2314的音量调节, 高低音调节 ,声道选择, 静音, 红外遥控,/*/#includereg52.h#includeintrins.h#define uchar unsigned char#define uint unsigned int#define ulong unsigned long/*pt2314写入地址*/#define WriteDeviceAddress 0x88/*红外0/1代码时长定义*/#define Imax 14000#define Imin 8000#define Inum1 1450 #define Inum2 700#define Inum3 3000/*对应音量+, 音量-,高音+,高音-,低音+,低音- 静音,音源选择 */ /*菜单,静音,加,减,dvd,vcd,cd,aut*/#define Vol_Cut 0x08/*静音*/#define up 0x07#define down 0x0a#define menu_Choose 0x05/*包括 treble , bass, vol*/ /*#define vol_bass_up 0x05 遥控器的便捷扩展按键 #define vol_bass_down 0x06 #define vol_treble_up 0x03 #define vol_treble_down 0x04*/#define menu_road_Choose 0x03 /菜单选择包括了下面 按一下就跳变次 /* #define Choose_dvd 0x09 遥控器的便捷扩展按键 #define Choose_cd 0x10 #define Choose_mp3 0x11 #define Choose_mp4 0x12 */*显示定义*/unsigned char Bass=0x60;/unsigned char Treble=0x70;/#define vol 0x00;#define bass 0x60;#define treble 0x70;#define aud_Choose 0x40;/送到显示程序中的数组unsigned char tab_display=0x7c,0x3a,0xfe,0xfc,0x04;/C:0x9c D:0xfc V:0x7c o:0x3a B:0xfe A:0xee/共阴数MR6625显示 T:0x1e r:0x0eunsigned char code dis_code= 0xfc,/*0*/ 0x60,/*1*/ 0xDA,/*2*/ 0xF2,/*3*/ 0x66,/*4*/ 0xB6,/*5*/ 0xBE,/*6*/ 0xE0,/*7*/ 0xFE,/*8*/ 0xF6/*9*/ ;/unsigned char vol_iic=0,0,0,0x5c,0,0;/*vol,bass,treble,aud_Choose ,左声道静音量右声道静音量, 传到iiC的数据 */unsigned char Choose_vbt=38,8,8;/*vol,bass,vtreble 音量调节变量存储*/MR-6625 最后一位显示表格/unsigned char code MR_6625=0X20,0X01,0X02,0X04,0X08,0X10,0X40;/mp4,播放,暂停,DVD,CD,点,mp3 正 unsigned char code MR_6625=0X04,0X80,0X40,0X20,0X10,0X08,0X02;/mp4,播放,暂停,DVD,CD,点,mp3 反/音量表格/*unsigned char code vol_10db=0x00,0x08,0x10,0x18, 0x20,0x28,0x30,0x38;/10db增量unsigned char code vol_1_25db=0x00,0x01,0x02,0x03,0x04, 0x05,0x06,0x07; /1.25db增量*/unsigned char code vol_db=0x38|0x07,0x38|0x06,0x38|0x05,0x38|0x04,0x38|0x03,0x38|0x02,0x38|0x01,0x38|0x00, 0x30|0x07,0x30|0x06,0x30|0x05,0x30|0x04,0x30|0x03,0x30|0x02,0x30|0x01,0x30|0x00, 0x28|0x07,0x28|0x06,0x28|0x05,0x28|0x04,0x28|0x03,0x28|0x02,0x28|0x01,0x28|0x00, 0x20|0x07,0x20|0x06,0x20|0x05,0x20|0x04,0x20|0x03,0x20|0x02,0x20|0x01,0x20|0x00, 0x18|0x07,0x18|0x06,0x18|0x05,0x18|0x04,0x18|0x03,0x18|0x02,0x18|0x01,0x18|0x00, 0x10|0x07,0x10|0x06,0x10|0x05,0x10|0x04,0x10|0x03,0x10|0x02,0x10|0x01,0x10|0x00, 0x08|0x07,0x08|0x06,0x08|0x05,0x08|0x04,0x08|0x03,0x08|0x02,0x08|0x01,0x08|0x00, 0x00|0x07,0x00|0x06,0x00|0x05,0x00|0x04,0x00|0x03,0x00|0x02,0x00|0x01,0x00|0x00, ;/B/T调音声调表格unsigned char code Tiaoyin=0x00,0x01,0x02,0x03, 0x04,0x05,0x06,0x07, 0x0f,0x0e,0x0d,0x0c, 0x0b,0x0a,0x09,0x08;/32位编码接收存储unsigned char Im4=0x00,0x00,0x00,0x00;/unsigned long m,Tc;unsigned char IrOK; / 码是否正确的标识符unsigned char f;unsigned char flag;/unsigned char h;unsigned char MenuChoosem;unsigned char Numer;unsigned char MenuRoadChoosem;unsigned char Choose;unsigned char UpDown;unsigned char VolCutm;unsigned char ppp;/sbit m74HC164_DATA=P10;sbit m74HC164_CLK=P11;sbit Menu_high=P12;sbit Menu_low=P13;sbit Value_high=P14;sbit Value_low=P25;sbit Postion_Choose=P26;/sbit P17=P17;sbit a0=ACC0; /累加器做模拟串口传输的数据位定义/sbit K1=P20; sbit K2=P21; sbit K3=P22;sbit K4=P23;sbit K5=P24;/sbit SCL=P37;/总线端口设置sbit SDA=P36;/void Dely() unsigned char m,n,s; for(s=2;s0;s-) for(m=2;m0;m-)
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号