TTGO-Display with display working!

If doesn't fit into any other category ....
Post Reply
AndyGadget
Posts: 222
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 120 times
Been thanked: 132 times

TTGO-Display with display working!

Post by AndyGadget »

A rather frustrating afternoon!
I've mentioned elsewhere that I've used the TTGO-Display modules (ESP32 module with attached ST7796 240 x 135 display) with the display removed as they are a small module with LIPO management and a very low sleep current; around 0.5mA if I recall correctly. They were pretty cheap when I bought a handful as well. With the new assignsable pin features of Annnex 1.47.2 I was wondering if there was any chance of getting the display to work . . . and I succeeded!

I tried this on a virgin module with display still attached and had everything working fine, albeit with an offset for the X and Y values for any TFT commands. I was just about to take photos of the result to post the proof when the module stopped responding. I get the 'gloink' when I attach to
PC, but no life from the com port. I've tried to re-flash with Arduino bootloader but still no life at all - It just times out. Looks like a dead 'un.
So, I tried to resolder one of the displays I removed to another board and although I can get the display lit, I'm getting no display. It's possible I damaged the display in removing it as I didn't envisage using it again, but I don't know.

Anyway, the driver to use is the ILI9488 which is a 320 x 480 display. The TTGO is 240 x 135 and acts as a 'window' on the larger display so all you need to do programming-wise is add an X offset of 40 and a Y offset of 52 and work within the confines of a 240 x 135 display. So top left corner is 40,52 and bottom right is 279,187. Pin connections for the config screen are in this demo program. (power off / power on after saving.)

(Just looked and these are now going for at least £13 on Aliexpress! I got mine for around £3:50.)

Code: [Local Link Removed for Guests]

'
' Demo of 240 x 135 TTGO-Display board.
'
' Select ILI9488 driver.
' On ADVANCED tab :-
' MOSI  19
' SCLK  18
' CS    5
' RST   23
' DC    16
' BL    4

tft.init 2
tft.fill blue
tft.text.color yellow
tft.text.font 4
tft.text.pos 88,100
tft.print "Annex RDS"
tft.text.pos 88,130
tft.print "is GREAT!"

TFT.circle 40,52,10,red,1
TFT.circle 40,187,10,red,1
TFT.circle 279,52,10,red,1
TFT.circle 279,187,10,red,1

do
  for xx = 255 to 0 step -1
    tft.brightness xx
    pause 10
  next xx
  
  for xx = 0 to 255
    tft.brightness xx
    pause 10
  next xx
loop 
AndyGadget
Posts: 222
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 120 times
Been thanked: 132 times

Re: TTGO-Display with display working!

Post by AndyGadget »

Just an update to this - Something I missed first time round :-

The TTGO-Display does actually work perfectly with the ST7789#1 driver configuration; no offsets required.
Here is my updated test program.

Code: [Local Link Removed for Guests]

'
' Demo of 240 x 135 TTGO-Display board.
'
' Select ST7789#1 driver.
' On ADVANCED tab :-
' MOSI  19
' SCLK  18
' CS    5
' RST   23
' DC    16
' BL    4
'
tft.init 3
tft.fill blue
tft.text.color yellow
tft.text.font 4
tft.text.pos 55,45
tft.print "Annex RDS"
tft.text.pos 55,70
tft.print "  is GREAT!"

TFT.circle 0,0,30,red,1
TFT.circle 0,134,30,red,1
TFT.circle 239,0,30,red,1
TFT.circle 239,134,30,red,1

do
  for xx = 255 to 0 step -1
    tft.brightness xx
    pause 1
  next xx
  
  for xx = 0 to 255
    tft.brightness xx
    pause 1
  next xx
loop
Post Reply