Help with ESP32-8048S043C

All that relates to the H/W
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Help with ESP32-8048S043C

Post by Starraker »

I just love these display boards connected to ESP32 chips. One of them I am puzzling over is the ESP32-8048S043C. It is very much like the smaller ESP32-3248S035c but works in a different way because of its screen which is described as an IPS TFT.

The board connects to the Web Installer 4 and it installs ok but after it finished the Annex bumble bee does not appear on screen. In fact the screen remains black.

After consulting the 1.70.2 help I used the WiFi editor to program in the VGA commands to get the screen working but nothing happened. The screen still remains black.

I had a look at the config tab and changed the entry to ESP32-8048S043C but could not find a TFT video driver that worked - I tried all of them including NO TFT but nothing worked.

I know I must be doing something wrong but I do not know what.
User avatar
cicciocb
Site Admin
Posts: 2783
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: Help with ESP32-8048S043C

Post by cicciocb »

Use the config for the ESP32_8048S070C . It should work too.

edit :
Apparently the GPIO for the display colors are connected differently :
use the following pages to determine the correct configuration :

https://esp3d.io/ESP3D-TFT/Version_1.X/ ... n-70-8048/ '7.0"
https://esp3d.io/ESP3D-TFT/Version_1.X/ ... n-43-8048/ ' 4.3"


Simply put the correct wiring into the line
VGA.PINOUT R0, R1, R2, R3, R4, G0, G1, G2, G3, G4, G5, B0, B1, B2, B3, B4, HSYNC, VSYNC, DE, pCLK
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Help with ESP32-8048S043C

Post by Starraker »

Francesco,

There is life out there..... Thank you once again. This is the code for the ESP32-8048S043C (quite different to the ESP32-8048S070C - strange!)

VGA.PINOUT 45, 48, 47, 21, 14, 5, 6, 7, 15, 16, 4, 8, 3, 46, 9, 1, 39, 41, 40, 42
VGA.INIT 10
PIN.MODE 2, output ' backlight
PIN(2) = 1

I used this with ESP32-8048S070C set as the module and M5Stack #2 as the TFT in the Config (I do not know if the TFT makes a difference or not).

I haven't fully tested it but it accepted the program lines above.... now to the tests!!!

The data was gleaned from:
https://esp3d.io/ESP3D-TFT/Version_1.X/ ... e_vignette

Once again thank you
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Help with ESP32-8048S043C

Post by Starraker »

Francesco,
The following program (adapted from your program in 2020) worked. So I am in business - thank you

'Program for ESP32-8048S043C. DO NOT CHANGE VGA.PINOUT. It is different to ESP32-8048S070C
'......................................__________________________...........................................
'
I2C.SETUP 19,20 'SETUP Touch
I2C.BEGIN 0x5D
'
'VGA.PINOUT R0, R1, R2, R3, R4, G0, G1, G2, G3, G4, G5, B0, B1, B2, B3, B4, HSYNC, VSYNC, DE, pCLK
VGA.PINOUT 45, 48, 47, 21, 14, 5, 6, 7, 15, 16, 4, 8, 3, 46, 9, 1, 39, 41, 40, 42
'VGA.SETUP hFront,hSync, hBack, hRes, vFront, vSync, vBack, vRes, frequency [,vClones=1] [,nb_pages=1] [,outSize=1] [,aligned]
VGA.SETUP 16,96,48,800,10,2,33,480,25175000,0,0,2 '[800 x 480]
VGA.INIT 10
PIN.MODE 2, output ' backlight
PIN(2) = 1
'pwm.setup 2, 7, 128 ' set the backlight at 50% (128/255)
vga.delete
vga.setup 12, 20, 64, 320, 9, 3, 20, 240, 16000000, 0, 0, 2 ' 320x240
vga.fill black
vga.show
tft.loadfont "/fonts/FreeMonoBold10pt7b.bin", 10
vga.text.color green, black
vga.text.size 2
vga.text.font 3
vga.text.draw "Annex For ESP32-S3 - Resolution 320 x 240",10,10
vga.show
pause 2000
w = 320 : h = 240
vga.rect 0,0,w,h, white
a = 0
for a=0 to 400 step 0.05
x = cos(a)* w/3+w/2
y = sin(a)* h/3+h/2
vga.circle x,y,10, rnd(65536), 1
vga.rect 123, 107, 70, 25, white, 1
vga.text.draw str$(a, "%3.2f"), w/2, h/2
vga.show
next a

