Hi. I have an EMX project and before moving to 4.2 my display was working fine. Now it’s not doing so well. I’m using this display:
https://www.ghielectronics.com/catalog/product/240
and the SetLCDConfigurations code below:
The problem is that although this is a 320x240 display (at least I thought it was) … the GHI text such as… “ing for debug commands…” is mostly off the top left of the screen.
Does anyone know the correct LCD Configuration for this old screen?
Thank you.
static void SetLCDConfigurations()
{
Configuration.LCD.Configurations lcdConfig = new Configuration.LCD.Configurations();
lcdConfig.Width = 320;
lcdConfig.Height = 240;
// Only use if needed, see documentation.
//lcdConfig.PriorityEnable = false;
lcdConfig.OutputEnableIsFixed = true;
lcdConfig.OutputEnablePolarity = true;
lcdConfig.HorizontalSyncPolarity = false;
lcdConfig.VerticalSyncPolarity = false;
lcdConfig.PixelPolarity = false;
lcdConfig.HorizontalSyncPulseWidth = 41;
lcdConfig.HorizontalBackPorch = 2;
lcdConfig.HorizontalFrontPorch = 2;
lcdConfig.VerticalSyncPulseWidth = 10;
lcdConfig.VerticalBackPorch = 2;
lcdConfig.VerticalFrontPorch = 2;
// NOTE: This is used for EMX
//lcdConfig.PixelClockDivider = 8;
lcdConfig.PixelClockRateKHz = 8; // I added this. Without it the display does not work (solid white screen).
// Set config
if (Configuration.LCD.Set(lcdConfig))
{
// New settings were saved, must reboot
Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);
}
}