How to write message to a large size CLD with G400-D module

Hi,

I am using the following C# program .NET Micro Framework to print “Hello” on a different line once a second on the G400-D dev board LCD (which has 480 by 272 pixel). It is fine.

After I change the LCD hardware to 800 by 480 pixel (a large size), then it only prints out “Hel” and only print in a 480 by 272 pixel area.

Then I changed statement to “static Bitmap LCD = new Bitmap(800, 480);” to match the new LCD size, then nothing prints out.

What is the problem?

I attached code here:

public class Program
{
    static Bitmap LCD = new Bitmap(480, 272);
    //static Bitmap LCD = new Bitmap(800, 480);
    static int count = 0;
    static int y = 5;
    static Font MyFont = Resources.GetFont(Resources.FontResources.NinaB);

    public static void Main()
    {
        int tot_hight = 0;

        tot_hight = 272; //800 by 480
        while (true)
        {
            LCD.Clear();
            LCD.DrawText("Hello!", MyFont, ColorUtility.ColorFromRGB(250, 0, 0), 5, y);
            y += 15;
            LCD.Flush();
            if (y >= tot_hight)
            {
                y = 5;
            }
            Thread.Sleep(1000); // 1.2s 
        }
    }
}

Did you refer to this Display NHVN Developers’ Guide

No. I developed the code from examples at “.NET Micro Framework for Beginners” section 11.2.

The big LCD I use is NHD-7.0-800480EF-ATXL#-CTP from NEWHAVEN DISPLAY INTERNATIONAL.

well, if you’ve never re-set your LCD to be 800x480, you can’t expect it to cater for bigger bitmaps?

How to reset LCD? You mean do it from hardware? I changed code to have larger bitmap but did not see anything from LCD(see my previous first question)

you run the code that the linked page has - it sets the display resolution to be what you need. It is NOT just about the bitmap

How to change?

load that code, deploy it, and wait for the restart…

http://old.ghielectronics.com/community/forum/topic?id=22465 is a good (old) thread that talked about this. You’re in the same boat as that person and just need to use the code in the developers guide at the start of your app

Thanks a lot! Got it.