Help initilizing graphical 128x64 UEXT display

I am in the process of trying to initialize this LCD, I have created a project from the example project that comes with the GHI drivers. From there I included both of the display drivers that are given for the display. I am running a domino. This is the line of code that I am stuck on:

FEZ_Extensions.Graphical128x64Display.Initialize((Cpu.Pin)FEZ_Pin.Digital.UEXT3 ResetPin,(Cpu.Pin)FEZ_Pin.Digital.UEXT4 CommandPin,(Cpu.Pin)FEZ_Pin.Digital.UEXT10 SelectPin, SPIModule);

I have attached a file of my attempt to try to enter the correct parameters, I think I am on the correct path but cannot input the SPI module correctly yet.

Best Regards,
Aaron

Not sure i understand your problem. Choose Uext3 and then type “resetpin” then do the next pin.

ok im going to try that, how do I address the SPI since it is not a single digital pin like the others?

Thanks for the response.

  FEZ_Extensions.Graphical128x64Display.Initialize((Cpu.Pin)FEZ_Pin.Digital.UEXT3 ResetPin ,(Cpu.Pin)FEZ_Pin.Digital.UEXT4 CommandPin ,(Cpu.Pin)FEZ_Pin.Digital.UEXT10 SelectPin,(Cpu.Pin)SPI.SPI_module.SPI1 SPIModule);

I tried this but it seems to be upset.

This is from my rhino setup with the same display

            FEZ_Extensions.Graphical128x64Display.Initialize(FEZ_Pin.Digital.UEXT3, FEZ_Pin.Digital.UEXT4, FEZ_Pin.Digital.UEXT10,SPI.SPI_module.SPI2);
            paint.Print(7, 1, "Hey Foekie, Hey Gus");
            paint.Print(7, 10, "This is the display");
            paint.Print(30, 20, "On the RHINO");

that initialized the display no problem.

            GPainter paint = new GPainter();

            FEZ_Extensions.Graphical128x64Display.Initialize(FEZ_Pin.Digital.UEXT3, FEZ_Pin.Digital.UEXT4, FEZ_Pin.Digital.UEXT10, SPI.SPI_module.SPI2);
           paint.Print(7, 1, "Hey Foekie, Hey Gus");
            paint.Print(7, 10, "This is the display");
            paint.Print(30, 20, "On the RHINO");

That is my code, however the paint function does not display onto the LCD.
Aaron

can you post your whole code for the main program at least?

try this simple example.
I thing what you did was add the (CPU.PIn) in the initialize.
That is not necessary! :wink:

Here is the right way to do it.

 //Initialize the display
FEZ_Extensions.Graphical128x64Display.Initialize(FEZ_Pin.Digital.UEXT3,
                                                             FEZ_Pin.Digital.UEXT4,
                                                             FEZ_Pin.Digital.UEXT10,
                                                             SPI.SPI_module.SPI2);

Following is the full sample code:


using System;
using System.Threading;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Hardware;

using GHIElectronics.Graphics.Simple128x64;

namespace MFConsoleApplication1
{
    public class Program
    {
        public static void Main()
        {

            //Initialize the display
            FEZ_Extensions.Graphical128x64Display.Initialize(FEZ_Pin.Digital.UEXT3,
                                                             FEZ_Pin.Digital.UEXT4,
                                                             FEZ_Pin.Digital.UEXT10,
                                                             SPI.SPI_module.SPI2);

            // Display FEZ message
           FEZ.Extensions.Graphical128x64Display.Print(30, 2, "FEZ is Easy!");
           FEZ.Extensions.Graphical128x64Display.Print(8, 4, "Actually, too easy!");

           //
            GPainter paint = new GPainter();

            // Clear the screen, and wait for one sec.
            paint.Clear();
            
           int i = 0;

            while (true)
            {
                paint.Print(2, 35, i++.ToString());
                FEZ_Extensions.Graphical128x64Display.Flush(paint.vram);

                Thread.Sleep(100);
            }
        }
    }
}

FEZ_Extensions.Graphical128x64Display.Print(1, 1, "random text");

That command got text on the LCD. That was relatively painless. Very appreciated.

Your example code rocks. Thank you so much!

Aaron

its the code right from the hardware page right by the display you bought.

I must be over looking it. I see the drivers there, but no code on how to use the drivers.

@ 2
FYI

In GHElectronics.Graphics.Simple128x64.cs, you can use Line and Circle methods to do some simple graphics on this LCD as well.

Look in the brochure.

WOW, there is a second page to the brochure with all the code. This is one of those moments where I just look like an idiot and move on :wink:

I appreciate the help.

Now its time to get a thumb drive initialized. I’ll try and look harder through the examples before asking about it.

Regards,
Aaron

The beginer book is badass also. i still look at it. after months of fez.