Because i’m developing and testing the application on the G400D but real world application it will be a 2.4" dispaly because of chassis we are using.
To be honest…
I’ve ordered the display already… because i thought a simple DC/DC would be enough.
What exactly does this high speed level shifter do, and is it really really neccessary?
it converts a signal from one voltage level to the other, and high-speed since it’s trying to run a display. Is it “really” necessary? Well you could try it, and if it works then you might get away with it. But if it doesn’t work, or damages the display, was it worth it?
Ok thanks, maybe “upgrading” the databus will make it protected then.
@ Dave McLaughlin - Could your please send me an example of setting up the Display and the FEZ Config Display parameters ?
I am in despair…
Yes but i want to find out what i am doing wrong…
My display is intialized and i put in the corret values for VBPorch, VFPorch , HBPorch, HFPorch, Polarity things, Screensize but i don’t get any idea from the datasheet for values like DOTCLK, Pulse Width…
I know that i have to customize my settings, but i would like to have some examples from someone who customized his own screen, to compare that with his displays datasheet, to get an insight of what i am supposed to do.
This is how I configure a Newhaven 7.0" display in code. I don’t use Fezconfig for this now. If you reflash OTA with a new firmware you lose the settings so best to do this in code. The reboot only happens if the values change.
Post your settings for the display you used.
Display.Width = 800;
Display.Height = 480;
Display.HorizontalSyncPulseWidth = 48;
Display.HorizontalBackPorch = 88;
Display.HorizontalFrontPorch = 40;
Display.VerticalSyncPulseWidth = 3;
Display.VerticalBackPorch = 32;
Display.VerticalFrontPorch = 13;
Display.PixelClockRateKHz = 25000;
Display.OutputEnableIsFixed = false;
Display.OutputEnablePolarity = true;
Display.HorizontalSyncPolarity = false;
Display.VerticalSyncPolarity = false;
Display.PixelPolarity = false;
Display.Type = Display.DisplayType.Lcd;
if (Display.Save()) // Reboot required?
{
PowerState.RebootDevice(false);
}
PS. Is this the display you used?
http://docs-europe.electrocomponents.com/webdocs/120b/0900766b8120b293.pdf
If not, post the one you used and the schematic for it of how you wired this to the G400. The more information the better.
By the way, that datasheet does not have any of the timing settings so where did you get those from?
Thank you!
That’s right i can’t find any timing information in the Datasheet.
For those porch values i chose the defaults…
The rest of the values i did more tryout than having a real concept.
My Settings:
Display.Width = 240;
Display.Height = 320;
Display.HorizontalSyncPulseWidth = 1; //guessed
Display.HorizontalBackPorch = 20;
Display.HorizontalFrontPorch = 10;
Display.VerticalSyncPulseWidth = 1; //guessed
Display.VerticalBackPorch = 2;
Display.VerticalFrontPorch = 4;
Display.PixelClockRateKHz = 16000; //Not in datasheet,just guessed
Display.OutputEnableIsFixed = false;
Display.OutputEnablePolarity = false;
Display.HorizontalSyncPolarity = false;
Display.VerticalSyncPolarity = false;
Display.PixelPolarity = false;
Display.Type = Display.DisplayType.Lcd;
Here is the Schematic,
Just focus on the connection between the LCD and G400…
The rest is incomplete, and the 9Volts for Backlight are connected.
My initialization
HardReset();
SendCommand(Commands.SoftwareReset);
Thread.Sleep(100);
SendCommand(Commands.DisplayOff);
SendCommand(Commands.PixelFormatSet);
SendData(0x66);
SendCommand(Commands.RgbInterfaceSignalControl);
SendData(0x41);
SendCommand(Commands.SleepOut);
Thread.Sleep(150);
SendCommand(Commands.DisplayOn);
Thread.Sleep(100);
I used the commands from the GITHUB project, where someone implemented the ILI9341 SPI driver.
You are well out on the timing by the looks of it.
Timing data is in this datasheet
Try HSYNC as 10 and dotclk as 6350
It does not work…
But what if my values are slightly false, shouldn’t the display show crap at least ?
Beacuse he does nothing than turning dark gray afer init.
Does the SPI code return any values from the registry?
After you init, do you leave the CHIPSET inactive?
The polarity may be wrong. Go check the datasheet for the timing polarity and check this against your settings.
The SPI doen’t return any values.
What do you mean with CHIPSET?
I’m going to check again.
Display.Width = 240;
Display.Height = 320;
Display.HorizontalSyncPulseWidth = 10;
Display.HorizontalBackPorch = 20;
Display.HorizontalFrontPorch = 10;
Display.VerticalSyncPulseWidth = 2;
Display.VerticalBackPorch = 2;
Display.VerticalFrontPorch = 4;
Display.PixelClockRateKHz = 6350;
Display.OutputEnableIsFixed = false;
Display.OutputEnablePolarity = false;
Display.HorizontalSyncPolarity = false;
Display.VerticalSyncPolarity = false;
Display.PixelPolarity = true;
Display.Type = Display.DisplayType.Lcd;
Not working, but values should be fine right now
Sorry, chipselect
What do you see on the display? Can you show a picture…
If you can’t read back any SPI registers then the SPI is not working. Get this working first and then you can use this to set the register for the RGB interface.
The chipselect is driven high, after the last command sent.
When everything gets powered, the screen is white, after the initialization it turns black, so the SPI should do something.
I attached a picture that shows the screen after init.
The problem is, i can’t read because the SPI class has write/writeRead functions and between the write and the read i haave to change the state of the Data/Command pin and this is not possbile because i have no influence of the content of the function
@ quickshat - Bit bang it!