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?
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 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
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ā¦
Edit:
But now that I know the display works, now I can try and hook it up to my Hydraā¦
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.