SPI display support on GHI's NETMF products

@ NJBuch - try this one - http://www.ebay.de/itm/200939222521 and dirt cheap …

I clarified my statement - sorry, I meant if Taylorza wants one since he helped out, I’d ship him one of mine

Thanks Brett, I appreciate the offer, before seeing that I had already placed an order for a couple. I saw a few nice features in the datasheet that I wanted to play with so I got excited :slight_smile:

1 Like

I hope you bought the one with the touch screen - haven’t played with that yet hint hint :wink: .

oh and a HUGE thanks for taking the time to crack into the datasheet !

@ Brett - I did get the one with the touch screen, that is not an area that I have spent much time with so I am not sure what my success rate will be.

Too be honest, I got lucky with the datasheet, when I opened it I noticed that the SPI interface was compatible with the ST7735 (N18), for which I had written the mbed driver previously, so the info was relatively fresh in my mind esp. since I had implemented switching orientation and flipping etc.

1 Like

Yeah I think Gus kind of mentioned that when he tested the ones I sent him that this SPI support was all working… but how compatible it is wasn’t clear (and I didn’t press/look). I think the current driver is sub-optimal and slow, and could really do with optimizing.

In these tests are you guys drawing by simply using Bitmap.Flush?

i’m using the driver and not flushing a bitmap, just it’s own bitstream to draw characters. At some stage I’d like to move to rendering onto a bitmap then flushing it but at the moment I don’t think it can easily do that

@ all - The graphics document now has a brief explanation on the use of SPI displays: https://www.ghielectronics.com/docs/34/graphics#3271. As discussed above, it is a bit limited and currently designed around the Display N18. A future SDK release will open it up to more general SPI display use getting rid of requirement of the below work around.

Specifically for the ILI9341, you will not want to set the backlight, control, or reset pins. You’ll have to use the above linked driver to initialize the display. Then create a bitmap that is 128x160 pixels. If you want to use the full display, you will have to draw each display quadrant (120x160) separately. When you are ready to flush the first quadrant to the display, set the draw window to X=0, Y=0, Width=120, and Height = 160, send the data byte (0x2C), set the control pin, and call bitmap.Flush(0, 0, 120, 160). Then draw the second (upper right) quadrant, set the draw window again, but with X = 120, then call flush the same way. Then do the last two quadrants, making sure to update the draw window X and Y position each time.

2 Likes

@ John - when you say “…use the above linked driver…” which post are you referring to? Are you saying the default N18 driver?

@ dekes1 - The one Brett linked: https://www.ghielectronics.com/community/forum/topic?id=19491&page=1#msg192675