void lcd_init (void) { // 4 bit initialisation usleep(50000); // wait for >40ms lcd_send_cmd (0x30); usleep(4500); // wait for >4.1ms lcd_send_cmd (0x30); usleep(200); // wait for >100us lcd_send_cmd (0x30); usleep(200); lcd_send_cmd (0x20); // 4bit mode ...
unsignedcharTMPH,TMPL; voidTime0_Init() { TMOD=0x01; IE=0x82; TH0=0x4c; TL0=0x00; TR0=1; } /*** *名称:delay() *功能:延时函数 *输入:无 *输出:无
LCD_write_byte(0xC1); LCD_write_byte(0X30); LCD_write_cmd(0xED); LCD_write_byte(0x64); LCD_write_byte(0x03); LCD_write_byte(0X12); LCD_write_byte(0X81); LCD_write_cmd(0xE8); LCD_write_byte(0x85); LCD_write_byte(0x00); LCD_write_byte(0x79); LCD_write_cmd(0xCB); LC...
61sendDAT(dat); 62sendDAT(dat1); 63} 64//*** 65void initlcm(void) //初始化LCM 66{ 67delay(); 68sendCMD(0x30); //功能设置:一次送8位数据,基本指令集 69sendCMD(0x04); //点设定:显示字符/光标从左到右移位,DDRAM地址加一 70send...
IODIR1=0x00FF0000; } void lcd_init(void) { lcd_cmd(0x30); delay(0xffff); lcd_cmd(0x30); delay(0xffff); lcd_cmd(0x30); delay(0xffff); lcd_cmd(0x38); delay(0xffffff); lcd_cmd(0x0e); delay(0xffff); lcd_cmd(0x01); ...
voidsendcom(unsignedcharcmd); voidsenddata(unsignedchardat); voidchekbusy(void); voidsetxy(unsignedcharxpos,unsignedcharypos); voidprint(unsignedcharx,unsignedchary,char*str); voidprintstr(unsignedcharxpos,unsignedcharypos,unsignedcharstr[],unsignedcha: unsignedcharcodebuf[4]={0xbb,0xb6,0xd3,0x...
#define LCD_sendCMD 0x6C000000 5-FSMC初始化结构体 关于FSMC只介绍关键参数: ①FSMC结构初始化主要分为两个模块,时序初始化、整体FSMC初始化 1- FSMC结构初始化主要分为两个模块,时序初始化、整体FSMC初始化 配置好时序结构体后,再在整体初始化结构体中,进行地址传递,一起进行初始化 ...
void write_register(uint8_t cmd){ CLR_CS();CLR_CLK();CLR_SDA();SET_CLK();send_byte(cmd...
EN = 1; // Send enable pulse __delay_ms(1); EN = 0; } /* LCD INITIALIZATION BY INSTRUCTION */ void LCD_Init() { __delay_ms(100); LCD_Cmd(0x30); __delay_ms(5); LCD_Cmd(0x30); __delay_us(150); LCD_Cmd(0x30); ...
LCD_CmdWrite(0x08);} void LCD_DataWrite( char dat){ databus=dat; // Send the data to LCD...