Home > other >  LCD screen
LCD screen

Time:09-26

Someone met this kind of situation, please ask the great spirit guide
Between two English letters will come up to a random characters
Don't know what went wrong

CodePudding user response:

The original poster check writing characters on the LCD screen position if there is any overlap,

CodePudding user response:

Usually this kind of situation, you use the LCD is a character? Check if it is, you increase the amount of write your address is correct,

CodePudding user response:

Before the driver function is normal but I have to use the bus driver is so clear the screen and screen clearing function is a flower of

CodePudding user response:

reference Little_sugar reply: 3/f
before the driver function is normal but I have to use the bus driver is so clear the screen and screen clearing function is a flower of

The building Lord, please change before and after the procedure to Chou Chou,

CodePudding user response:

Like not yet refreshed clean

CodePudding user response:

This is I now use bus control program (24 MHZ)
# define LCD_ReadCommand 0 x80da
# define LCD_WriteCommand 0 x80d8
# define LCD_ReadData 0 x80db
# define LCD_WriteData 0 x80d9
Unsigned char Lcd_CheckBusy (void)
{
Unsigned char Busy;
Busy=* ((unsigned char xdata *) LCD_ReadCommand) & amp; 0 x80.
Return Busy;
}

Void LCD_WrCmd unsigned char (CMD)
{
While (Lcd_CheckBusy ());
LCD_WriteCommand) * ((unsigned char xdata *)=CMD;
}
Void LCD_WrDat unsigned char (dat)
{
While (Lcd_CheckBusy ());
LCD_WriteData) * ((unsigned char xdata *)=dat;
}



Void LCD_SetDDRAM (unsigned char (adr)
{
LCD_WrCmd (0 x80 | adr);
}
Void LCD_DisAscll (unsigned char c)
{
LCD_WrDat (c);
}


Void LCD_DisString (unsigned char * STR)
{
While (* STR!='\ 0')
{
Str++ LCD_DisAscll (*);
}
}
This is the previous program
Unsigned char Lcd_CheckBusy (void)
{
Unsigned char Busy;
LcdData=https://bbs.csdn.net/topics/0xff;
RS=0;
RW=1;
E=1;
_nop_();
Busy=LcdData& 0 x80.
E=0;
Return Busy;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
? OLCDD 'e? X?? Uey? Y
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Void Lcd_WriteData (unsigned char Data)
{
While (Lcd_CheckBusy ());
RS=1;
RW=0;
E=0;
_nop_();
_nop_();
LcdData=https://bbs.csdn.net/topics/Data;
E=1;
_nop_();
_nop_();
E=0;
}

CodePudding user response:

This is the screen clearing function but clear finish is spent
Void Lcd_Clear (unsigned char Mode)
{
Unsigned char x, y, ii;
unsigned char Temp;
If (Mode % 2==0)
Temp=0 x00;
The else
Temp=0 XFF;
Lcd_WriteCmd x36 (0);//a? 3??????? A? ?? I??? E?
For (ii=0; Ii<9. Ii +=8)
For (y=0; Y<0 x20. Y++)
For (x=0; x<8; X++)
{
EA=0;
Lcd_WriteCmd (y + 0 x80);//DD mu????
Lcd_WriteCmd (x + 0 x80 + ii);//aD mu????
Lcd_WriteData (Temp);//D 'ey? Y D15 on - D8
Lcd_WriteData (Temp);//D 'ey? Y D7 on - do
EA=1;
}
Lcd_WriteCmd (0 x30);
}

CodePudding user response:

The building Lord, modify the reference clock frequency before and after the program? If not, may be Lcd_WriteData (unsigned char Data) of the delay time is not enough, add a few more _nop_ (),
  • Related