Home > other >  LCD160160 (UC1698U) drive problem...
LCD160160 (UC1698U) drive problem...

Time:09-24

STM8 drive programs written STVD, LCD160160 (UC1698U), try for two nights, has always been show snow, snow, snow, completely don't understand this kind of LCD driver process, please, bosses guidance,

, every brother younger brother points less, considerate understanding   ,


# include "LCD160160. H"

Unsigned int l;
Void L_Delay (unsigned int t)
{
While (t -);
}

Void LCD160160_Init ()
{


L_Delay (50);
RES=1;
L_Delay (200);
RES=0;
L_Delay (200);
RES=1;
L_Delay (200);
Write_Com (0 xe2);//software reset, the control register values are reset to the default
L_Delay (200);//200 ms delay
L_Delay (200);//200 ms delay
Write_Com (0 x25);//temperature compensation Settings TC1TC0 01=- 0.05%
Write_Com (0 x2b);//PC0=1 load 13 nf LCD LCD 22 or less or less nf PC1=1 to start the internal booster to 10 * DC - DC to produce the required VLCD, cannot be changed after opening show PC1 value,
Write_Com (0 xa6);//A6 closed negative display Settings A7 open negative
Write_Com (0 xa4);//functions of A4 shut down the whole show a5 open all show
Write_Com (0 x81);//set the LCD contrast
Write_Com (0 xd1);//contrast voltage value of 0-255
Write_Com (0 xe9);//this instruction set the bias than LCD driver,
Write_Com (0 xc0);//LCD image set 1 1 0 0 0 MY MX LC0 C0 - C7
Write_Com (0 xa1);//set the frame frequency 101000 LC4 LC3 A0 - A3
Write_Com (0 xd1);//display the data format set 1101000 lc5 D0 - D1
Write_Com (0 xd5);//1 1 0 0 1 LC7 LC6 D5, D6
Write_Com (0 xc8); Write_Com (0 x00);//11001000 + xxxNIV4 C8: fh NIV0 00 h - 1
Write_Com (0 xd8);//local display control set 84 h/85 h
Write_Com (0 xad);//10101 DC4 DC3 DC2 A8H - AFH 10101101

Write_Com (0 xf4); Write_Com (0 x25);//operation window left border (the starting column address) set
Write_Com (0 xf5); Write_Com (0 x00);//operation window border (starting line) address Settings
Write_Com (0 xf6); Write_Com (0 x5a);//operation window right boundary (end column address) set
Write_Com (0 xf7); Write_Com (0 x9f);//operating window border (end line address) set
Write_Com (0 xf8);//window operation mode setting
//Write_Com (0 x05); Write_Com (0 x12);
//Write_Com (0 x60); Write_Com (0 x70);
L_Delay (9000);
L_Delay (9000);


For (l=0; L<160 * 28; L++)
{

Write_Data (0 x00);//write 1 pixel, write pixel 2
Write_Data (0 x00);//write pixels 3, write pixel 4
Write_Data (0 x00);//write 5 pixels, write pixel 6
}

}

Void Write_Com (unsigned int Command)
{
CS=0;
CD=0;
WR=0;
RD=1;
L_Delay (800);
Lcd_Bus (Command);
WR=1;
CS=1;

}

Void Write_Data (unsigned int Ddata)
{
CS=0;//chip select
CD=1;//H: Data: L Command
WR=0;
RD=1;//Date rede
L_Delay (800);
Lcd_Bus (Ddata);
WR=1;//Date write
CS=1;
}

CodePudding user response:

I am a reference UC1698u - data book written in Chinese, are not sure this drive way, isn't that right,

CodePudding user response:

Very embarrassed, found some problems, the original is a microcontroller pins, there are two not is true od can only output output level is low, cannot output is high, the input state no pull-up resistors,,,
  • Related