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

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

单片机解密STM32 128128液晶屏驱动 UC1617S 控制器

  1. 单片机解密#include "128128driver.h"
  2. //#include "stm32f10x_gpio.h"
  3. //#include "stm32f10x_rcc.h"
  4. 单片机解密单片机解密#include "ziku.h"
  5. #include "chziku.h"
  6. 单片机解密#include "systick.h"


  7. /************* 定义函数变量******************************/

  8. void lcd_busy(void);
  9. void SysTick_Init(void);
  10. void lcd_clear(void);
  11. extern const struct typFont16 Font16lib[];
  12.                                                                                                                                                                                                                                                                                                                                                                                                                                             
  13. /**********************************************************
  14. ****************** 配置LCD写命令IO口**********************
  15. **********************************************************/
  16.   void lcd_writecmminit(void)
  17.   {       
  18.          GPIO_InitTypeDef GPIO_InitStructure;                                                                              //通用接口配置               
  19.          RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);                                              //使能PC引脚时钟                          
  20.      GPIO_InitStructure.GPIO_Pin = WR|RD;                                                                             //使能读写控制引脚
  21.      GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;                                                                 
  22.      GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;                                                         //推挽输出          
  23.          GPIO_Init(GPIOC, &GPIO_InitStructure);

  24.      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);                                                //使能PA引脚时钟
  25.          GPIO_InitStructure.GPIO_Pin = RS|RST|GPIO_Pin_5|GPIO_Pin_4;                    //使能控制引脚
  26.          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;                                                                 
  27.      GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;                                                         //推挽输出          
  28.          GPIO_Init(GPIOA, &GPIO_InitStructure);
  29.   }

  30. /**********************************************************
  31. ****************** 配置LCD写IO口**************************
  32. **********************************************************/
  33. void lcd_writeinit(void)
  34. {
  35.          GPIO_InitTypeDef GPIO_InitStructure;                                                                              //通用接口配置
  36.          RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE,ENABLE);                                                  //使能PE引脚时钟                                           
  37.      GPIO_InitStructure.GPIO_Pin = D7|D6|D5|D4|D3|D2|D1|D0;                            //使能IO口     
  38.      GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;                                                                 
  39.      GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;                                                        //推挽输出
  40.      GPIO_Init(GPIOE, &GPIO_InitStructure);  
  41.   }

  42. /**********************************************************
  43. ****************** 液晶写数据函数**************************
  44. **********************************************************/
  45. void write_lcddat(uint16_t da)                                                               //sm命令还是数据,命令还是数据
  46. {  
  47.   lcd_writecmminit();
  48.   lcd_writeinit();
  49.   PS1_L();                                                                  //8080协议
  50.   CSB_L();                                                                                                                                        //片选
  51.   Delay_us(2);                                                                                                                            //延时20us
  52.   RS_H();                                                                                                                                    //数据有效
  53.   RD_H();                                                                                       
  54.   WR_L();                                                                                                                                        //写控制命令
  55.   Delay_us(1);                                                                                                                               
  56.   GPIO_Write(GPIOE,(GPIOE->ODR&0x00ff)|(da<<8));
  57.   da=0;       
  58.   Delay_us(1);                                                                                                                                                  
  59.   WR_H();                                                                                 
  60.   Delay_us(1);
  61.   CSB_H();                                                                                                                                         
  62. }

  63. /**********************************************************
  64. ****************** 液晶写命令函数**************************
  65. **********************************************************/
  66. void write_lcdcom(uint16_t cm)
  67. {
  68.   lcd_writecmminit();
  69.   lcd_writeinit();
  70.   PS1_L();                                                                  //8080协议
  71.   CSB_L();                                                                                                                                        //片选
  72.   Delay_us(2);                                                                                                                            
  73.   RS_L();                                                                                                                                        //命令有效
  74.   RD_H();
  75.   WR_L();                                                                                                                                        //写控制命令
  76.   Delay_us(1);          
  77.   GPIO_Write(GPIOE,(GPIOE->ODR&0x00ff)|(cm<<8));                                                       
  78.   cm=0;                                                                                 
  79.   Delay_us(1);                                                                                                                                                                                                                                                                                                                                                        //_nop_();       
  80.   WR_H();
  81.   Delay_us(1);
  82.   CSB_H();
  83. }



联系方式

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

在线客服
热线电话

企业微信