Disconnect EMX Development System LCD

Easy question. I want to wire an 800x600 TFT lcd onto the LCD header of the EMX Dev system.

Can I just unplug the onboard LCD? Or will the backlight driver be damaged if it runs without a backlight?

I do not think it will be damaged but will get hot and draw too much power

Ahh, I see there is a zenner on the boost supply to limit the voltage.

I just left the onboard LCD connected and hooked the bigger LCD up. And it’s working beutifully. I didn’t think it would be so easy. Two questions though.

How is PixelClockDivider calculated?

I have no clue how to answer your first question, but I think the answer to the second is ‘Yes’ :))

I removed the second question as it is probably related to the first question:

My LCD tends to loose sync and utfade out to white. Any idea why? Also, it doesn’t sync when the EX module resets. I have to disconnect the LCD power and reconnect to get it resynced…

Sounds like one of the sync signals has wrong polarity. Check out my codeshare submission: http://www.tinyclr.com/codeshare/entry/555

I didn’t use the LCD Configurations class, since it seems to limit pixelclock values and other values are not clearly explained.

Thanks Wouter, I’ll look at that code. And it might be very useful for the display module I’m slowly busy with as the code can change the LCD settings on the fly, no restart required.

This is the code i’m using:

            lcdConfig.Width = 800;
            lcdConfig.Height = 600;
            lcdConfig.PriorityEnable = true;
            lcdConfig.OutputEnableIsFixed = false;
            lcdConfig.OutputEnablePolarity = true;
            lcdConfig.HorizontalSyncPolarity = false;
            lcdConfig.VerticalSyncPolarity = false;
            lcdConfig.PixelPolarity = false;
            lcdConfig.HorizontalSyncPulseWidth = 72;
            lcdConfig.HorizontalBackPorch = 128;
            lcdConfig.HorizontalFrontPorch = 24;
            lcdConfig.VerticalSyncPulseWidth = 2;
            lcdConfig.VerticalBackPorch = 22;
            lcdConfig.VerticalFrontPorch = 1;
            lcdConfig.PixelClockDivider = 6;

And attached is the timing diagram for polarity and the timing values…

I’ll scope the signals today at work to see that the polarity is what I intended, and then I can also scope the pixel clock to divider ratio…

I’m sorry to say, but to me the LCD Configuration class was useless.

F.e. if you look into the datasheet, horizontal porch values need to be ‘minus one’, while vertical porch values need to be real values, it is not clear what you need to enter for HorizontalBackPorch (the real value, or the value minus one?).

Also where a polarity bit needs to be 1 in the register, the description of the LCD configuration class says it should be false. I would doubt GHI have taken 1 as false and 0 as true.

Same for PixelClockDivider, seems to be limited to 3 bits, while the LCD_CFG register shows that the pixel clock divider is 5 bits wide. And if you enter:

lcdConfig.PixelClockDivider = 6;

You have actually divided 72Mhz / 7 if you measure with the scope. So the interface is not consistent.

To cut a long story, if you don’t have an oscilloscoop to measure the actual output, use the Register way to configure the LCD controller with the datasheet on your secondary screen. I found this the only way to get it right.

We handle the “minus one” on our end. User of netmf do not open datasheets :slight_smile: all you have to do is take the numbers from your LCD datasheet and put in config and it should work. If not then let us know.

Clock divider was replaced with pixel rate in 4.2.

@ Gus - I’ve only tested PixelClockDivider. I’ve set it to 14, and was getting a clock of 72/7 MHz instead. Or do I have to restart the EMX after changing the settings? That would explain why I always measured “wrong” values :slight_smile:

Ok, a PixelClockDivider of 6 gives me 12MHz which is 72 / 6. So I have to set it to 2 to get a clock of 36MHz…

Edit: Pixel divider 2 gives me 36MHz, but the screen is twitchy and very unstable. divider of 3 gives me 24MHz, way outside the display spec, but it is nice and stable…

So you need to restart the board for the new settings to take effect right?

There is “priortiy” parameter you need to set to true. Also, I recommend to go lower than 36Mhz as this is too high for the system to handle everything properly.

Yes, either a hard reset or a power off. Just restarting the managed application file VS2010 doesn’t work.

I already have the priority parameter set to true. The display wants a minimum clock rate of 34MHz, preferably 36MHz.

I’m going to look at shortining the porches, to the minimum allowed porch when DE is used. This will lower the required frequincy a bit, but that will probably get me to the minimum of 34MHz. But, as I say, I doesn’t flicker at 24MHz. I just don’t know how long the LCD will last while running so far out of it’s spec…

But now that I know the display works, now I can try and hook it up to my Hydra… :slight_smile:

1 Like

Just noticed that there the “Priority” parameter has been removed in 4.2, does this means that it always is “lower” priority now?

Tested this and it works now, I was just restarting through visual studio and didn’t see any difference.

I assume that this get set depending on the requested pixel clock…

It is automatic now.