PervasiveDisplays / EPD_Driver_GU_small

Hardware driver for small-sized screens, with built-in images for test
17 stars 5 forks source link

SPI /CS needs to be pulled LOW #1

Closed HanBingze123 closed 2 years ago

HanBingze123 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送

发件人: @.> 发送时间: 2022年1月18日 15:58 收件人: @.> 抄送: @.>; @.> 主题: Re: [PervasiveDisplays/EPD_Driver_GU_small] A IMPORTANT PROBLEM (Issue #1)

@HanBingze123https://github.com/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.

― Reply to this email directly, view it on GitHubhttps://github.com/PervasiveDisplays/EPD_Driver_GU_small/issues/1#issuecomment-1015154420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXJF7ZO55I7OCYBYVDB75BTUWUMSPANCNFSM5MGK2AEQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

arvin-tan commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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:

HanBingze123 commented 2 years ago

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 commented 2 years ago

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?