ST7789_t3 (part of ST7735 library) support for displays without CS pin

KurtE

Senior Member+
Continued from the T4 thread as nothing in this is T4 specific.

@MichaelMeissner @Defragster - ST7789 without CS pins - Maybe should create a new thread as not really T4 specific...

I have tried out a couple of these and have not had much luck...

https://smile.amazon.com/gp/product/B07P9X3L7M/

This includes a couple of interesting images:

612gnrUwDTL._SL1200_.jpg

71Wm8civGdL._SL1200_.jpg


Note the Adafruit library has since been edited, where you can directly pass in the SPI mode to use, instead of hard coding it to SPI_MODE0. It does default to Mode 0

Kurt

P.S. - I went ahead and ordered one of those cheap ones that should arrive whenever the boat gets here...
 
Update: As I think I mentioned I ordered a few different ones of these.

Two of them from Amazon: https://smile.amazon.com/gp/product/B07P9X3L7M/
Which I was having difficulty with first one, and totally screwed up when I tried removing the screen from the board, and the 2nd one the backlight does not work at all...

And one from EBay (ship from US): https://www.ebay.com/itm/US-1-3-IPS...ay-Module-ST7789-240-240-12Pin-3-3V-4xSPI-DIY
Which when I tried has a cracked screen, which shows up when you turn on the backlight :( :mad:
IMG_0828.jpg

But it showed some promise when I tried connecting it up to Adruino UNO, running Adafruit graphic test using SPI_MODE2 (which you can pass in as 3rd parameter of init call.
IMG_0830.jpg

Note: I am probably abusing the display (but DOA anyway). As I believe the display runs at 3.3v although SPec: https://www.waveshare.com/w/upload/a/ad/ST7789VW.pdf
Says maybe max of 4.6v Vin... But I believe all of these have a small VR on them....

Edit: Some places that talk about hooking up an ST7789 show using a voltage divider to lower voltages going to display, like:
https://simple-circuit.com/arduino-st7789-ips-tft-display-example/
 
This is kind of a scatter shot reply.

Yep, I ordered mine before realizing they were problematical. At $4 +/- per display, I'm not going to be too heart broken if they don't work. Of course with china post, it will be some time before they arrive.

I believe I will order 2 of the wavelan boards shortly that have the proper CS pin (or even order the Adafruit boards).

But it would be interesting to see if we can make these work.

I recall at one point, Paul saying the motivation for selling the ILI9341 out of PJRC.COM was the number of these cheap displays are just bad, and they were having to reject a percentage of the displays.

I suspect without a CS pin, it is probably problematical to have anything else on the SPI bus.

I suspect you've played with a tri-state buffer (https://www.pjrc.com/better-spi-bus-design-in-3-steps/), but if not, I wonder if it would work. I would imagine not, but you never know with these cheap devices.

On the boards with the CS pin, I assume in comparing the 240x240 boards to the 128x128 boards, that some things will slow down, just due to having 3.5 times the data to transfer. It might be interesting to see whether a 240x240 TFT IPS display is faster than the 128x128 OLED display (given how on many OLED displays you have to turn down the SPI bus speed).

I'm curious how the TFT IPS screen looks compared to the OLED. In theory, IPS should solve one problem of the normal TFT displays (namely the angle of view).
 
Last edited:
You guys are killing me :)

Just ordered a ST7789 240x240 display and a 320x240 display from adafruit. Will see when I get them :)
 
Has anybody tried Adafruit's 3.5" 320x480 - HXD8357D (PRODUCT ID: 2050), or the version for their Feather boards? They're expensive ($40), but if they work I'd be prepared to give it a try... Adafruit has a library.

BTW - it's probably heresy to say it here, but I've been playing with the ESP32 Feather for a couple of days, not for the WiFi/Bluetooth, but to play with a dual core and to learn freeRTOS. It's a fun speedy little devil BUT no floating point, and that's a killer for me! FWIW it would plug right into the back of the above TFT display.
 
Has anybody tried Adafruit's 3.5" 320x480 - HXD8357D (PRODUCT ID: 2050), or the version for their Feather boards? They're expensive ($40), but if they work I'd be prepared to give it a try... Adafruit has a library.

I haven't used that display. Note, I believe on the feather board if you use the Teensy -> Feather adapter, you have to mount the Teensy so that the feather wing is underneath the Teensy. Normally, I have the feather wings on top of the Teensy (and then you mount the Teensy normally in a breadboard or protoboard to use the pins in the normal Teensy fashion.

 
You guys are killing me :)

Just ordered a ST7789 240x240 display and a 320x240 display from adafruit. Will see when I get them :)

Just in case you weren't aware of it, on Wednesday nights at 8:00pm, there is an Ask the Engineer video from 8:00pm to 9:00pm. They usually have a 10% discount on stuff, and the code is good through midnight on the day the show runs. It helps a little (the code for the next 40 minutes is tinyML on July 24th).

