芯片解密|单片机解密|IC解密|芯片破解|芯片复制| PCB抄板|软件开发

飞芯科技-芯片解密|单片机解密|IC解密|芯片破解|芯片复制| PCB抄板|软件开发

UG-2864HSWEG0或ssd1306与stm32源程序单片机解密

单片机源程序如下:

  1. 单片机解密#include "sys.h"
  2. 单片机解密#include "usart.h"
  3. 单片机解密#include "delay.h"
  4. //unsigned char a[10]="mengxinyu";
  5. unsigned char a[]={//孟
  6.         /*        0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m
  7.           0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e
  8.                
  9. 省略


  10. 0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x03,0x02,0x02,0x00,0x00,/*"?",2*/
  11. };
  12. void LCD_Init(void)        
  13. {
  14.   /*GPIO_InitTypeDef  GPIO_InitStruct;
  15.         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
  16.   
  17.   GPIO_InitStruct.GPIO_Pin  = GPIO_Pin_6;
  18.   GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
  19.   GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
  20.         GPIO_Init(GPIOB, &GPIO_InitStruct);
  21.         
  22.         GPIO_InitStruct.GPIO_Pin  = GPIO_Pin_7;
  23.         GPIO_Init(GPIOB, &GPIO_InitStruct);
  24.         
  25.         GPIO_InitStruct.GPIO_Pin  = GPIO_Pin_8;
  26.         GPIO_Init(GPIOB, &GPIO_InitStruct);
  27.         
  28.         GPIO_InitStruct.GPIO_Pin  = GPIO_Pin_9;
  29.         GPIO_Init(GPIOB, &GPIO_InitStruct);

  30.         
  31.         GPIO_WriteBit(GPIOB,GPIO_Pin_6,0) ;
  32.         GPIO_WriteBit(GPIOB,GPIO_Pin_7,0) ;
  33.         GPIO_WriteBit(GPIOB,GPIO_Pin_8,0) ;
  34.         GPIO_WriteBit(GPIOB,GPIO_Pin_9,0) ;*/
  35.         RCC->APB2ENR|=1<<3;     //使能PORTB时钟
  36.       GPIOB->CRL&=0X00000000;
  37.           GPIOB->CRL|=0X33FFFFFF;
  38.           GPIOB->CRH&=0X00000000;
  39.           GPIOB->CRH|=0XFFFFFF33;         
  40.       GPIOB->ODR|=0XFFFFFFFF;
  41.                         
  42. }
  43. void comdate(int h,unsigned char data)//0命令 1数据
  44. {
  45.         int i;
  46.         if(h==0)
  47.                 PBout(6)=0;
  48.         else
  49.                 PBout(6)=1;
  50.         PBout(9)=0;
  51.         for(i=0;i<8;i++)
  52.         {
  53.                 if(data&0x80)
  54.                 PBout(8)=1;
  55.     else
  56.         PBout(8)=0;
  57.     PBout(9)=1;            
  58.     PBout(9)=0;   
  59.     data<<=1;
  60.         }
  61. }
  62. void chushihua(void)
  63. {
  64.                         comdate(0,0xae);//close 屏
  65.       comdate(0,0x00);//write low address
  66.       comdate(0,0x10);//write high address
  67.                         comdate(0,0xaf);//开屏
  68.         
  69.                         /*        comdate(0,0x2E);        
  70.         comdate(0,0x26);        // 26/27 light right
  71.         comdate(0,0x00);        
  72.         comdate(0,0x00);        
  73.         comdate(0,0x07);        
  74.         comdate(0,0x07);        
  75.         comdate(0,0x00);        
  76.         comdate(0,0xFF);        
  77.         comdate(0,0x2F);*/
  78. }
  79. void LCD_Set_Pos(unsigned char x, unsigned char y)
  80. {
  81.   comdate(0,0xb0+y);
  82.   comdate(0,((x&0xf0)>>4)|0x10);
  83.   comdate(0,(x&0x0f)|0x01);
  84. }
  85. void xianshi(unsigned char x,unsigned char y)
  86. {
  87.         int i,j;
  88.         int q;
  89.         /*for(i=0;i<64;i++)
  90.         {
  91.                 comdate(1,a[i]);
  92.                 //for(i=0;i<8;i++);
  93.                 if(i>0&&i%16==0)
  94.                 {
  95.                         y=y+1;
  96.                         x+=8;
  97.                 }
  98.         }*/
  99.         for(i=0;i<2;i++)
  100.         {
  101.         for(j=0;j<32;j++)
  102.         {
  103.                 LCD_Set_Pos(j,i);
  104.                 comdate(1,a[q++]);
  105.         }
  106. }



联系方式

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

在线客服
热线电话

企业微信