GithubHelp home page GithubHelp logo

Comments (4)

schreibfaul1 avatar schreibfaul1 commented on July 17, 2024

Hello,
if you use ports other than the default ports for SPI, speed reduction can help. See https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/spi_master.html

image

from esp32-miniwebradio.

alansbor avatar alansbor commented on July 17, 2024

Hello,

Your call takes place in the tft.cpp file

270 SPI.begin (TFT_SCK, TFT_MISO, TFT_MOSI, -1);

And in the file SPI.CPP

37 void SPIClass :: begin (int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
38 {
    if (_spi) {
        return;
    }

    if (! _ div) {
        _div = spiFrequencyToClockDiv (_freq);
    }

    _spi = spiStartBus (_spi_num, _div, SPI_MODE0, SPI_MSBFIRST);
    if (! _ spi) {
        return;
    }

    if (sck == -1 && miso == -1 && mosi == -1 && ss == -1) {
        _sck = (_spi_num == VSPI)? SCK: 14;
        _miso = (_spi_num == VSPI)? MISO: 12;
        _mosi = (_spi_num == VSPI)? MOSI: 13;
        _ss = (_spi_num == VSPI)? SS: 15;

The default is 12,13,14,15 for the VSPI mode, like mine. I understood. It should be in the call line
MiniWebRadio.ino call to do do without parameters

You
740 tft.begin (TFT_CS, TFT_DC, SPI_MOSI, SPI_MISO, SPI_SCK, TFT_BL); // Init TFT interface

I will have 740 tft.begin (); // Init TFT interface

I'll try to accomplish my goal. Thanks for the help.

from esp32-miniwebradio.

stale avatar stale commented on July 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from esp32-miniwebradio.

AVRsteffen avatar AVRsteffen commented on July 17, 2024

#26
alansbor wrote:

The default is 12,13,14,15 for the VSPI mode

    if (sck == -1 && miso == -1 && mosi == -1 && ss == -1) {         
           _sck = (_spi_num == VSPI)? SCK: 14;         
         _miso = (_spi_num == VSPI)? MISO: 12;
         _mosi = (_spi_num == VSPI)? MOSI: 13;
         _ss = (_spi_num == VSPI)? SS: 15; 

I am not firm in 'C' or 'C++' but a bit in Verilog. And in this Verilog language mean this
_miso = (_spi_num == VSPI)? MISO: 12;
expression:

  if _spi_num equal to VSPI than`
      _miso = MISO 
  else 
      _miso = 12"

I have massive Problems to use GPIO21 + GPIO22 for TFT_CS and TFT_DC together with SPI_SCK=18, SPI_MISO=19, SPI_MOSI=23!
The TFT clocked with 40MHz don't work.

But if I use - and this is the Only condition for work with 40MHz - TFT_CS=13 and TFT_DC=12

ESP32 is a Mystery!

from esp32-miniwebradio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.