[Solved] G400D & UCD-D70-A Display Not Working

Today, I received the G400D SoM, UCD-D70-A Display and UCM Development Board. I updated the G400D to v2.0.4 bootloader, TinyCLR OS to v0.11.0 and setup Visual Studio with the v0.11.0 Project System and Libraries.

I did the simple “Hello World” project example and saw the text on the output screen. I then decided to get the red LED on pin 64 flashing; it worked great and as expected.

I then decided to dive into getting the display up and running; following the example here for Parallel TFT displays. The ParallelDisplayControllerSettings structure in the example is the wrong width and height for the UCD-D70-A Display, so I changed it to the correct values.

I wasn’t surprised that the UCD-D70-A Display does not come on; it’s dark with no backlight. So, I have the following questions…
1 - What are the correct ParallelDisplayControllerSettings values for the UCD-D70-A Display?
2 - Is there some other configuration setting, via hardware or software that I may be missing?
3 - Can the datasheet for the TFT controller be made available so the proper settings can be ascertained?
4 - While we’re on the topic of the display, where is the documentation for the capacitive touch controller?

Any help is much appreciated and I thank you for your time.

All the other timings are wrong. I think they used the Newhaven LCD so try this and it should work. This is the code I use with the Newhaven 7.0" 800x480 TFT

This is NETMF code so you may need to change this to work on TinyCLR but the values will be correct.

    Display.Width = 800;
    Display.Height = 480;
    Display.HorizontalSyncPulseWidth = 48;
    Display.HorizontalBackPorch = 88;
    Display.HorizontalFrontPorch = 40;
    Display.VerticalSyncPulseWidth = 3;
    Display.VerticalBackPorch = 32;
    Display.VerticalFrontPorch = 13;
    Display.PixelClockRateKHz = 25000;
    Display.OutputEnableIsFixed = false;
    Display.OutputEnablePolarity = true;
    Display.HorizontalSyncPolarity = false;
    Display.VerticalSyncPolarity = false;
    Display.PixelPolarity = false;
    Display.Type = Display.DisplayType.Lcd;

    if (Display.Save())      // Reboot required?
    {
        PowerState.RebootDevice(false);
    }
1 Like

Dave,

Thanks for the response, I gave your settings a try but they did not work.

The GHI website states that the display is a ER-TFT070-4. I looked up the data sheet for the display and its controller, which is an OTA7001A. Looking at its datasheet, I applied the settings for both a 800x600 and 800x480 display and still no luck (source code below).

I then powered the board from a +12VDC, 1.5A wall adapter. The voltages on the development board and the LCD connector are correct at VCC=+3.3VDC and +5V=+5.0VDC. I also used a 200MHz scope to look at VSYNC, HSYNC, CLK and a few data lines. The signals are present as excpected.

I also inspected all of the components under a microscope and the solder looks good and the flex cables are seated properly.

At this point, I’m at a loss. The display is completely dark, I don’t even know if the backlight is coming on. I’m not sure the display is a ER-TFT070-4 with a OTA7001A. Here’s the source code I’m using:

private static void Main()
  {
  //Initialize the GPIO for the 'heartbeat' LED
  GpioPin LED = GpioController.GetDefault().OpenPin(G400D.GpioPin.PD12);
  LED.SetDriveMode(GpioPinDriveMode.Output);

  DisplayController DisplayController = DisplayController.GetDefault();

  //Configuration settings for the OTA7001A controller @ 800x480
  ParallelDisplayControllerSettings Settings = new ParallelDisplayControllerSettings
                                               {
                                                 Width                    = 800,
                                                 Height                   = 480,
                                                 DataFormat               = DisplayDataFormat.Rgb565,
                                                 PixelClockRate           = 30_000_000,
                                                 PixelPolarity            = false,
                                                 OutputEnablePolarity     = true,
                                                 OutputEnableIsFixed      = false,
                                                 HorizontalFrontPorch     = 40,
                                                 HorizontalBackPorch      = 88,
                                                 HorizontalSyncPulseWidth = 48,
                                                 HorizontalSyncPolarity   = false,
                                                 VerticalFrontPorch       = 13,
                                                 VerticalBackPorch        = 32,
                                                 VerticalSyncPulseWidth   = 3,
                                                 VerticalSyncPolarity     = false
                                               };

  /*
  //Configuration settings for the OTA7001A controller @ 800x600
  ParallelDisplayControllerSettings Settings = new ParallelDisplayControllerSettings
                                               {
                                                 Width                    = 800,
                                                 Height                   = 600,
                                                 DataFormat               = DisplayDataFormat.Rgb565,
                                                 PixelClockRate           = 40_000_000,
                                                 PixelPolarity            = false,
                                                 OutputEnablePolarity     = true,
                                                 OutputEnableIsFixed      = false,
                                                 HorizontalFrontPorch     = 112,
                                                 HorizontalBackPorch      = 88,
                                                 HorizontalSyncPulseWidth = 48,
                                                 HorizontalSyncPolarity   = false,
                                                 VerticalFrontPorch       = 21,
                                                 VerticalBackPorch        = 39,
                                                 VerticalSyncPulseWidth   = 3,
                                                 VerticalSyncPolarity     = false
                                               };
                                               */

  //Apply the settings
  DisplayController.ApplySettings(Settings);

  // Some needed objects
  Graphics Screen    = Graphics.FromHdc(DisplayController.Hdc);
  Pen      ScreenPen = new Pen(Color.White);

  // Start Drawing (to memory)
  Screen.Clear(Color.Black);
  Screen.DrawEllipse(ScreenPen, 100, 100, 50, 50);

  // Flush the memory to the display. This is a very fast operation.
  Screen.Flush();

  // Heartbeat
  while (true)
    {
    LED.Write(GpioPinValue.High);
    Thread.Sleep(200);
    LED.Write(GpioPinValue.Low);
    Thread.Sleep(100);
    LED.Write(GpioPinValue.High);
    Thread.Sleep(200);
    LED.Write(GpioPinValue.Low);
    Thread.Sleep(500);
    }
  }

