ST7796S with Blackpill #3557
Replies: 2 comments 4 replies
-
You sure that the backlight is on? I don't see LED pin configured. Is it connected directly to Vcc? Hosyond site says leave it not connected if no control needed but make sure it is not tied to GND. I found some differences in init sequence in the Hosyond samples. I can write a different ST7796_init.h file so you can test. Give me some time (now+12 hours), tomorrow morning, I will send a link. Hopefully you won't need a slap |
Beta Was this translation helpful? Give feedback.
-
Yes, I'm sure. I read the same thing - leave it floating or connect to +5 or +3.3. Thanks for the help with the init. I'll take a look at it in the meanwhile and see if I can make any sense of it. |
Beta Was this translation helpful? Give feedback.
-
I try to be "self-service" on my projects but I'm stumped on this one. I was able to successfully build a TFT_eSPI project with some sample code using a WeAct Blackpill V3 (STM32F411) and a ST7786 display over SPI. But I needed a bigger display, so I switched to a Hosyond ST7796S link here. (the one I have has a touch screen, but that is not being implemented - yet).
I used the same pins that worked for the ST7786, but have not been able to get the ST7796 to work - just a backlit screen. I'm doing my configuration via platformio.ini. The relevant lines are:
-D USER_SETUP_LOADED=1
-D ST7796_DRIVER=1
-D TFT_WIDTH=480
-D TFT_HEIGHT=320
-D TFT_MOSI=PA5
-D TFT_SCLK=PA7
-D TFT_CS=PB13
-D TFT_DC=PB12
-D TFT_RST=PB15
-D SPI_FREQUENCY=27000000
The pins chosen are those available in the project and as stated above, these pins worked fine with the ST7786. I've checked the wiring multiple times, and I even connected my scope up to verify activity. (I'm very much a novice using the scope)
I'm using an Arduino framework for my projects.
I've also run the setup_test code and see this for the pins:
MOSI = GPIO -59
SCK = GPIO -57
TFT_CS = GPIO 28 //maps to PB13 as in platformio.ini
TFT_DC = GPIO 27 //maps to PB12 as in platformio.ini
TFT_RST = GPIO 30 //maps to PB15 as in platformio.ini
I confess that the MOSI and SCK look strange, but they work for the ST7786. Everything else in the setup_test output looks correct - driver, SPI frequency, etc.
I'm fairly sure I'm not seeing the forest for the trees, and there's a head slap coming my way, butif anyone can push me in the right direction, I'd appreciate it.
Steve
Beta Was this translation helpful? Give feedback.
All reactions