Xinyuan-LilyGO / LilyGo-AMOLED-Series

LilyGo AMOLED Series
MIT License
88 stars 14 forks source link

Pin diagram needed for T-Display S3 Amoled TOUCH VERSION #9

Closed richgain closed 4 months ago

richgain commented 4 months ago

The pin diagram and board picture are for the non-touch S3 Amoled. I have several of these and they work well. I cannot get any of my code to work on the new Touch version of the T-Display S3 Amoled. I need to check for conflicts between the pins I am using to connect an SD card and the pins used for the touch sensor, but there is no accurate pin diagram available for this board.

lewisxhe commented 4 months ago

The display and pin headers on both sides are exactly the same as touch and non-touch. The only difference is that touch uses SDA = 3 SCL = 2 IRQ = 21 EN = 38 image

richgain commented 4 months ago

OK, thanks very much. It appears that my problem was not caused by pin incompatibilities, but by this issue: https://github.com/espressif/esp-idf/issues/8521

SDMMC_FREQ_DEFAULT is set to 20000. On the S3 Amoled Touch, my code stops with this error: E (510) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107 E (511) vfs_fat_sdmmc: sdmmc_card_init failed (0x107). ERROR: File system mount failed!

On the non-touch version it works perfectly.

lewisxhe commented 4 months ago

Has the problem been solved ?

richgain commented 4 months ago

No, I haven't been able to get it working yet.

richgain commented 4 months ago

Changed SDMMC_FREQ_DEFAULT from 20000 to 10000 - did not work. Reassigned pin mappings for the SD card to: // microSD card

define SD_SCK 42

#define SD_MISO 41
#define SD_MOSI 43
#define SD_CS 44

Success. This got the files opening in the Serial monitor window, but the screen is still blank.

richgain commented 4 months ago

Now I am investigating why the example code from LILYGO displays correctly, but my programs don't.

My uses the Arduino_GFX library from @moononournation. I tried running his PDQgraphicstest on both the Touch and Non-touch versions of T-Display S3-AMOLED. (https://github.com/moononournation/Arduino_GFX/tree/master/examples/PDQgraphicstest) The tests run perfectly on the Non-touch version, but the Touch version shows only a black screen. As before, the Serial monitor window shows that the code is running and delivers the results, but nothing is visible on the screen.

richgain commented 4 months ago

image NON-Touch

image TOUCH

lewisxhe commented 4 months ago

As I mentioned above, EN=GPIO38, this is the Pin that controls the power supply to the display screen. Using other libraries, you need to set IO38 to high level separately.

richgain commented 4 months ago

OK, thanks. I tried adding the following two lines into my void setup(), but still nothing on the screen yet. pinMode(38, OUTPUT); digitalWrite(38, HIGH);

Do I also need to add code for any of the other three pins? I assume these are only for the touch sensor. SDA = 3 SCL = 2 IRQ = 21

lewisxhe commented 4 months ago

I just tested it and it works fine after setting IO38 to HIGH

lewisxhe commented 4 months ago

I've added an example so you can test it

richgain commented 4 months ago

Brilliant! Thanks again. I have it working now. My mistake was adding the two new lines to the end of my void setup() section. As soon as I moved them up to the top everything worked.

lewisxhe commented 4 months ago

So, the problem is solved, I will close the issue