pause 2000
vga.delete
vga.setup 40, 104, 48, 640, 10, 2, 33, 480, 26000000' 640x480
vga.fill black
vga.show
tft.loadfont "/fonts/FreeMonoBold10pt7b.bin", 10
vga.text.color green, black
vga.text.size 2
vga.text.font 3
vga.text.draw "Annex For ESP32-S3 - Resolution 640 x 480", 10, 10
vga.show
pause 2000
w = 640 : h = 480
vga.rect 0,0,w,h, white
a = 0
for a=0 to 400 step 0.05
x = cos(a)* w/3+w/2
y = sin(a)* h/3+h/2
vga.circle x,y,10, rnd(65536), 1
vga.rect 275, 230, 90, 22, white, 1
vga.text.draw str$(a, "%3.2f"), w/2, h/2
vga.show
next a
qui:
pause 2000
vga.delete
vga.setup 16,96,48,800,10,2,33,480,25175000 ' 800x480
vga.fill black
vga.show
tft.loadfont "/fonts/FreeMonoBold10pt7b.bin", 10
vga.text.color green, black
vga.text.size 3
vga.text.font 3
vga.text.draw "Annex For ESP32-S3 - Resolution 800 x 480",10,10
vga.show
pause 2000
w = 800 : h = 480
vga.rect 0,0,w,h, white
a = 0
for a=0 to 400 step 0.05
x = cos(a)* w/3+w/2
y = sin(a)* h/3+h/2
vga.circle x,y,10, rnd(65536), 1
vga.rect 328,222, 140, 35,white,1
vga.text.draw str$(a, "%3.2f"),w/2,h/2
vga.show
next a
'.................................................
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Help with ESP32-8048S043C

Post by Starraker »

Francesco,

I might have been a little overjoyed in my last post. Whereas the last program worked and worked quite well the following short program did not and I do not know why;

OPTION.TOUCH 1
I2C.SETUP 19,20
I2C.BEGIN 0x5D
TOUCH.INIT
'VGA.PINOUT R0, R1, R2, R3, R4, G0, G1, G2, G3, G4, G5, B0, B1, B2, B3, B4, HSYNC, VSYNC, DE, pCLK
VGA.PINOUT 45, 48, 47, 21, 14, 5, 6, 7, 15, 16, 4, 8, 3, 46, 9, 1, 39, 41, 40, 42
'VGA.SETUP hFront,hSync, hBack, hRes, vFront, vSync, vBack, vRes, frequency [,vClones=1] [,nb_pages=1] [,outSize=1] [,aligned]
VGA.SETUP 16,96,48,800,10,2,33,480,25175000,0,0,2
VGA.INIT 10
PIN.MODE 2, output ' backlight
PIN(2) = 1
'pwm.setup 2, 7, 128 ' set the backlight at 50% (128/255)
OnTouch touchme

wait



touchme:

touch.read 'Read the calibrated position

VGA.TEXT.DRAW "touched "+ STR$(touch.x) + " " + STR$(touch.y) + " " + STR$(touch.z) , 10, 10

return

As you can see the first few lines are the same (except for enabling touch) but the VGA screen presents a round blue circle with text in the middle rolling across the screen to the right and a slow roll vertically with a red box around each screen.

This VGA thing seems to be a lot trickier than I initially thought.

Any ideas?
User avatar
cicciocb
Site Admin
Posts: 2783
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: Help with ESP32-8048S043C

Post by cicciocb »

You must use only VGA.INIT 10 (or VGA.INIT 11) and not VGA.SETUP xx, yy ......

edit :
additionally in the setup command that you tried there are several errors in the parameters.

For your info, the parameters are :

//hFront,hSync, hBack, hRes, vFront, vSync, vBack, vRes, frequency, vClones = 1, outSize=1, aligned=true)
const VGAMode LCDRGB_800x480(210, 30, 16, 800, 22, 13, 10, 480, 12500000, 1, 2, false); //MODE 10
const VGAMode LCDRGB_800x480_aligned(20, 8, 8, 800, 5, 5, 5, 480, 12500000, 1, 2, true); // MODE11
const VGAMode LCDRGB_800x480_aggressive(20, 8, 8, 800, 5, 5, 5, 480, 14000000, 1, 2, true); //MODE 12
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Help with ESP32-8048S043C

Post by Starraker »

Francesco,

Thank you for help

Wow you have really thrown me. I have never seen BASIC syntax like that in your parameters before.

