LCD_RST=1; //不复位 lcd_write_cmd(0x30); delay(5); lcd_write_cmd(0x0c); //开显示,不显示光标 delay(5); lcd_write_cmd(0x06); //写一个字符后地址指针自动加1 delay(5); lcd_write_cmd(0x01); //清屏 delay(5); } //=== //主函数函数 void main() { // uchar i; lcd_init...
//检测LCD是否处于忙状态, 若忙返回1, 空闲返回0 bit checkBusy() { bit busy; RS = 0; RW = 1; E = 1; delayUs(); busy = (bit)(LCD_DATA&0x80); E = 0; urn busy; } //等待LCD到空闲 void wait() { (checkBusy()); } //写命令 void writeCmd(uchar cmd) { wait(); RS = ...
LCD_Write_Cmd(0x38); // Function Set. 8bit data length, 2-line, 5*8 font 147 LCD_Delay_5ms(); 148 LCD_Write_Cmd(0x0C); // Display ON/OFF Control. Display ON, Cursor OFF, Blink OFF 149 LCD_Delay_5ms(); 150 LCD_Write_Cmd(0x01); // Display Clear. 151 LCD_Delay_5ms();...
Lcd_WriteCmd(0x01); //清除显示,并且设定地址指针为00H delayms(20);}/***显示汉字***/void hanzi_Disp(uchar x,uchar y,uchar *s){ //x、y为汉字坐标 Lcd_WriteCmd(addr_tab[8*x+y]); //写地址 while(*s>0) { Lcd_WriteData(*s); //写数据 s++; }}/***显示图片(显示Gdram内容)...
T2CON=0x04; while(num--) { while(!TF2) TF2=FALSE; } TR2=FALSE; } void delay_us(unsigned char num) { unsigned char i; for (i=0;i<num;i++) { } } //FileName:lcd.h #ifndef __LZP_LCD_H_ #define __LZP_LCD_H_ #include "reg52.h" ...
LCD_WriteCmd(0x00C0);LCD_WriteData(0x002C); //LCMCTRL: LCM Control LCD_WriteCmd(0x00...
LCD_Write_Cmd(0x2b);LCD_Write_Data(y1 >> 8);LCD_Write_Data(y1);LCD_Write_Data(y2 >> 8);LCD_Write_Data(y2);LCD_Write_Cmd(0x2C);}/*** @brief写半个字的数据到 LCD** @paramcmd需要发送的数据** @return void*/void LCD_Write_HalfWord(const u16 da){u8 data[2] = {0};data...
LCD液晶屏已编写写指令函数LcdWriteCmd(unsigned char Cmd),写数据函数为LcdWriteData(unsigned char Dat)。 如果写入的数据在1602液晶屏的第二排,第3位开始显示需要在LcdWriteCmd( )中填入的命令为( ) A、0X40 B、0X03 C、0X43 D、0X42 点击查看答案 第3题 4、如果写入的数据在1602液晶屏的第二排,第...
else LCD_Write_Byte(0xA0); LCD_Write_cmd(0x3A); // 图像数据格式 LCD_Write_Byte(0x05); // 16位数据帧 LCD_Write_cmd(0xB2); // Porch Setting LCD_Write_Byte(0x0C); // Back porch in normal mode LCD_Write_Byte(0x0C); // Front porch in normal mode LCD_Write_Byte(0x00); /...
#define LCD_WR_BYTE(Data) SPI1_WriteByte(Data)void LCD_WR_Cmd(u8 Data); //发送命令 ...