|
Post by NeX on Dec 7, 2015 8:24:42 GMT -8
Does anyone know how the resolution is set in the library?
i want to use a different screen which uses a similar interface but has a different resolution and i was wondering if its as simple as changing the resolution and then everything works for the new screen?
thanks
|
|
|
Post by jamesbowman on Dec 7, 2015 10:20:43 GMT -8
There is actually nothing in the GD library that is resoluution-dependent. If the FT800 is configured for a different display, then everything in GD should "just work".
You can write directly to the video configuration registers like this:
GD.wr32(REG_HCYCLE, 320); Typically for a given display panel you set up all the video timing registers. So for example to set up a generic 320x240 panel, in setup(), do:
GD.begin(); GD.wr32(vc.REG_HCYCLE, 408); GD.wr32(vc.REG_HOFFSET, 70); GD.wr32(vc.REG_HSIZE, 320); GD.wr32(vc.REG_HSYNC0, 0); GD.wr32(vc.REG_HSYNC1, 10); GD.wr32(vc.REG_VCYCLE, 263); GD.wr32(vc.REG_VOFFSET, 13); GD.wr32(vc.REG_VSIZE, 240); GD.wr32(vc.REG_VSYNC0, 0); GD.wr32(vc.REG_VSYNC1, 2); GD.wr32(vc.REG_DITHER, 0); GD.wr32(vc.REG_PCLK_POL, 0); GD.wr32(vc.REG_PCLK, 8);
|
|
|
Post by NeX on Dec 8, 2015 1:05:38 GMT -8
ah ok so does the FTDI store information about the display in an eprom or? in the case of the gameduino2 is the FTDI chip pre programmed before the device is delivered or is the FTDI chip setup every time GD.begin is called?
|
|
|
Post by jamesbowman on Dec 8, 2015 9:29:15 GMT -8
The last one: the EVE controllers don't have any persistent storage. The MCU (in this case the Arduino) must set up the display parameters at boot.
|
|
|
Post by NeX on Dec 8, 2015 11:01:12 GMT -8
ok now i am a little confused, doesn't that mean that the library must have something in it that tells the arduino what settings to send to the FTDI?
|
|
|
Post by jamesbowman on Dec 8, 2015 14:24:30 GMT -8
Well yes. There's no 'discovery' method for these LCD panels. So at boot *something* has to set up the FT800 to drive the panel.
In the default case of a 480x272 panel, the Gameduino 2 library can handle it. For a different sized panel you can override the configuration in the application.
|
|
|
Post by NeX on Dec 8, 2015 22:28:28 GMT -8
Thanks for clearing that up, i understand now
|
|