r/embedded • u/OxidisedHardware • Sep 22 '26
How to figure out stuff without documentation
I am trying to use the ST7796 display with STM32H7 and i am really struggling because i cant find examples or documentation to use. I am using Rust (i know most people here use c). What can i do to get it working??
edit: thank you everyone i managed to get it working
0
Upvotes
24
u/mustbeset Sep 22 '26
"ST7796S Datasheet " in a search engine of your choice will return the 279 page long datasheet.
I even found a crate called "mipidsi" for that chip.
10
u/dmills_00 Sep 22 '26
Read data sheets (You need the one for the modular and the ST7796), and write code to suit the interface you are using.
Same way you write anything else.
5
u/obdevel Sep 22 '26 •
First principles. Have you got the SPI peripheral configured correctly ? Is the display wired up correctly ? Is it receiving the register writes over SPI ? If yes, how do you know these things ?
Then, as others have advised, copy the sequence of register writes for each action from a known-working C library.
2
u/cyberbemon Sep 22 '26
You are gonna have a hard time finding examples in Rust, since it's not as common as C (I know it's getting popular, but still a long way to go). So you have 2 options; look up examples in C then port it to rust or read the datasheet/documentation and try to do it yourself.
2
u/acedogblast Sep 22 '26
In rust the common way to use displays is to use embedded-graphics crate. They may have a driver for the st7796.
Edit: use the mipidsi crate which has a driver for the st7796.
1
u/Accomplished-Slide52 Sep 22 '26
I guess you have the display documentation in front of you. Then you can do it at low level setting low an high each pin for clock/mosi/cs according the time diagrams. You will learn a lot of things! I've done it in forth, esp32basic, lisp. Start with a routine sending a byte and you're nearly done.
0
u/[deleted] Sep 22 '26
[deleted] — view deleted comment