Newhaven Products > Graphic LCDs

NHD-C12864LZ-FSW-FBW-3V3

(1/2) > >>

alexandra:
Hello, I use a LCD NHD-C12864LZ-FSW-FBW-3V3 ( ST7565R-G controller).
I use the SPI transmission, with the STM32VLDISCOVERY board (STM32F100RB).
When I do initialization appear few pixels ON after "DISPLAY ON = 0xAF" command.
I use this function for clear the screen.
""void glcd_blank(void)
 {
     uint8_t p, c;
         for(p = 0; p < 8; p++)
         {
             lcd_cmd_out(CMD_SET_PAGE | p);
             for(c = 0; c < 129; c++)
             {
                 lcd_cmd_out(CMD_SET_COLUMN_LOWER | (c & 0xf));
                 lcd_cmd_out(CMD_SET_COLUMN_UPPER | ((c >> 4) & 0xf));
                 lcd_data_out(0x0);
             }
         }
}"
and it works but ... not it works other function "lcd_cmd_out(CMD_SET_ALLPTS_ON); // 0xA5" the screen is clear, it nothing happens.
Can you help me ? 

Michael_L:
Can you try toggling sending commands A4 and A5 in 1 second intervals?  Do you see the pixels changing?  What about if you send A6 or A7 beforehand?

alexandra:
I tried to send, but does not change the pixels, these is my commands for initialization:

"void lcd_init(void)
{
   LCD_A0_L();
   LCD_N_CS1_L();
    LCD_N_RES_L();
   delay_ms(500);

   // Do a hard reset of the LCD display controller
     LCD_N_RES_H();

     //comm
     lcd_cmd_out(CMD_INTERNAL_RESET); // Soft reset
     lcd_cmd_out(CMD_SET_BIAS_9);      // SET BIAS 1/9
     lcd_cmd_out(CMD_SET_ADC_NORMAL); // ADC segment driver direction (Normal )
     lcd_cmd_out(CMD_SET_COM_REVERSE); // COM DIRECTION - REVERSE
     lcd_cmd_out(CMD_SET_RESISTOR_RATIO); // Resistor ratio
     lcd_cmd_out(CMD_SET_POWER_CONTROL); // Power control set
     lcd_cmd_out(CMD_SET_VOLUME_FIRST); // Electronic volume mode set
     lcd_cmd_out(CMD_SET_VOLUME_SECOND); // Electronic volume register set
     lcd_cmd_out(CMD_SET_DISP_START_LINE); // Operating mode

     // After display on appear few pixels ON .....
     lcd_cmd_out(CMD_DISPLAY_ON); // Display ON/OFF - set to ON

     delay_ms(1000);
     lcd_cmd_out(CMD_SET_DISP_NORMAL); // A6
     delay_ms(1000);
     lcd_cmd_out(CMD_SET_DISP_NORMAL); // // A7
     delay_ms(1000);

     lcd_cmd_out(CMD_SET_ALLPTS_NORMAL);// A4
     delay_ms(1000);
     lcd_cmd_out(CMD_SET_ALLPTS_ON); //A5 HERE ALL THE PIXELS ARE ON
     delay_ms(1000);
}
//glcd_blank();

That's why I used glc_blank function after initialization. But after this function does not work anymore else.

Michael_L:
So, with your setup and initialization, you are able to write pixel data to the display successfully?  It seems you are able to clear the screen by writing 0's, but are not able to use those particular commands.  Can you write all 1's to the display to see if you are able to turn all the pixels on that way?  Do you have another display to try those commands that aren't working for you?

alexandra:
When I used the function:
"void lcd_init(void)
{
    LCD_A0_L();
    LCD_N_CS1_L();
     LCD_N_RES_L();
    delay_ms(500);
    // Do a hard reset of the LCD display controller
      LCD_N_RES_H();

      //comm
      lcd_cmd_out(CMD_INTERNAL_RESET); // Soft reset
      lcd_cmd_out(CMD_SET_BIAS_9);       // SET BIAS 1/9
      lcd_cmd_out(CMD_SET_ADC_NORMAL); // ADC segment driver direction (Normal )
      lcd_cmd_out(CMD_SET_COM_REVERSE); // COM DIRECTION - REVERSE
      lcd_cmd_out(CMD_SET_RESISTOR_RATIO); // Resistor ratio
      lcd_cmd_out(CMD_SET_POWER_CONTROL); // Power control set
      lcd_cmd_out(CMD_SET_VOLUME_FIRST); // Electronic volume mode set
      lcd_cmd_out(CMD_SET_VOLUME_SECOND); // Electronic volume register set
      lcd_cmd_out(CMD_SET_DISP_START_LINE); // Operating mode

      // After display on appear few pixels ON
      lcd_cmd_out(CMD_DISPLAY_ON); // Display ON/OFF - set to ON
      delay_ms(1000); // 1 second
      lcd_cmd_out(CMD_SET_ALLPTS_ON); // All pixels ON
}"
Appear few pixels ON. (Attach photo)
But after 1 second the command "CMD_SET_ALLPTS_ON" = 0xA5 it works. (Attach photo)

Because of this, I used this function (after lcd_init(void);):
"void glcd_blank(void)
 {
     uint8_t p, c;
         for(p = 0; p < 8; p++)
         {
             lcd_cmd_out(CMD_SET_PAGE | p);
             for(c = 0; c < 129; c++)
             {
                 lcd_cmd_out(CMD_SET_COLUMN_LOWER | (c & 0xf));
                 lcd_cmd_out(CMD_SET_COLUMN_UPPER | ((c >> 4) & 0xf));
                 lcd_data_out(0x0);
             }
         }
 }"
But when I used "glcd_blank();" the screen is clear, but another function not working.
For example I want use command "CMD_SET_ALLPTS_ON = 0xA5" after "glcd_blank();". No it works.

I not have another LCD for test.

Navigation

[0] Message Index

[#] Next page

Go to full version