I´m trying to get a Display working using my Cobra over SPI.
But i´m not getting anywhere, the display does´nt even response in any way.
It have +3.3V and ground.
And i have connected according to the display datasheet.
Display => FEX Cobra III
12 RESET TO D0
39 SCL - Serial clock input => D13
40 CS - Chip select signal => D1
41 SDI - Serial data input pin => D12
42 SDO - Serial data output pin => D11
And trying with this code:
Display.Type = Display.DisplayType.Spi;
Display.Width = 100;
Display.Height = 100;
Display.BitmapFormat = Bitmaps.Format.Bpp16RgbLe;
Display.CurrentRotation = Display.Rotation.Clockwise90;
Display.SpiConfiguration = new SPI.Configuration(FEZCobraIII.Gpio.D1, false, 0, 0, false, true, 8000, FEZCobraIII.SpiBus.Spi1);
Display.ResetPin = FEZCobraIII.Gpio.D0;
// Display.BacklightPin = G80.Gpio.PC7;
Display.Save();
Bitmap b = new Bitmap(Display.Width, Display.Height);
Font font = Resources.GetFont(Resources.FontResources.NinaB);
b.DrawText("Hello, Display!", font, Color.White, 10, 10);
b.Flush();
Debug.Print("Anything on the display?");
But i´m really stuck, nothing happens in the display.
Is there anything that a´m missing or have completely wrong?
This smiley is exactly how a´m feeling right now :wall:
What would the correct way to do it, if I need to implement a display (using SPI) with a G120 today?
Do I have to find/create a driver for that display?
As you may notice, I have a bit of a lack of knowledge around displays and how to work with them :-[
If you need to use an SPI display on a G120, then you should look for a driver that works, yes. There’s a native driver for a ILI9341 available on GitHub that I’ve contributed to. Unfortunately it’s still “labelled” as a netduino library but I can confirm it works fine with GHI kit, including the test harness app. I haven’t run it up on a Cobra but I have used it on non-G80 devices (smaller memory devices than G80 or G120) so know it works.
@ Brett - The other thread that I stated that I finally got it to work, was regarding the onboard-display on the G80 Board
And I see now that I wrote “board-display” while I meant “onboard-display”, the one mounted on the G80 Dev Board, sorry
Now I´m trying with another display, an external, using another SPI-bus.
Just downloaded your driver from github and started to read up, i have a ILI9806E controller on my display, but it will be some good reading to try to understand what i´m trying to do…
ok, two great extra pieces of info onboard-display on G80 dev-board I guess, and you have ILI9806E controller Without either of those pieces of info there’s a good chance we wouldn’t have got anywhere getting the alternate SPI display working on G80 either.
So using the ILI9341 driver you should at least be able to get the foundations working (or everything, they may be that similar). There’s usually not too much you can do to a controller to make it display a bitmap. The only challenge you may have is that in the scheme of things, the managed code driver is slower than the GHI in-firmware driver