Author Topic: NHD-C12864LZ-FSW-FBW-3V3  (Read 3527 times)

alexandra

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
NHD-C12864LZ-FSW-FBW-3V3
« on: January 12, 2015, 09:33:53 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: NHD-C12864LZ-FSW-FBW-3V3
« Reply #1 on: January 12, 2015, 05:18:52 PM »
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

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: NHD-C12864LZ-FSW-FBW-3V3
« Reply #2 on: January 13, 2015, 09:26:02 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: NHD-C12864LZ-FSW-FBW-3V3
« Reply #3 on: January 14, 2015, 09:58:59 AM »
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

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: NHD-C12864LZ-FSW-FBW-3V3
« Reply #4 on: January 14, 2015, 11:24:28 AM »
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.

alexandra

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: NHD-C12864LZ-FSW-FBW-3V3
« Reply #5 on: January 14, 2015, 11:39:32 AM »
If you want, I attach my project or send it by mail.

 

Power Supply Range NHD-C12864LZ-FSW-FBW-3V3

Started by zhangdanqunBoard Graphic LCDs

Replies: 1
Views: 1872
Last post April 19, 2016, 08:08:46 AM
by Paul_B
NHD-C12864LZ in parallel mode initializing

Started by marienBoard Graphic LCDs

Replies: 0
Views: 715
Last post May 08, 2017, 09:02:21 AM
by marien
NHDev support for NHD-C12864LZ-FSW-FBW-3V3

Started by AriBoard Evaluation Tools

Replies: 2
Views: 1083
Last post January 30, 2017, 04:23:57 AM
by Ari
NHD-C12864LZ-FSW-FBW-3V3

Started by cRash1001Board Graphic LCDs

Replies: 0
Views: 1605
Last post February 12, 2016, 03:03:21 AM
by cRash1001