NHD-0108BZ-RN-GBW-ND Contrast Problem
Hello,
I can initialize the display and print text no problem, but the text is very dim. I have a voltage divider stepping 5V down to 0.65V on my PCB...measuring this pin on my PCB before plugging the display in reads 0.6V. When I plug in the ribbon cable to the display, this pin raises to 1.2V. I changed the voltage divider to be 1V, upon plugging the display in, it raises to 2V. This is the only pin that changes voltage with the display unplugged from the PCB versus plugged in. Thus, I have no idea how to properly set to contrast voltage. I don't have the appropriate trimmer in stock.
I checked for shorts in the ribbon cable, everything is good. I measured each pin on the display with it plugged in and powered on:
Pin 1 = 0V
Pin2=5V
Pin 3 =1.2V (connecting the display changes this from 0.6 to 1.2V)
Any suggestions?
-
Inputting 0.3V to the contrast pin gets doubled by the display to 0.6V which now makes the text readable.
But why is the display changing the voltage? I know my board and ribbon cable are fine..checked them both extensively.0 -
Pin 3 of the display is tied to the bias voltage circuit which you can see on page 29 of the controller datasheet. The 0.6V for optimal contrast specified in the display datasheet is what you should be measuring with the display (load) connected. Another thing you can do is simply tie pin 3 to Ground (0V) however you would lose any tunability by this approach.
0 -
We are unable to write CGRAM of the display
standard characters are displayed properly on the display
see the code below:unsigned char code c_gucPerHr[9] = {0X14,0X14,0X14,0X17,0X15,0X15,0X15,0X15};
void main()
{
LCD_Buffer[14] =0x00;
SetLCDCharPatt(0x40,c_gucPerHr);
}
void SetLCDCharPatt(unsigned char CGRamAdd,unsigned char ChrPatt[8])
{
unsigned char j;
write4Bitcmd(0x00);
delay_low();
write4Bitcmd(CGRamAdd); /*Addr. Counter set to CGRAM Addr.*/
dly1();
delay_low();
delay_low();
write4Bitcmd( 0x00);
delay_low();
for(j=0;j<=7;j++)
{
write4Bitdata( ChrPatt[j]);
dly1();
delay_low();
}
}
void write4Bitdata(unsigned char u8_data)
{
P0 = (P0 & 0x0F )| ((u8_data) & 0XF0); // Write HI nibble
LCD_DATAORCMD = 1;
LCD_CS = 1;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
LCD_CS = 0;
P0 = (P0 & 0x0F )| ((u8_data <<4 ) & 0Xf0); //Write lower nibble
LCD_DATAORCMD = 1;
LCD_CS = 1;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
LCD_CS = 0;
}
void write4Bitcmd(unsigned char u8_cmd)
{
P0 = (P0 & 0x0F )| ((u8_cmd) & 0xF0); // Write HI nibble
LCD_DATAORCMD = 0;
LCD_CS = 1;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
LCD_CS = 0;
P0 = (P0 & 0x0F )| ((u8_cmd << 4 ) & 0XF0); //Write lower nibble
LCD_DATAORCMD = 0;
LCD_CS = 1;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
LCD_CS = 0;
}
void delay_low(void)
{
unsigned char delay_data;
delay_data = 0xFF;
while(delay_data)
{
--delay_data;
}
}
void dly2(void)
{
unsigned char del;
del = 0x0A;
while(del)
{
del--;
}
}0
Please sign in to leave a comment.
Comments
3 comments