logo elektroda
logo elektroda
X
logo elektroda

Connection of LCD IPS 0.96 ST7735S SPI to SEEED XIAO ESP32C6 - schematic and code needed

seeb 378 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21646437
    seeb
    Level 13  
    I'm doing a project that would basically be finished if it weren't for the fact that I2c proved too slow even when refreshing only part of the screen.

    The project generates the LTC Audio timecode, displays the timecode on the display and synchronises the TC with the clock from the GPS satellites.
    Unfortunately, the project works fine up to 30fps settings (24,25,29.98,30fps including NDF and DF modes) at 50 and 60 frames there starts to be a problem with the display, which fails to display FF (LTC SPMTE clocks have the format hh:mm:ss:FF - where FF is the currently recorded frame). Up to 38 can handle the display.
    The project is based on BLE 5.x and/or ESP_NOW connectivity, wi-fi depending on the definition in the configuration. It connects to the rest and announces what time it is :D up to 600ms and the receivers synchronise this time if the delay of their clock is too great.

    I am using a SEEED XIAO ESP32C6, DS3231, NEO-6M in my project.
    A0 is occupied by audio out
    D4 and D5 are occupied by i2c clock ds3231 (also oled display 0.96 before)
    D6 and D7 are occupied by serial for GPS data
    D1-D3 and D8-D10 is free to use SPI unfortunately I have not been able to find a configuration on these pins to make this work.

    I discovered that if I connect e.g. under the UART and use just the pin digit as described then the GPS does not connect but after changing the pins from 7 and 8 to D7 and D8 everything works. same with I2c. The problem arises with SPI because I'm wandering a bit in the dark....

    wyswietlacz-lcd-ips-0-96-160x80px-spi
    modul-seeed-xiao-esp32-c6-wifi-6-bluetooth-5
    To date I have not been able to get it to work with this board.
    Can someone post what useful schematic for connecting this display on ST7735s with Xiao esp32c6 module and a piece of code that will display anything on this screen?
    I don't want some kind of ready made thing that does something I need to get out of a problem that's keeping me up at night. Let it display something, anything, and I can continue. Please take into account the number of pins on the board as there are not many. I won't need e.g. addressing the display because it's the last device of the project so no need to check which device is on SPI.
    Thanks in advance for your help.


    Links are for reference.

    https://www.tinytronics.nl/image/cache/catalo...0-pixels-spi-st7735s-3.3v-front-1500x1500.jpg is the screen
    https://www.sigmdel.ca/michel/ha/xiao/img/xiao_esp32c6_pinout_top.png is the board ...
  • ADVERTISEMENT
  • #2 21647438
    inot
    Level 38  
    I don't know if this description helps anything Link .
    Application example: Link .
  • ADVERTISEMENT
  • #3 21648359
    seeb
    Level 13  
    For posterity:
    
    //GND -> GND
    //VCC -> 3.3 V
    #define TFT_SCL       19  //SCK  //Pin D8  XIAO
    #define TFT_SDA      18  //MOSI //Pin D10 XIAO
    #define TFT_RES       21  //RES  //Pin D3  XIAO
    #define TFT_DC        2    //DC   //Pin D2  XIAO
    #define TFT_CS         1    //CS   //Pin D1  XIAO 
    //BLK -> 3.3 V
    
    Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_SDA, TFT_SCL, TFT_RES);
    
    .

    I am not closing the topic yet, because I might add something else here.
    To sum up, UART and i2C operate on D pins, i.e. just like the first line, while SPI operates on GPIO. Such a strange peculiarity of this board.
  • ADVERTISEMENT
  • #4 21648367
    inot
    Level 38  
    seeb wrote:
    In summary, UART and i2C operate on the D pins which is the same as the first line while SPI operates on GPIO.
    .
    How to understand this?
    The same configuration is given in the associated file
  • #5 21689898
    seeb
    Level 13  
    inot wrote:
    The same configuration is given in the associated file
    .

    The problem is that if you call the RX,TX pin with the numbers 16,17 alone the board does not switch and the serial does not work. If you call out D6,D7 it switches and the serial works fine.
    I spent way too much time on this. It was obvious to me that 16,17 was the same as D6 and D7 but this turned out not to be true.... The board behaves differently. And due to the fact that it took me a lot of time I decided not to dig any further into the specifics of the board. The important thing for me was that I moved forward.
    Exactly the same phenomenon is with i2c.
ADVERTISEMENT