Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-s3-box-3 LCD display: Hardware or Software SPI (AEGHB-861) #168

Open
3 tasks done
bpavlov opened this issue Nov 3, 2024 · 3 comments
Open
3 tasks done

ESP32-s3-box-3 LCD display: Hardware or Software SPI (AEGHB-861) #168

bpavlov opened this issue Nov 3, 2024 · 3 comments

Comments

@bpavlov
Copy link

bpavlov commented Nov 3, 2024

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

I am unable to find how the LCD display is connected to ESP32.
I want to use the Adafruit_ILI9341 library in Arduino IDE. From the code I can see three methods:

/**************************************************************************/
/*!
    @brief  Instantiate Adafruit ILI9341 driver with software SPI
    @param    cs    Chip select pin #
    @param    dc    Data/Command pin #
    @param    mosi  SPI MOSI pin #
    @param    sclk  SPI Clock pin #
    @param    rst   Reset pin # (optional, pass -1 if unused)
    @param    miso  SPI MISO pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t mosi,
                                   int8_t sclk, int8_t rst, int8_t miso)
    : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, mosi, sclk,
                      rst, miso) {}

/**************************************************************************/
/*!
    @brief  Instantiate Adafruit ILI9341 driver with hardware SPI using the
            default SPI peripheral.
    @param  cs   Chip select pin # (OK to pass -1 if CS tied to GND).
    @param  dc   Data/Command pin # (required).
    @param  rst  Reset pin # (optional, pass -1 if unused).
*/
/**************************************************************************/
Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t rst)
    : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, rst) {}

#if !defined(ESP8266)

/**************************************************************************/
/*!
    @brief  Instantiate Adafruit ILI9341 driver with hardware SPI using
            a specific SPI peripheral (not necessarily default).
    @param  spiClass  Pointer to SPI peripheral (e.g. &SPI or &SPI1).
    @param  dc        Data/Command pin # (required).
    @param  cs        Chip select pin # (optional, pass -1 if unused and
                      CS is tied to GND).
    @param  rst       Reset pin # (optional, pass -1 if unused).
*/
/**************************************************************************/
Adafruit_ILI9341::Adafruit_ILI9341(SPIClass *spiClass, int8_t dc, int8_t cs,
                                   int8_t rst)
    : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, spiClass, cs, dc,
                      rst) {}
#endif // end !ESP8266

The first one uses Software SPI. others - hardware SPI. Since Hardware SPI is faster I want to use hardware SPI. But I don't know if the display is connected via SPI to ESP32.
I found that the default SPI pins for ESP-S3 are:

SPI MOSI MISO CLK. CS
SPI2 GPIO 35 GPIO 37 GPIO 36 GPIO 39
SPI3 GPIO 11 GPIO 13 GPIO 12 GPIO 10

But I don't know how to match this with:
Screenshot 2024-11-03 at 12 32 40

Also in Arduino IDE SPI (HSPI and VSPI) pins depend on the board and cannot be changed. What board should I use?

@github-actions github-actions bot changed the title ESP32-s3-box-3 LCD display: Hardware or Software SPI ESP32-s3-box-3 LCD display: Hardware or Software SPI (AEGHB-861) Nov 3, 2024
@espressif2022
Copy link
Collaborator

Hello, this SPI pin is just the default pin. It can be configured to other pins.

@bpavlov
Copy link
Author

bpavlov commented Nov 4, 2024

Hello, this SPI pin is just the default pin. It can be configured to other pins.

Thank you for the replay, but it is not very clear. "This SPI pin is just the default pin" - which SPI pin? And how it can be configured in Arduino IDE. And also is the display connected via Hardware SPI to ESP32? And if yes what are the pins?

@espressif2022
Copy link
Collaborator

Sorry, I haven't replied for a long time. Please see if this Arduino repository is helpful to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants