LCD Keypad woes

Hi, I have just received my Domino and LCD Keypad (red board). I have updated to the latest firmware (v4.1) and started a project in VS2010. No problems following instructions up to here.

I wrote a small app to test that the LCD was working (see attached file). It is compiled with FEZ_Shield_KeypadLCD_Red.cs in the project. The LED flashes correctly and I can turn the LCD backlight on and off but no text appears. I have tried adjusting the contrast but to no avail.

What next?

using System;
using Microsoft.SPOT;
using System.Threading;
using GHIElectronics.NETMF.FEZ;
using Microsoft.SPOT.Hardware;

namespace FEZ_Project1
{
public class Program
{
public static void Main()
{
OutputPort LED;
LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, true);
//Thread.Sleep(Timeout.Infinite);
for (int i = 0; i < 5; i++)
{
LED.Write(true);
Thread.Sleep(200);
LED.Write(false);
Thread.Sleep(200);
}
FEZ_Shields.KeypadLCD.Initialize();
FEZ_Shields.KeypadLCD.TurnBacklightOn();
//FEZ_Shields.KeypadLCD.CursorHome();
FEZ_Shields.KeypadLCD.SetCursor(0, 0);
FEZ_Shields.KeypadLCD.Print(“Welcome 0!”);
FEZ_Shields.KeypadLCD.SetCursor(1, 0);
FEZ_Shields.KeypadLCD.Print(“Welcome 1!”);

        Thread.Sleep(2000);
    }

}

}

first, please use the code highlighting. You can use it by clicking the code button above (the one with the 101010)

next, try the example code, does this work? Your code is a little messy, so please try the example code first.

Here it is:


using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.FEZ;
public class Program
{
    public static void Main()
    {
        FEZ_Shields.KeypadLCD.Initialize();
        FEZ_Shields.KeypadLCD.TurnBacklightOn();
        int i = 0;
        
        while (true)
        {
              FEZ_Shields.KeypadLCD.CursorHome();
              FEZ_Shields.KeypadLCD.Print("Count " + i++);
              FEZ_Shields.KeypadLCD.SetCursor(1, 2);
                            switch (FEZ_Shields.KeypadLCD.GetKey())
                            {
                                     case FEZ_Shields.KeypadLCD.Keys.Up:
                                     FEZ_Shields.KeypadLCD.Print("Up ");
                                     break;
                                     case FEZ_Shields.KeypadLCD.Keys.Down:
                                     FEZ_Shields.KeypadLCD.Print("Down ");
                                     break;
                                     case FEZ_Shields.KeypadLCD.Keys.Left:
                                     FEZ_Shields.KeypadLCD.Print("Left ");
                                     break;
                                     case FEZ_Shields.KeypadLCD.Keys.Right:
                                     FEZ_Shields.KeypadLCD.Print("Right ");
                                     break;
                                     case FEZ_Shields.KeypadLCD.Keys.Select:
                                     FEZ_Shields.KeypadLCD.Print("Select");
                                     break;
                                     case FEZ_Shields.KeypadLCD.Keys.None:
                                     FEZ_Shields.KeypadLCD.Print(" ");
                                     break;
                            }
                Thread.Sleep(100);
        }
    }
}

As found in the keypad brochure

Yes always start with the example we give you…once it is working then you can try anything you want.

Also check out a little helper class I wrote for the LCD Shield: (link removed) and the code is here [url]http://lcdlivetext.codeplex.com/[/url]

edit: fixed link

Yes, Jeff’s example is a great way to start too!
Jeff, you should click the hyperlink button instead of the code button. :stuck_out_tongue:

All fixed! It was the contrast after all. Onward and upward…

Glad to hear. Please note to keep your code simple and clean while trying to find a error/bug.

which pins does the LCD Button Shield actually use? I cant seem to find the specs for it anymore

http://www.ghielectronics.com/downloads/FEZ/Shield/ has the old documentation you want.