You are going to need to get the backlight working first. A black display does not sound right. If the timing is wrong, the display will show lines of some kind when the backlight is on. The backlight will show through the rear of the LCD if it is working.

You might have to change the polarity on the SYNC and clock too. You might also need OutputEnableIsFixed to be false as the display uses the DE input.

I also don’t see you doing any GPIO Pin to drive the LCD backlight. The default is OFF due to the pulldown resistor.

3 Likes

Dave,

You’re we’re right about the backlight and the display is now working; thank you so very much for your help. I’m embarrassed that I didn’t think it would be wired to a GPIO pin.

This is the now working source code:

private static void Main()
  {
  //Initialize the GPIO for the 'heartbeat' LED (pin 64)
  GpioPin LED = GpioController.GetDefault().OpenPin(G400D.GpioPin.PD12);
  LED.SetDriveMode(GpioPinDriveMode.Output);

  //Initialize the GPIO for the TFT backlight enable (pin 62)
  GpioPin TFT_BLE = GpioController.GetDefault().OpenPin(G400D.GpioPin.PD14);
  TFT_BLE.SetDriveMode(GpioPinDriveMode.Output);
  TFT_BLE.Write(GpioPinValue.High);

  //Get the default display controller
  DisplayController DisplayController = DisplayController.GetDefault();

  //Configuration settings for the UCD-D70-A TFT Display (OTA7001A controller @ 800x480)
  ParallelDisplayControllerSettings Settings = new ParallelDisplayControllerSettings
                                               {
                                                 Width                    = 800,
                                                 Height                   = 480,
                                                 DataFormat               = DisplayDataFormat.Rgb565,
                                                 PixelClockRate           = 30_000_000,
                                                 PixelPolarity            = false,
                                                 OutputEnablePolarity     = true,
                                                 OutputEnableIsFixed      = false,
                                                 HorizontalFrontPorch     = 40,
                                                 HorizontalBackPorch      = 88,
                                                 HorizontalSyncPulseWidth = 48,
                                                 HorizontalSyncPolarity   = false,
                                                 VerticalFrontPorch       = 13,
                                                 VerticalBackPorch        = 32,
                                                 VerticalSyncPulseWidth   = 3,
                                                 VerticalSyncPolarity     = false
                                               };

  //Apply the settings
  DisplayController.ApplySettings(Settings);

  // Some needed objects
  Graphics Screen    = Graphics.FromHdc(DisplayController.Hdc);
  Pen      ScreenPen = new Pen(Color.White);

  // Start Drawing (to memory)
  Screen.Clear(Color.Black);
  Screen.DrawEllipse(ScreenPen, 100, 100, 50, 50);

  // Flush the memory to the display. This is a very fast operation.
  Screen.Flush();

  // Heartbeat
  while (true)
    {
    LED.Write(GpioPinValue.High);
    Thread.Sleep(200);
    LED.Write(GpioPinValue.Low);
    Thread.Sleep(100);
    LED.Write(GpioPinValue.High);
    Thread.Sleep(200);
    LED.Write(GpioPinValue.Low);
    Thread.Sleep(500);
    }
  }
3 Likes

Always a ‘comfort’ to see the backlight come on before going any further!

Good info Dave!