Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 11 1 2 3 ... LastLast
Results 1 to 25 of 266

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

  1. #1
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566

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

    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:




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

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    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-...3-3V-4xSPI-DIY
    Which when I tried has a cracked screen, which shows up when you turn on the backlight
    Click image for larger version. 

Name:	IMG_0828.jpg 
Views:	7 
Size:	56.1 KB 
ID:	17063

    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.
    Click image for larger version. 

Name:	IMG_0830.jpg 
Views:	3 
Size:	58.0 KB 
ID:	17064

    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-s...splay-example/

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,313
    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 by MichaelMeissner; 07-24-2019 at 09:04 PM.

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    You guys are killing me

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

  5. #5
    Senior Member
    Join Date
    May 2016
    Posts
    220
    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.

  6. #6
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,313
    Quote Originally Posted by DerekR View Post
    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.


  7. #7
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,313
    Quote Originally Posted by mjs513 View Post
    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).

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    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.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    Quote Originally Posted by KurtE View Post
    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 KurtE; 07-26-2019 at 06:04 PM.

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    I now just ran: compiled and built graphictest program for this library for both T3.2 and T-LC

    And they both run. So I am now going to migrate all of these changes into the branch writerect_reset_delay
    As I believe things are better in this branch now and will hopefully be part of next PR taken into master.


    Edit: Done. https://github.com/KurtE/ST7735_t3/t...ct_reset_delay

  11. #11
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    @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:
    Click image for larger version. 

Name:	20190726_213452.jpg 
Views:	7 
Size:	83.2 KB 
ID:	17074
    Last edited by mjs513; 07-27-2019 at 12:48 PM.

  12. #12
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    Hi @mjs513 - Could you try both ways with the calls:

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

  13. #13
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    Quote Originally Posted by KurtE View Post
    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?

  14. #14
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    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

  15. #15
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    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

  16. #16
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    @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

  17. #17
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    Quote Originally Posted by KurtE View Post
    @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
    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.

  18. #18
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    @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.

  19. #19
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    Sounds like you got some working no_CS displays !

    Very odd an 8 bit int won't store a perfectly nice even value like 320 - maybe something on the interweb about that

    I'll solder one up and download the lib from github.com/KurtE/ST7735_t3/tree/writeRect_reset_delay

  20. #20
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    @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...

  21. #21
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,207
    @KurtE

    Wow - you really are going gun ho - now I cant wait till I get those other displays

  22. #22
    Senior Member
    Join Date
    May 2016
    Posts
    220
    @KurtE
    What's the problem??? ...Just use a uint9_t and you should be good to go

  23. #23
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,566
    @....

    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?

  24. #24
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    Good work KurtE - … I got my display out to solder ...

  25. #25
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,948
    soldered … Not doing _LC - but the github is still 5 hrs old? Is it updated elsewhere with the latest?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •