芯片破解STM32 128128液晶屏驱动 UC1617S 控制器
- 芯片破解#include "128128driver.h"
- 芯片破解//#include "stm32f10x_gpio.h"
- 芯片破解//#include "stm32f10x_rcc.h"
- 芯片破解#include "ziku.h"
- 芯片破解#include "chziku.h"
- #include "systick.h"
- /************* 定义函数变量******************************/
- void lcd_busy(void);
- void SysTick_Init(void);
- void lcd_clear(void);
- extern const struct typFont16 Font16lib[];
-
- /**********************************************************
- ****************** 配置LCD写命令IO口**********************
- **********************************************************/
- void lcd_writecmminit(void)
- {
- GPIO_InitTypeDef GPIO_InitStructure; //通用接口配置
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE); //使能PC引脚时钟
- GPIO_InitStructure.GPIO_Pin = WR|RD; //使能读写控制引脚
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
- GPIO_Init(GPIOC, &GPIO_InitStructure);
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE); //使能PA引脚时钟
- GPIO_InitStructure.GPIO_Pin = RS|RST|GPIO_Pin_5|GPIO_Pin_4; //使能控制引脚
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
- GPIO_Init(GPIOA, &GPIO_InitStructure);
- }
- /**********************************************************
- ****************** 配置LCD写IO口**************************
- **********************************************************/
- void lcd_writeinit(void)
- {
- GPIO_InitTypeDef GPIO_InitStructure; //通用接口配置
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE,ENABLE); //使能PE引脚时钟
- GPIO_InitStructure.GPIO_Pin = D7|D6|D5|D4|D3|D2|D1|D0; //使能IO口
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
- GPIO_Init(GPIOE, &GPIO_InitStructure);
- }
- /**********************************************************
- ****************** 液晶写数据函数**************************
- **********************************************************/
- void write_lcddat(uint16_t da) //sm命令还是数据,命令还是数据
- {
- lcd_writecmminit();
- lcd_writeinit();
- PS1_L(); //8080协议
- CSB_L(); //片选
- Delay_us(2); //延时20us
- RS_H(); //数据有效
- RD_H();
- WR_L(); //写控制命令
- Delay_us(1);