This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CG RAM and DDRAm registers of LCD communicate with MSP430



I am working on LCD patterns through MSP430. According to the following website, when I set the registers starting from 0x40 to 0x48 and placing "Bell" pattern I will see a Bell on the display.

However, my program is showing something else! Meaning that I am not able to map the display in details. In other words, Only one charcter by character not pixle by pixle!

How I can do this?

The LCD is 8x2 and as I set LCD_command to 0x80 I can choose the leftmost top cell. 

I am confused between CG address and DD address.

http://www.8051projects.net/lcd-interfacing/lcd-custom-character.php

    1. void LCD_build(unsigned char location, unsigned char *ptr){
    2. unsigned char i;
    3. if(location<8){
    4. LCD_command(0x40+(location*8));
    5. for(i=0;i<8;i++)
    6. LCD_senddata(ptr[ i ]);
    7. }
    8.  
    9. }

or

LCD_cmd(0x40); //Load the location where we want to store // CG RAM Address
LCD_dat(0x04); //Load row 1 data *** make a Bell shape!
LCD_cmd(0x41);
LCD_dat(0x0E); //Load row 2 data
LCD_cmd(0x42);
LCD_dat(0x0E); //Load row 3 data
LCD_cmd(0x43);
LCD_dat(0x0E); //Load row 4 data
LCD_cmd(0x44);
LCD_dat(0x1F); //Load row 5 data
LCD_cmd(0x45);
LCD_dat(0x00); //Load row 6 data
LCD_cmd(0x46);
LCD_dat(0x04); //Load row 7 data
LCD_cmd(0x47);
LCD_dat(0x00); //Load row 8 data

But I cannot reach the single pixles! :(

Actually I do not understand the data-sheet of LCD 17 and 20!

Can anyone explain to me please?

  • OCy helped me to get it worked! Thanks to him! :)

    The problem was as follows.

    After setting the CG RAM addresses, I needed to decide where to put the pattern and thereafter CG RAM location should be set!

    Even though  now I am still struggling with the way to show more than a couple of patterns simultaneously on the LCD as we have only 0x40 - 0x7F for the CG RAM.   

**Attention** This is a public forum