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

SPI /CS needs to be pulled LOW #1

Closed
HanBingze123 opened this issue Jan 18, 2022 · 13 comments
Closed

SPI /CS needs to be pulled LOW #1

HanBingze123 opened this issue Jan 18, 2022 · 13 comments

Comments

@HanBingze123
Copy link

I want to use esp32 to control
But I didn't find the position of the communication pin that defines the SPI
Can you point out the location
Thanks again
中国人不骗中国人,大哥给说下呗

@arvin-tan
Copy link
Contributor

@HanBingze123 The SPI pins that were used are SCK, MOSI and ECSM. ECSM refers to the chip select pin. You can find the pin assignments for the different pre-tested boards in the EPD_Configuration.h file in the src folder.

@HanBingze123
Copy link
Author

But I didn't find the code defining SPI pins in that configuration file
I mean similar
MOSI = 17
SCK = 18
Something like that

@HanBingze123
Copy link
Author

HanBingze123 commented Jan 18, 2022 via email

@arvin-tan
Copy link
Contributor

@HanBingze123 My apologies. You are right. The MOSI and SCK are both connected to the hardware SPI of the different boards which we used. Assuming you are using your boards' hardware SPI, then just connect those two to the related MOSI and SCK pins. MISO can be ignored. For the chip select, those are listed as panelCS in the configuration file.

@HanBingze123
Copy link
Author

But the hardware I use is esp 32, ESP 32 has many hardware SPI, If I want to use software SPI or define the pin number of SPI pin, how do I operate?
(I am a Chinese........My English is as rubbish as dog shit. Please be more tolerant
SORRY)

@HanBingze123
Copy link
Author

But the hardware I use is esp 32, ESP 32 has many hardware SPI, If I want to use software SPI or define the pin number of SPI pin, how do I operate?
(I am a Chinese........My English is as rubbish as dog shit. Please be more tolerant
SORRY)

@arvin-tan
Copy link
Contributor

@HanBingze123 Which ESP32 board are you using? Can you give me the board ID? I can help you select which hardware SPI pins. I would suggest that you use the hardware SPI to reduce the complexity of your hardware and software design.

But, if you would still want to use software SPI, this can also be done. However, it will require you to update EPD_configuration.h, EPD_Driver.h and EPD_Driver.cpp to add the MOSI and SCK pins. Not only that, you would need to write a softwareSPI function to replace the SPI.transfer() functions.

@HanBingze123
Copy link
Author

OH,I KNOW
I use ESP32 WROVER B
I made it myself
I didn't understand the method of using software SPI just now. Can you tell me in detail?
I want to learn both methods
😁

@HanBingze123
Copy link
Author

And why did the old version of the program be deleted?
The old version of the program will be garbled after I download it
wx_camera_1642483282116.jpg

@arvin-tan
Copy link
Contributor

OH,I KNOW I use ESP32 WROVER B I made it myself I didn't understand the method of using software SPI just now. Can you tell me in detail? I want to learn both methods 😁

Are you using the same board as this one? If so, I believe you can use either HSPI or VSPI to test your EPD. You can start with GPIO23 and GPIO18 for the MOSI and CLK.

If you're interested to know more about software SPI, check this out. Basically, software SPI is bitbanging. You are hard-coding the CLK and MOSI signals.

@rei-vilo
Copy link

The library relies on the Arduino SDK and uses the hardware SPI implemented by the Arduino-ESP32.

The SPI library uses the SCK, MOSI, MISO signals defined at pins_arduino.h

static const uint8_t SS    = 5;
static const uint8_t MOSI  = 23;
static const uint8_t MISO  = 19;
static const uint8_t SCK   = 18;

Support for specific boards are beyond the scope of the library. Here some pointers for a specific board:

  • Use the shiftOut() for software SPI;
  • Define a custom pins_arduino.h variant.

@HanBingze123
Copy link
Author

yes!
It can display now
but.....
Its like a snowflake
This is also the effect of using an older version of the program
I tested 2.13 inches and 1.54 inches, But none of them works properlywx_camera_1642483282116.jpg

@HanBingze123
Copy link
Author

Sorry, I found that the problem is that I pulled the BS pin high, but can you release the old version of the program?
Can you create a new warehouse on GitHub?

@rei-vilo rei-vilo closed this as completed Mar 5, 2022
@rei-vilo rei-vilo changed the title A IMPORTANT PROBLEM SPI /CS needs to be pulled LOW Mar 7, 2022
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

3 participants