Main Site Documentation

FEZ Cerb40 II and N18 Display


#1

Hi All,

I have an application where I want to fit a small graphics screen into a product. The Windows cell phone I’ve been using as a C# programmable device works great but the screen is too large for the final product. I see that GHI carries a small N18 display that is a good size for us.

Does the FEZ Cerb40 II board bring out the proper pins to connect to a Display N18 Module (1.8" color display)? Is it also possible to write graphics to the 128x160 resolution screen at 30 fps through the SPI interface?

Thanks!


#2

Regarding Pins = I’m able to use the N18 with my CerbuinoBee, so the answer should be yes.

Regarding 30fps - what are you trying to do – show a video or just update parts of the screen at a time?


#3

Hi mhectorgato,

I am trying to make a screen with a big analog gauge on top and a digital readout below it. It actually looks like a watch but one that can update at 30 fps to show sensor data. I’m new to these SPI screens but if they have a screen buffer then maybe I can just write only the screen changes and then do a screen update.

Thanks


#4

I’ve yet to play with the new SDK, but it allows greater flexibility in using the SimpleGraphics (and I think Glide) libraries.

Certainly the less changes you make to the screen the more responsive it will be.

My codeshare (with video) was quickly put together, so there’s not been much performance enhancement – I’m sure the RLP/buffer guys could squeeze more performance out of it. Also, it’s intent is a simple debug output.

The project simply:

  1. reads the X/Y from the joystick (which is using AnalogInputs).
  2. adding a string containing the values to a list
  3. if the list exceeded the amount of lines I could draw, remove the extra line
  4. output the lines of text on the screen, 2 at a time.

For #4, I first draw a black rectangle in the area to be updated, and then draw the 2 lines of text.

https://www.ghielectronics.com/community/codeshare/entry/786


#5

mhectorgato,

Thanks for the code share. It looks like fonts are handled for me but I’m still unsure about wether or not it is possible to draw to only specific pixels on the display to speed things up.


#6

To draw a black 128 wide by 24 tall rectangle onto a same sized bitmap:

bitmap.DrawRectangle(Microsoft.SPOT.Presentation.Media.Color.Black, 0, 0, 0, 128, 24, 0, 0, Microsoft.SPOT.Presentation.Media.Color.Black, 0, 0, Microsoft.SPOT.Presentation.Media.Color.Black, 0, 0, 0);

To submit that wide & short bitmap to the N18, not filling up the entire screen, just a slice if you will:

 _display.Draw(bitmap, (uint)0, y);

If you want to modify specific pixels, you can do so on a bitmap via Bitmap.SetPixel (Int32, Int32, Color)

Also, the GHI SDK updated just recently provided improvements to N18 drawing on Cerb devices:

https://www.ghielectronics.com/support/.net-micro-framework/sdk/4/netmf-and-gadgeteer-package-2013-r2


#7

mhectorgato,

Thanks. I plan to buy the FEZ Cerb40 II running at 168mHz and compare it with a Teensy 3 running at 48 mHz (Arduino IDE) to see which can drive the SPI display faster. Hopefully the Cerb40 II is faster but I’m not sure about the overhead due to the managed .NET display calls.