ST7789 Display with SDA and CLK pins only

Sorry I have not tried that type... Not sure RST probably does not have any pin wired to do it, ties it high or low...
DC, Good question, unless maybe it is using 9 bit SPI? You might have to look at their software to see if maybe that is what they are doing.
 
I think we can use FlexIO to send the 9th bit (to mimic DC). I just wanted to push 16bit 240x240 pixels image to the LCD.
 
If you’re not pushing images often, then the bit-banged library is probably the way to go, for simplicity. You might want to edit out the code that uses pin 22 (hard-coded…) as a reset (which the display doesn’t have…). You will also need to put a few microseconds’ delay in the pin driving functions, as a Teensy 4.0 will be way faster than the 16MHz AVRs it was originally designed for.
 
I wanted to push the camera frames at 30fps. I replaced the digitalWrite with digitalWriteFast at 912MHz overclocked (have a heatsink).
It takes around 45ms per frame so effectively 22.5fps that is not bad. But this takes up the CPU time. I think flexio will do it using DMA so it will free up the CPU to fetch the SPI camera frames.
 
Now I replaced the digitalWriteFast calls with the direct GPIO register writes and it takes 34ms per frame (30fps).
 
Probably could build a version of _t3 that does 9 bit SPI mode. I have not looked in awhile, but I believe we can set the output
of SPI to 9 bits, and then you have to setup to put the DC as the High bit if I remember correctly
 
Back
Top