Main Site Documentation

Touch screen on ud7000


#1

I will be needing to implement touch screen functionality during first quarter 2019. When will that be available? I am using ud7000, uc5550


#2

That is technically available today! You simply need to read the touch chip and then inject the values into WPF.

You can do that today on your own, or wait a little but as we are planning on adding a nuget touch driver.


#3

What is the time frame for touch ?


#4

I think it is done and being tested


#5

We don’t have an official release yet but our current source code is at https://github.com/ghi-electronics/TinyCLR-Drivers/tree/dev/FocalTech/FT5xx6

You can download it from there and add it to your own project to get going.


#6

Do you have an example of using it


#7

I have a few additional questions on the UD700.

  • We will likely go to resistive display. Does GHI have a reistisive screen driver chip they are planning on writing a driver for at this point? ( I understand nothing has been written yet)

  • The UD700 schematic shows two LED backlight driver chip circuits but on the board only one is populated. What is the purpose of second driver circuit?

  • What are functions of LCD.CLK, LCD.HSYNC and LCD.VSYNC.

Thanks.


#8

The best way to handle resistive is with a dedicated IC that can generate an interrupt when you touch the screen. The ADS7843 is one such device. It connects via SPI and is easy to use. You need to calibrate the touch points and store these values somewhere so bear this in mind when wanting to use resistive touch. Cap touch gives out a pre-calibrated output so no need for any calibration.

LCD.CLK is the DOT clock for the display. This is used to clock the data into the LCD display.
LCD.HSYNC and LCD.VSYNC are used to control the start of the horizontal and vertical timing. Some LCD displays use DE for timing so sometimes you might not find VSYNC and HSYNC on them.

If you end up designing your own LCD board, pay attention to the routing of LCD.CLK and keep away from the SYNC and any other fast changing signal. If you have to use a FPC cable, use a GND connection on either side of the CLK.


#9

For the UD700 on the UC5550 with the UCM dev board?


#10

Thanks for information and insight. I appreciate it. I would have liked to use capacitance screen, but a limited set of our customers will use this product with gloved hands so we have to go resistive.


#11

I am using UD700, UC5550 and UCM dev board


#12

See below for a sample use on the UC700, UC5550, and UCM Dev Board

using GHIElectronics.TinyCLR.Devices.Display;
using GHIElectronics.TinyCLR.Devices.Gpio;
using GHIElectronics.TinyCLR.Devices.I2c;
using GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6;
using GHIElectronics.TinyCLR.Pins;
using System.Drawing;
using System.Threading;

public static class Program {
    public static void Main() {
        UCMStandard.SetModel(UCMModel.UC5550);

        var displayController = DisplayController.GetDefault();
        var gpioController = GpioController.GetDefault();
        var i2cController = I2cController.FromName(UCMStandard.I2cBus.A);

        displayController.SetConfiguration(new ParallelDisplayControllerSettings {
            Width = 800,
            Height = 480,
            DataFormat = DisplayDataFormat.Rgb565,
            HorizontalBackPorch = 46,
            HorizontalFrontPorch = 16,
            HorizontalSyncPolarity = false,
            HorizontalSyncPulseWidth = 1,
            DataEnableIsFixed = false,
            DataEnablePolarity = false,
            PixelClockRate = 24_000_000,
            PixelPolarity = false,
            VerticalBackPorch = 23,
            VerticalFrontPorch = 7,
            VerticalSyncPolarity = false,
            VerticalSyncPulseWidth = 1
        });

        displayController.Enable();

        var screen = Graphics.FromHdc(displayController.Hdc);

        var backlight = gpioController.OpenPin(UCMStandard.GpioPin.A);
        backlight.SetDriveMode(GpioPinDriveMode.Output);
        backlight.Write(GpioPinValue.High);

        var touch = new FT5xx6Controller(i2cController.GetDevice(FT5xx6Controller.GetConnectionSettings()), gpioController.OpenPin(UCMStandard.GpioPin.B));
        var brush = new SolidBrush(Color.White);

        touch.TouchMove += (_, e) => {
            screen.FillEllipse(brush, e.X, e.Y, 5, 5);
            screen.Flush();
        };

        Thread.Sleep(-1);
    }
}

#13

Thanks, this will help a lot.
I added:
using GHIElectronics.TinyCLR.Devices.I2c;
using GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6;

however, FocalTech is undefined


#14

You need the source code that was linked in my earlier post


#15

Works great ! thanks
I noticed that when I added this touch driver, I was enable to use BOOT.D


#16

that is used as input from switch SYS D


#17

Unable to use BOOTD/SYSD you mean?


#18

yes, this code:

        btnSYSD = GpioController.GetDefault().OpenPin(UC5550.GpioPin.PI3);      // --> Sys D  
        btnSYSD.SetDriveMode(GpioPinDriveMode.InputPullUp);
        btnSYSD.ValueChanged += BtnSYSD_ValueChanged;
        btnSYSD.Write(GpioPinValue.High);

creates:
image


#19

on the line where adding the handler, BtnSYSD_ValueChanged;


#20

Do you have any other interrupts setup in your system?