M5Dial TFT_eSPI pinout



  • Does anyone know the correct pin assignment for the M5Dial SPI bus? I am trying to run LVGL with TFT_eSPI. I have tried the pin assignments I obtained from the M5Dial specifications page but I am having no luck. Here is what I have so far

    // For ESP32 Dev board (only tested with GC9A01 display)
    // The hardware SPI can be mapped to any pins

    #define TFT_MOSI 5 // In some display driver board, it might be written as "SDA" and so on.
    #define TFT_SCLK 6
    #define TFT_CS 7 // Chip select control pin
    #define TFT_DC 4 // Data Command control pin
    #define TFT_RST 8 // Reset pin (could connect to Arduino RESET pin)
    #define TFT_BL 9 // LED back-light



  • Have you added the GC9A01 driver?



  • @ajb2k3 said in M5Dial TFT_eSPI pinout:

    GC9A01 driver

    Hmm, no I did not. Let me do some research and try to find the driver



  • Can any one get this simple GC9A01 test to run on the M5Dial

    My goal is to have LVGL running on the M5Dial so I am working my way through the display issues at this time.



  • This is the Micropython code I used to get a basic "Hello World" working.

    import os, sys, io
    import M5
    from M5 import *
    
    label0 = None
    
    def setup():
      global label0
    
      M5.begin()
      label0 = Widgets.Label("label", 50, 100, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
    
      label0.setCursor(x=50, y=100)
      label0.setText(str('Hello World'))
      label0.setVisible(True)
    
    def loop():
      global label0
      M5.update()
    
    if __name__ == '__main__':
      try:
        setup()
        while True:
          loop()
      except (Exception, KeyboardInterrupt) as e:
        try:
          from utility import print_error_msg
          print_error_msg(e)
        except ImportError:
          print("please update to latest firmware”)
    
    


  • @ajb2k3 said in M5Dial TFT_eSPI pinout:

    M5

    Thank you.



  • Hello @gordsh

    re TFT_eSPI : try adding the following define in Setup200_GC9A01.h

    #define TFT_BACKLIGHT_ON HIGH
    

    re GC9A01_demo : please find an M5Dial version here.

    Thanks
    Felix



  • @felmue, thanks very much, This worked perfectly.