NHD-0108BZ-RN-GBW-ND Contrast Problem

Comments

3 comments

  • 7b_w

    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
  • Sergio_M

    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
  • pla.electro

    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.