help required in GLCD interfacing with microcontroller

Status
Not open for further replies.
Just give me the link for the product to buy. Mention the part number.

please check post #18 for the links. part number: EA DOGM128W-6

- - - Updated - - -

have you checked the voltage across capacitor make sure internal booster circuit work with your configuration as already suggested by FvM sir.IF you have 1uf capacitor ( box type) then replace and check them instead of tantalum capacitor.
voltages are measured on the LCD w.r.t ground
Pin 21: 7.58V
Pin 22: 6.75V
Pin 23: 5.90V
Pin 24: 1.703V
Pin 25: 0.853V
Pin 26: 0V
Pin 27: 1.642V
Pin 28: 7.87V
Pin 29: 4.77V
Pin 30: 1.644V
Pin 31: 10.96V
Pin 32: 12.47V
Pin 33: 0V
Pin 34: 3.3V
Pin 35: 3.3V
Pin 36: 3.3V
Pin 37: 0V
Pin 38: 0V
Pin 39: 3.3V
Pin 40: 3.3V

Why pin 38 is 0V. It should be +3.3V right?
 

Pin 40 is CS (active low) and you getting 3.3v it should be 0voltage and A0is high only for write operation for other its should be 0v.
Pin39 is reset is must be also active low see the attached image.

- - - Updated - - -

sorry pin 39 is ok.it is giving good voltage 3.3v
 

Attachments

  • PIN_output.JPG
    57.3 KB · Views: 88
Last edited:

The measured voltages show that you managed to configure the boost converter correctly during initialization. This is only possible of the SPI interface is basically working.
 

Thanks guys for all your help. Finally i turned ON some pixels on the graphic lcd by changing some initialization commands.

How to turn 8x8 pixels ON?
How to select the page address and column address?
 

my initialization is,
Code:
glcd_command(0x40);	// Display start line set
//glcd_command(0xA0);	// ADC Normal
//glcd_command(0xC8);	// COM REVERSE


glcd_command(0xA1);	// ADC REVERSE
glcd_command(0xC0);	// COM NORMAL

glcd_command(0xA6);		// DISP NORMAL
glcd_command(0xA2);		// LCDBIAS 9
glcd_command(0x2F);		// Power control

glcd_command(0xF8);		// Booster Ratio
glcd_command(0x27);		// voltage regulator set
glcd_command(0x81);		// SETCONTRAST
glcd_command(0xAC);		// Static indicator
glcd_command(0xAF);		// Display ON

in the main loop, i write something like
Code:
		glcd_command(0xB0);   // page 0
		glcd_command(0x00);		// column 
		glcd_data(0xFF);     // data

But it is not turning on the first column.

Which command to clear the ram memory? it is always displaying some random pixels.
 

Code:
  glcd_command(0x40);	// Display start line set
//glcd_command(0xA0);	// ADC Normal
//glcd_command(0xC8);	// COM REVERSE


glcd_command(0xA1);	// ADC REVERSE
glcd_command(0xC0);	// COM NORMAL

glcd_command(0xA6);		// DISP NORMAL
glcd_command(0xA2);		// LCDBIAS 9
glcd_command(0x2F);		// Power control

glcd_command(0xF8);		// Booster Ratio
glcd_command(0x00);	
glcd_command(0x27);		// voltage regulator set
glcd_command(0x81);		// SETCONTRAST
glcd_command(0x16);		// 
glcd_command(0xAC);		// Static indicator
glcd_command(0x00);		// 
glcd_command(0xAF);


try this initialization and for clear the data you have to send data 0x00 with the column and row address with the page number.
 

Attachments

  • ST7565-LCD-master.zip
    221.9 KB · Views: 72
Last edited:

Thank you ud23.

I tried the below code to clear the screen. But the screen is clearly completely. Why is it so?
Code:
void clear_screen()
{
   unsigned int16 p = 0, c = 0;

   for(p = 0; p < 8; p++) 
   {
      glcd_command(0xB0 | p);

      for(c = 0; c < 129; c++) 
      {
         glcd_command(0x10 | (c & 0xf));
         glcd_command(0x00 | ((c >> 4) & 0xf));
         glcd_data(0x00);
      }     
   }
}
 

Code:
for(c = 0; c < 129; c++) 
      {
         glcd_command(0x10 | (c & 0xf));
         glcd_command(0x00 | ((c >> 4) & 0xf));
         glcd_data(0x00);
      }

128x64 means 128 column 64 row and you are clearing all so its clear all the LCD.
 

Sorry for the typo at post #30.

LCD was not clearing completely with that clear_screen() function. Why is it so?

Also, I have tried to display a character on display at page 0. It is working good.

But when i tried to display another character. It is displaying at some other position. Please help

Code:
Code:
		glcd_command(0xB0);
         glcd_command(0x10 | (0 & 0xf));        
		 glcd_command(0x00 | ((0 >> 4) & 0xf));
		for(i = 0; i < 8; i++)   
		{
			glcd_data(data1[i]);    // to display a character
		}

		i = 0;
		glcd_command(0xB0);
         glcd_command(0x10 | (1 & 0xf));
         glcd_command(0x00 | ((0 >> 4) & 0xf));
		for(i = 0; i < 8; i++)   
		{
			glcd_data(data2[i]);   // to display another character
		}
 

Code:
	glcd_command(0xB0);
         glcd_command(0x10 | (0 & 0xf));        
		 glcd_command(0x00 | ((0 >> 4) & 0xf));
		for(i = 0; i < 8; i++)   
		{
			glcd_data(data1[i]);    // to display a character
		}

		i = 0;
		glcd_command(0xC0);
         glcd_command(0x10 | (1 & 0xf));
         glcd_command(0x00 | ((0 >> 4) & 0xf));
		for(i = 0; i < 8; i++)   
		{
			glcd_data(data2[i]);   // to display another character
		}


You are printing the 2 char at same address with sending same command with just different data. try to change the address for other char as above code.
 

Thank you ud23.

I have played with this graphic LCD and displayed some characters and numbers. I have a floating point value eg. 1000.0100

To extract the values before the decimal point, I have used the below method.
value4 = (value/1000)%10; // Extract Thousands Digit
value3 = (value/100)%10; // Extract Hundreds digit
value2 = (value/10)%10; // Extract Tens digit
value1 = value%10; // Extract One's digit

How to extract after the decimal place values? Or any other appropriate method is there.
 

I wonder if your C compiler doesn't have any means for float number formating like sprintf()?

If not, it's quite simple to scale your float variable to a decimal fixed point number
Code:
float xf;
long xl;
xl = 10000*xf;
 

I tried using sprintf. Thank you FVM.

I am trying to create a font for characters and numbers. What could be the best width and height for the character. Please specify.

I tried to draw for 16 x 16. Characters are looking odd. Or do you have any library for different font sizes
 

I am back here with a small problem.

I had played with this graphic LCD and tried to display lot of things. It all works well.

But the only problem is, whenever i power on the LCD, it displays the previously stored data which is available in the memory of the LCD. For example: When i power on the LCD, and display "HELLO" for 1sec and clearing the screen and displaying "world".
When I disconnect the power and establish the power again, it display "world" then clearing the screen (Because on every startup i am clearing the screen), then "HELLO" and "world".

How to clear it? Please help
 

you have to clear LCD in its initialization routine and it must be execute the any other things write to LCD.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…