芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密

飞芯科技提供芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密逆向服务

12864红外遥控万年历单片机源代码IC解密

IC解密采用芯片:STC89C16RD+(只要大于22K以上的单片机都是可以的),红外接收采用了VS/HX1838,走时正常,改了下控制器的地址。单片机源程序如下:

  1. /*****************************************************************************************************************/
  2. //12864液晶万年历 时钟2010年最新 V8版本

  3. //增加了24C02接口,具有开机界面记忆功能、闹钟时间可以掉电保存功能
  4. //V8.0版本主要特点为三种风格界面显示,功能更强大
  5. /****************************************************************************************************************/
  6. //头文件
  7. #include <AT89X52.h>
  8. #include <string.h>
  9. #include <intrins.h> //包含_nop_()延时函数
  10. #ifndef uchar
  11. #define uchar unsigned char
  12. #endif

  13. #ifndef uint
  14. #define uint  unsigned int
  15. #endif

  16. #include "SoundPlay.h"
  17. #include "ds1302.h"
  18. #include "ds18b20.h"
  19. #include "24c02.h"
  20. #include "lcd12864.h"
  21. #include "tl1838.h"

  22. /*****************************************************************************/
  23. //键盘引脚定义
  24. //sbit KEY_1 = P2^7;  //左上,在音乐文件SoundPlay.h中已定义
  25. sbit KEY_2 = P2^6;         //左下
  26. sbit KEY_3 = P2^5;         //右上
  27. sbit KEY_4 = P2^4;         //右下
  28. /****************************************************************************/
  29. //定义全局变量
  30. unsigned char yy,mo,dd,xq,hh,year,year1;//定义时间映射全局变量(专用寄存器)
  31. unsigned char shi,ge,sec_temp,min_temp,hour_temp,secl,selx,e=0,hh1,mm1,mm,ss,n,t;
  32. char xdata n1,n2;
  33. bit w = 0; //调时标志位
  34. uchar c_sun,year_sun,month_sun,day_sun; //农历
  35. /******************************************************************************/
  36. /*--  一幅图像 KISS- 正向取模,字节正序*/     
  37. /*--  宽度x高度=128x64  --*/
  38. /******************************************************************************/
  39. uchar code powerOnPhoto []={
  40.   
  41. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  42. 0xFF,0xFF,0xFF,0x9F,0x00,0x00,0x0F,0x0E,0x00,0x00,0x00,0x00,0x19,0xFF,0xFF,0xFF,

  43. …………限于本文篇幅 余下字库代码请从51黑下载附件…………

  44. uchar code  powerOnPhoto1[]={    //此处为小东电子图片代码,可以更改为你喜欢的图片代码

  45. /*--  调入了一幅图像:F:\小东电子.bmp  --*/
  46. /*--  宽度x高度=128x64  --*/


  47. //图片数字圆体

  48. //图片数字方体
  49. /******************************************************************************/

  50.          {// 图片" "
  51.      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  52.      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  53.      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  54.      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  55.                                                 };  
  56. /******************************************************************************/
  57. //农历代码
  58. /*
  59. 公历年对应的农历数据,每年三字节,
  60. 格式第一字节BIT7-4 位表示闰月月份,值为0 为无闰月,BIT3-0 对应农历第1-4 月的大小
  61. 第二字节BIT7-0 对应农历第5-12 月大小,第三字节BIT7 表示农历第13 个月大小
  62. 月份对应的位为1 表示本农历月大(30 天),为0 表示小(29 天)
  63. 第三字节BIT6-5 表示春节的公历月份,BIT4-0 表示春节的公历日期
  64. */
  65. /******************************************************************************/
  66. code uchar year_code[] = {
  67. 0x0C,0x96,0x45, //2000
  68. …………限于本文篇幅 字库代码请从51黑下载附件…………
  69. 0x2d,0x92,0xB5, //2099
  70. };
  71. ///月份数据表
  72. code uchar day_code1[9]={0x0,0x1f,0x3b,0x5a,0x78,0x97,0xb5,0xd4,0xf3};
  73. code uint day_code2[3]={0x111,0x130,0x14e};
  74. /*
  75. 函数功能:输入BCD阳历数据,输出BCD阴历数据(只允许1901-2099年)
  76. 调用函数示例:Conversion(c_sun,year_sun,month_sun,day_sun)
  77. 如:计算2004年10月16日Conversion(0,0x4,0x10,0x16);
  78. c_sun,year_sun,month_sun,day_sun均为BCD数据,c_sun为世纪标志位,c_sun=0为21世
  79. 纪,c_sun=1为19世纪
  80. 调用函数后,原有数据不变,读c_moon,year_moon,month_moon,day_moon得出阴历BCD数据
  81. */
  82. bit c_moon;
  83. data uchar year_moon,month_moon,day_moon,week;
  84. /*子函数,用于读取数据表中农历月的大月或小月,如果该月为大返回1,为小返回0*/
  85. bit get_moon_day(uchar month_p,uint table_addr)
  86. {
  87. uchar temp;
  88. switch (month_p)
  89. {
  90. case 1:{temp=year_code[table_addr]&0x08;
  91. if (temp==0)return(0);else return(1);}
  92. case 2:{temp=year_code[table_addr]&0x04;
  93. if (temp==0)return(0);else return(1);}
  94. case 3:{temp=year_code[table_addr]&0x02;
  95. if (temp==0)return(0);else return(1);}
  96. case 4:{temp=year_code[table_addr]&0x01;
  97. if (temp==0)return(0);else return(1);}
  98. case 5:{temp=year_code[table_addr+1]&0x80;
  99. if (temp==0) return(0);else return(1);}
  100. case 6:{temp=year_code[table_addr+1]&0x40;
  101. if (temp==0)return(0);else return(1);}
  102. case 7:{temp=year_code[table_addr+1]&0x20;
  103. if (temp==0)return(0);else return(1);}
  104. case 8:{temp=year_code[table_addr+1]&0x10;
  105. if (temp==0)return(0);else return(1);}
  106. case 9:{temp=year_code[table_addr+1]&0x08;
  107. if (temp==0)return(0);else return(1);}
  108. case 10:{temp=year_code[table_addr+1]&0x04;
  109. if (temp==0)return(0);else return(1);}
  110. case 11:{temp=year_code[table_addr+1]&0x02;
  111. if (temp==0)return(0);else return(1);}
  112. case 12:{temp=year_code[table_addr+1]&0x01;
  113. if (temp==0)return(0);else return(1);}
  114. case 13:{temp=year_code[table_addr+2]&0x80;
  115. if (temp==0)return(0);else return(1);}
  116. }
  117. }
  118. /*
  119. 函数功能:输入BCD阳历数据,输出BCD阴历数据(只允许1901-2099年)
  120. 调用函数示例:Conversion(c_sun,year_sun,month_sun,day_sun)
  121. 如:计算2004年10月16日Conversion(0,0x4,0x10,0x16);
  122. c_sun,year_sun,month_sun,day_sun均为BCD数据,c_sun为世纪标志位,c_sun=0为21世
  123. 纪,c_sun=1为19世纪
  124. 调用函数后,原有数据不变,读c_moon,year_moon,month_moon,day_moon得出阴历BCD数据
  125. */
  126. void Conversion(bit c,uchar year,uchar month,uchar day)
  127. { //c=0 为21世纪,c=1 为19世纪 输入输出数据均为BCD数据
  128. uchar temp1,temp2,temp3,month_p;
  129. uint temp4,table_addr;
  130. bit flag2,flag_y;
  131. temp1=year/16; //BCD->hex 先把数据转换为十六进制
  132. temp2=year%16;
  133. year=temp1*10+temp2;
  134. temp1=month/16;
  135. temp2=month%16;
  136. month=temp1*10+temp2;
  137. temp1=day/16;
  138. temp2=day%16;
  139. day=temp1*10+temp2;
  140. //定位数据表地址
  141. if(c==0)
  142. {
  143. table_addr=(year)*0x3;
  144. }



联系方式

地址:石家庄市新华区民族路77号华强广场D座2009
电话:0311-88816616/87087811
手机:13315190088
传真:0311-67901001
联系人:张工
网址:www.taihedz.cn
邮箱:feixindz@163.com
微信:xinpianjiemi
QQ:527263666/568069805

在线客服
热线电话

企业微信