Announcement

Collapse
No announcement yet.

DisplayImage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DisplayImage

    Hi Gurus,

    I just got my uLCD PMD2 and I am impressed by its quality and ease of use. I am able to erase, set background color etc.

    however, when I try to display an image, I get a NACK. Below is a code which should display a 240X320 image with half its area white and the other half at blue. I am inputting 8bpp data. unfortunately it doesnt work.

    Please advise.


    void LcdImage(void)
    {
    uint32 LcdByteCounter;

    UARTWrite(E_AHI_UART_0, 0x49);///cmd
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 0x00);///x
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 0x00);///ymsb
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 0x00);///ylsb
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 240);///width
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 0x01);///height msb
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 0x40);///height lsb
    DelayMs(InterByteDelay);

    UARTWrite(E_AHI_UART_0, 8);///colormode
    DelayMs(InterByteDelay);

    /// fill half the screen with White and the other half with blue-ish color
    for(LcdByteCounter = 0;LcdByteCounter

  • #2


    I found the problem - it wasnt the LCD. It was the cross compiler that came with the uC that I was using to communicate to the LCD. the damn thing is a new product and contains a lot of bugs. it turns out that the DelayMs functions dont work inside a for loop. therefore it wasnt giving enough time for the UARTWrite(E_AHI_UART_0, 0xXX) to complete. and therefore not enough bytes were sent to the LCD. What a glamorous way to waste 6 hours!

    ps: I wanted to delete this thread so as not waste everybody's time but I dont know how to do it.

    Comment


    • #3


      I wouldn't worry. I think there is something to learn from this thread in any case,

      Cheers Don...
      Don McKenzie

      Site Map: http://www.dontronics.com/sitemap
      E-Mail Contact Page: http://www.dontronics.com/email
      Web Camera Page: http://www.dontronics.com/webcam
      No More Damn Spam: http://www.dontronics.com/spam

      These products will reduce in price by 5% every month:
      http://www.dontronics-shop.com/minus-5-every-month.html

      Comment

      Working...
      X