Main Site Documentation

FEZ Hydra and Display


#1

Hi Guys,

i have some trouble to put informations on a Display.
I cant figure it out where my errors are, so i’m asking here.

I have following display connected to my Hydra:
http://www.soselectronic.at/a_info/resource/d/BT5.7ADNHW.pdf

I am not sure to configure it, but i think i got this.
here is my Display Configuration:

static void ConfigureDisplayBT5_7()
        {
            Debug.Print("Display not configured. Configuring mainboard to use display.");
            Debug.Print("Mainboard will need to be rebooted when finished");

            LCDController.Configurations lcdConfig = new LCDController.Configurations();
           

            //Configuration for BT5.7

            lcdConfig.Width = 640;
            lcdConfig.Height = 480;

            lcdConfig.OutputEnableIsFixed = false;      // no fixed En
            lcdConfig.OutputEnablePolarity = true;      // active = high

            lcdConfig.HorizontalSyncPolarity = true;    // active = high
            lcdConfig.VerticalSyncPolarity = true;      // active = high
            lcdConfig.PixelPolarity = false;            // Clk Falling Edge

            lcdConfig.HorizontalSyncPulseWidth = 1;     // Horizontal pulse width
            lcdConfig.HorizontalBackPorch = 45;         // Horizontal back porch
            lcdConfig.HorizontalFrontPorch = 114;       // Thf

            lcdConfig.VerticalSyncPulseWidth = 1;       //Vertical pulse width
            lcdConfig.VerticalBackPorch = 33;           // Vertical blank
            lcdConfig.VerticalFrontPorch = 11;          // Tvf

            lcdConfig.PixelClockRateKHz = 25000;        // Dot Clockrate 25 MHz


            LCDController.Set(lcdConfig);

            Debug.Print("Mainboard can now be reset");

            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
        }

my code to make some output for testing is:

 public static void Main()
        {
            if (SystemMetrics.ScreenWidth != 640 || SystemMetrics.ScreenHeight != 480)
                ConfigureDisplayBT5_7();

            myDisplayTestApp = new Program();

            Debug.Print(SystemMetrics.ScreenWidth + "W x " + SystemMetrics.ScreenHeight + "H");

            myDisplayTestApp.MainWindow = CreateWindow();
            myDisplayTestApp.MainWindow.Visibility = Visibility.Visible;
            myDisplayTestApp.MainWindow.Background = new SolidColorBrush(Colors.Red);

            timer.Start();

            myDisplayTestApp.Run(myDisplayTestApp.MainWindow);

        }

        private static Window CreateWindow()
        {
            Window wnd = new Microsoft.SPOT.Presentation.Window();


            wnd.Background = new SolidColorBrush(Colors.Black);

            Bitmap bm = new Bitmap(200, 200);
            
            bm.DrawText("Test Output", Resources.GetFont(Resources.FontResources.NinaB), Colors.Green, 25, 10);
            bm.Flush();
           
            wnd.Child = new Microsoft.SPOT.Presentation.Controls.Image(bm);

            wnd.Visibility = Visibility.Visible;
            wnd.Invalidate();


            return wnd;
        }

Sorry for my bad english,
Best regards from Austria,
and thanks for your help.

Arnold


#2

I took a quick look at the display datasheet and I do not see any issues for it to work with our devices. I am not sure why your code did not work.


#3

I am not sure if or where i have to connect the pins 1,2,40.
Up/Down Display Control?
DE/Sync Selection
Left/Right Control

I have manually connected DE/Sync to Ground/Vcc for setup the Display configuration.
Is there my mistake, do i need code for it?

i am not really familar with tft Displays =/


#4

The datasheet is poorly written, but it looks like there are two options for controlling the display: sync and DE. The DE/sync selection pin controls that. Try grounding it, resetting everything, and running your code. If that doesn’t work, try pulling that pin high (to 3.3V). Reset and try again. If that doesn’t work, check your wiring once again. It’s always useful to find schematics of other projects that use the display so you can see how others have interfaces with it.


#5

I already tried pulling DE/sync on Vcc/Gnd.
nothing changes. has this pin to change? on callibration in Sync mode, on Data in DE mode?
or syncing while transfering data, and when finished pull to DE to confirm the data?

Sure, I will check my wiring again.
i dont know what is Up/down and Left/right for, are the essential?