FEZ Cobra III and SPI Display


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
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;

Bitmap b = new Bitmap(Display.Width, Display.Height);
Font font = Resources.GetFont(Resources.FontResources.NinaB);
b.DrawText("Hello, Display!", font, Color.White, 10, 10);
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:

So you drew text to the bitmap object b, but you didn’t then give that information to the Display object?

@ jdahlgren - SPI display support through the Display and Bitmap classes is only available on the G80.

According to https://www.ghielectronics.com/catalog/netmf the G120 and G400 have “SPI Display” support as well. Can you clarify what that means then?

@ Brett - The page has been corrected.

Jump over to vote this idea up! https://www.ghielectronics.com/community/forum/topic?id=23135&page=1#msg224098

@ Brett - We’re with ya Brett! We’ll prob fail, but we fail together.


@ John - Ok. But it got the same problem with my G80 Board, started of with that one.
So, it should work like this, if I go back to my G80 Board?

Any hints on what I may do wrong?

And a perhaps a more correct question!

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 :-[

Since you got it working on a G80 (https://www.ghielectronics.com/community/forum/topic?id=22728 ) you could just go back there to prove things are working. There’s also some snippets in the announcement https://www.ghielectronics.com/community/forum/topic?id=19491 that might help you understand how to do other functions

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 - Thanks for the tip of the driver. Will look at that!

And I did not have it working on the G80, got the same problem there.
Therefore I suspect I do something very wrong, or missunderstand something.

Drawing to the board-display on the G80 Board works fine.
Do I need to disable the board-display before using another SPI-channel?

I don’t understand. The thread that you first started on G80 concluded with “I finally got it to work”. So is that right, or wrong?

I’m not sure what you mean “board-display” either, perhaps you need to elaborate :slight_smile:

@ Brett - The other thread that I stated that I finally got it to work, was regarding the onboard-display on the G80 Board :slight_smile:
And I see now that I wrote “board-display” while I meant “onboard-display”, the one mounted on the G80 Dev Board, sorry :slight_smile:

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 :slight_smile: onboard-display on G80 dev-board I guess, and you have ILI9806E controller :slight_smile: 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