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.

LCD Display issue

Hi All,

 

We are working on C5505 EVM board

We were trying to test the LCD driver using example 3
(CSL/examples/LCD/example3).


When we run this application, we are able to see the BLUE and WHITE
colors properly on the LCD screen.


When we tried to display RED and GREEN colors (code is same; we changed
only the color values) we are seeing BLACK and YELLOW instead
(respectively).

It would be great if you could suggest a solution.

Regards,

Muneendra.

 

  • Muneendra,

    I have duplicated your results.  Not sure what the problem is yet, but I am consulting with the CSL team.  I will come back to you when I have something.

    Regards.

  • Muneendra,

    A colleague made a hack that will now allow the example 3 to display all three primary colors: Red, Green and Blue.  I have atatched the revised project here for you to use.  Consider this a temporary work around.  I am consulting with the C5000 Apps team to get an official patch.

    Regards.

    example3.zip
  • Hello, Are the any news on the patch? is the problem in the CSL or in the Display itself?

    I also have a question concerning the LCD DMA transfer.

    As I can see from the examples and documentation DMA data transfer towards LCD is 32 bit (you set a pointer to the buffer as uint32), but the display graphics RAM is 16 bit. Does this mean that for every DMA transfer two pixels will be transmitted or does this mean that 16 bit value of each pixel in the buffer will be trasmitted as 32 bit and then stored again in the graphics RAM as 16 bit value?

    I noticed a really strange behavior of the LCD display when using DMA. For example I fill the frame buffer with value 0xFFFF then I get correctly filled LCD screen with white color. But then I fill the pixel buffer alternatively with 0xFFFF and 0x0000. Instead of getting one white and one black pixel I get screen filled with blue colored pixels? Can you help me with this problem, am I doing something wrong?

    Thank you....

  • Hello,

    The problem is caused by the inproper use of the LCD panel interface. The DMA and LCD controller on C5505 works fine. The OLED panel on C5505 EVM can use either 8 bit data line or 16 bit data line, but on C5505 EVM we physically connect to it using 8 bit data line. On the other hand, the C5505 LCD controller data receive/transmit register is always using 16 bit data. In this case, only the lower 8 bit is effective. If the 256 color mode (8 bit per pixel) is used, then there is no problem. If the 16 bit color mode is used, then you will need to transmit 16 bit per pixel data via 8 bit data bus, so you have to seperate the data into two 8 bit data and put them into two word (lower 8 bit of 16 bit word), then send them to the LCD panel one after another. The example3 in LCD folder is actually using 16 bit color mode, but it sends the 16 bit color data in one word, therefore the higher 8 bit of the colro data is lost. That is why you did not get the right color when you changed color to a non white or black color. 

    The LCD DMA does work at 32 bit unit. It will break a 32 bit word into two 16 bit words and send it to the data receive/transmit register. It works properly.

    I have changed the example3 to works for both 256 color and 16 bit color. It will display 120x120 image with half screen filled with blue and half screen as black and white alternative. You will need to make sure to use USE_COLOR_256 macro in the project to make the program to use the 256 color mode. If USE_COLOR_256 is not defined, then the program will use 16 bit color. Attacthed please find modified LCD example3. The CSL code remains the same.

    Best regards,

    Ming

    example3.zip
  • Thank you for the response and the example. Things are much clearer now! I just need to clear one more thing.

     

    From Your example I see that the framebuffer you use is defined as:

    // 132x132x2, 132 row, 132 column, 2 word per pixel

    #define LCD_MAX_BUFFER_SIZE    (0x8820u)

    so one pixel is 32 bits (2 words) (btw why define it as 132 when the LCD on the EVM board is 128 by 128)

     

    Can't we use instead Uint32 framebuffer and avoid shifting of pixel data before sending? DMA will send the 32 bit data correctly and we will simplify the process. In that case I define green as

    #define GREEN                     0x000700E0

    instead of

    #define GREEN                     0x07E0

    Do you see any drawbacks in this approach? I tested this and it works properly...

  • Hi,

    According the the LCD panel spec, the physical size of the panel is 132x132.

    Your way should work too. The only drawback is that the 16 bit color defination is not straightforward.

    Ming