I too broke down and order two of the 1.3" 240x240 displays. I find here in Massachusetts, I almost always get the goodies on Friday morning (the stuff ordered with the discount seems to always go out on Thursday's UPS, but if I didn't do the discount, it usually takes a day or two longer).

I checked over at the thread about uncanny eyes on the Adafruit forum (I hardly ever go there any more), and I saw the creator say that right now the IPS displays (i.e. the STT7789 displays) won't work on Teensy at this time. I imagine we might be able to address that.... (at least with the T4, I'm not sure the 3.6 has enough ram for the display).
 
I thought I would mention, that I have been making some changes in my branch of the st7735_t3/89 library, to support frame buffers and updateScreenAsync on T4/T3.5/T3.6 and have updated the branch https://github.com/KurtE/ST7735_t3/tree/FB_Asynch

I have it now able to update two displays asynchronously using SPI and SPI1. Test case works for both ST7735 and ST7789.

Also updated the ST7789 support, to hopefully work on the 320x240 version of ST7789. Don't have one of those displays to try out...

As for the displays without CS pins...
Ebay seller has refunded the price of cracked one
Amazon seller - is corresponding and may refund...

And 2nd Amazon sellers version should arrive later today.
 
I thought I would mention, that I have been making some changes in my branch of the st7735_t3/89 library, to support frame buffers and updateScreenAsync on T4/T3.5/T3.6 and have updated the branch https://github.com/KurtE/ST7735_t3/tree/FB_Asynch
...
As for the displays without CS pins...
...

Nice work KurtE - not looked yet - but sounds good.

As far as the two 240x240_st7789_noCS displays - they were each shipped in a clear fitting plastic box with straight and angle header pins - hopefully they will be good when I hook them up.
 
Last edited by a moderator:
@KurtE

Ok - got my 2 adafruit boards wired up and tested on a T4 using graphicsTest.ino.

1. 240x240 - worked no issues displayed nicely. Didn't look too close at colors but think they are right will look more tomorrow when my eyes aint crossed.

2. 240x320: not working. By not working the sketch is only running in about 240x80 region of the screen nearest the pins. Otherwise the sketch still ran.

This is just a heads up before I crash for the night - have one more thing to do with freqcount then that's it.

EDIT: This is what it looked like:
20190726_213452.jpg
 
Last edited:
Hi @mjs513 - Could you try both ways with the calls:

init(240,320) which I think is correct, but might try init(320,240);
 
Hi @mjs513 - Could you try both ways with the calls:

init(240,320) which I think is correct, but might try init(320,240);

Already tried that. Displays with a 80x240 window. If I do a 240x240 it does display the graphics in lower part of image above and from 0 t0 80 its just grayed out. Tried also to change the window address but that didn't work either. Was going through everything but didn't see any issue unless its with raset itself for the end region?
 
Thanks,

By chance did you try it out with the Adafruit_st7789 library?

I will double check again that I picked up the changes that they made...

P.S. - Just picked up the different vendors version of the CS challenged 240x240 so will see how that one works
 
Ok. Just downloaded it and gave it a try and its working with the 240x320 display so like you said maybe you missed a change. Easy enough to do with all this :)

Cool you got the ones with no cs pin = mine are still on its way from China :)
 
@mjs513 - Good to know.

I just pushed up some changes, you might see if they fix it (fingers crossed).

Found that storing things like screenHeight into an uint8_t may not work well with a value 320 :eek:
 
@mjs513 - Good to know.

I just pushed up some changes, you might see if they fix it (fingers crossed).

Found that storing things like screenHeight into an uint8_t may not work well with a value 320 :eek:

Well - that got it working just like the Adafruits version :) of graphicsTest. Also ran rotationTest and speedtest with no issues. So now verified it works with their 240x320 display.
 
@mjs513 @defragster - I just pushed up a hack (fix) to the CS challenged.

Although probably need to put a little more work in and check for CS pin of -1 (0xff) and not try to use it at all. Right now I just don't hook up the CS pin, I left it as pin 10.
 
@defragster and @mjs513... Also just put in code to check for -1 actually for 0xff for cs pin and not process it.

The only code base of this I have not yet updated is for the TLC - will do that now...
 
@....

Fixed the T-LC code to run on the CS challenged board. Also combined a few of the commits. So I think I am done for now...

I mean there are always more things that COULD be done, but I think I will punt.

Example: with the st7735 example the 128x128 one could enable the frame buffer support: 128x128x2= 32768 which is < 64K memory so that would fit...
Even the 128x160*2 would fit 40960... But obviously not the st7789 ones...
So not sure if it would ever make sense to enable it?
 
Back
Top