I commented out the VGA.SETUP and used just VGA.Init 10 (and 11) but all I got was a white vertical line down the middle of the screen.
Then I tried the new syntax several times but these came up as errors in the program. I consulted with Annex32 Help 1.70.2 but I could not see anything there. I even went to GitHub to see if I could find something there .... no result. I looked all around the internet to see if I could find the VGA back porches, syncs, and front porches values like the ones in the new syntax but no go. I accept that yours are the correct ones but nothing even close on the several VGA timing calculators (most of them ignore WVGA like in this screen)

It led me to believe that I am operating with the wrong release of software and referring to the wrong Help File. I am currently on release:
"Annex32-S3 BLE CAN DMT VGA HID 1.70.3 qio opi LFS" as this was the one the closest that mirrored your comments about ESP32-S3 in the help file but I admit I was guessing about this.

What software release should I be working with and to what Help File should I be referring?
User avatar
cicciocb
Site Admin
Posts: 2783
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: Help with ESP32-8048S043C

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Jan 25, 2025 7:31 pm Francesco,

Thank you for help

Wow you have really thrown me. I have never seen BASIC syntax like that in your parameters before.

I commented out the VGA.SETUP and used just VGA.Init 10 (and 11) but all I got was a white vertical line down the middle of the screen.
Then I tried the new syntax several times but these came up as errors in the program. I consulted with Annex32 Help 1.70.2 but I could not see anything there. I even went to GitHub to see if I could find something there .... no result. I looked all around the internet to see if I could find the VGA back porches, syncs, and front porches values like the ones in the new syntax but no go. I accept that yours are the correct ones but nothing even close on the several VGA timing calculators (most of them ignore WVGA like in this screen)

It led me to believe that I am operating with the wrong release of software and referring to the wrong Help File. I am currently on release:
"Annex32-S3 BLE CAN DMT VGA HID 1.70.3 qio opi LFS" as this was the one the closest that mirrored your comments about ESP32-S3 in the help file but I admit I was guessing about this.

What software release should I be working with and to what Help File should I be referring?
The lines I gave you are just the internal value set when you choose the mode 10, 11 and 12.
Are just for reference.

Consider that the parameters are taken only if you delete the VGA, so I suggest to put VGA.DELETE at the first line of your program.
User avatar
Starraker
Posts: 30
Joined: Tue Sep 03, 2024 1:53 am
Location: Canberra Australia
Been thanked: 7 times
Contact:

Re: Help with ESP32-8048S043C

Post by Starraker »

Francesco,

Thank you once again. I hope that I did not upset you.

If I understand you - Once I execute VGA.PINOUT and VGA.SETUP with their correct values and then VGA.DELETE ; these values are stored in the ESP32 chip and I do not have to repeat that part of the program in the next. From then I just do VGA.DELETE and the VGA.INIT and the values from the first run are used. So the first few lines of any program are:

VGA.DELETE
'Initiate TOUCH (if needed)
'Initiate second I2C (if needed)
'Initiate other buses (if needed) then:

VGA.INIT 12
PIN.MODE 2, output ' backlight
PIN(2) = 1

I hope that I got that right because I am trying to fully understand how this is implemented
User avatar
cicciocb
Site Admin
Posts: 2783
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: Help with ESP32-8048S043C

Post by cicciocb »

No worries, I just dropped this module for a while and completely changed topics, so I had trouble getting back to it.
The problem is that between the time I develop functions and the time I get feedback, so much time passes (sometimes years) that I've forgotten or sometimes even deleted them due to lack of interest.

Anyway, to get back to the subject, I finally found my ESP32-8048S070 full of dust in a drawer and turned it on.
Fortunately, there was an SD card with test programs I made at the time.

I did an update with version 1.70.5 and I see that it works correctly, including the touch.

An important thing concerns the power supply: I recently changed my PC and I realized that this module doesn't work with the current PC because it requires too much current from the USB port; I had to use an external USB power supply for it to function correctly and I lowered the backlight brightness by using the command: pwm.setup 2, 7, 64 instead of pin(2) = 1.

I'm attaching here a small zip package that contains test programs, including a small web radio / weather / jokes (webradio5.bas); you'll need your OpenWeather API ID to view weather information.

Well, apart from changing the pinout for your module, all the demos should work correctly.

Good luck and keep me posted.
demo_ESP32-8048S070.zip
You do not have the required permissions to view the files attached to this post.
Post Reply