techtoys / Arduino-Memory-LCD-Driver

This repository lists the complete source code to drive a Sharp Memory LCD with Arduino
82 stars 16 forks source link

ESP32 S3 cannot use this library file,could you tell me where the problem is #3

Open andylu321123 opened 8 months ago

andylu321123 commented 8 months ago

sir,

Thank you very much for your contribution.

I have two ESP32 development boards,esp-wroom-32 and esp32 s3. esp-wroom-32 can be used very well. but esp32 S3 , I can't use it. I confirm I need modify SPI pin definitions for adapt to ESP32S3. but The result was disappointing.

I am trying to redefine the pins,But I failed.

Could you guide me on how to modify the code to adapt to it?

//#define VSPI_MOSI 40 //#define VSPI_SCK 39 //#define SCS 38

or
//#define SS 42 //#define MOSI 35 //#define SCK 36

bye

techtoys commented 8 months ago

ESP32S3 uses GPIO matrix for its peripherals including SPI. That means you may assign any pin to SPI. You may try this: 1) Locate MemoryLCD.cpp file 2) Search hal_bsp_init(void) 3) There is a line _SPI->begin(). Change it to _SPI->begin(your_sclk_pin, -1, your_mosi_pin, -1). The second -1 indicates miso which is not required for memory LCD. The last -1 is the CS pin which we are using manual GPIO toggle. That pin is not needed either. Don't forget your_sclk_pin & your_mosi_pin must be output pins.

Recompile and see...

Hope it helps.

andylu321123 commented 8 months ago

thanks for your help, I had success

vv96ll commented 8 months ago

Hello, can you share how you used the esp32s3 to light up this screen?

techtoys commented 8 months ago

Honestly, I have never tried ESP32S3. I did it with ESP32 and Arduino M0 only. I believe ESP32S3 is similar. There was an issue and solved reported by andylu321123 . Maybe Andy will help.

vv96ll commented 8 months ago

Thank you for your reply. According to the above operation, the display is not normal. I can only hope that andylu321123 can reply

andylu321123 commented 8 months ago

FirstPixel.zip image image I hope this documet help you.

andylu321123 commented 8 months ago

image

andylu321123 commented 8 months ago

Just connet sclk si scs. disp and extcomin not need connect .

vv96ll commented 8 months ago

Thank you very much for your reply. At first, I thought it was the problem of the pin. I have tried many times, but now the picture is still not normal, Thanks again for your reply. 微信图片_20240301165108

andylu321123 commented 8 months ago

I dont know the reason. Sorry ,but I think the style is not same. image

andylu321123 commented 8 months ago

you can try to run this word. GFXDisplayPutPixel(10, 10, BLACK); then to find how to display,what happed on the screen. then ..... maybe you need modify something for display. I just help you do this. I am not Professionally.

vv96ll commented 8 months ago

Yes, there is A difference, my hand is LS027B7DH01A, the normal is not with the suffix A,thanks for your reply.

image
andylu321123 commented 8 months ago

If you may drive LS027B7DH01A nomally,Please let me know,I want to learn it also.

vv96ll commented 8 months ago

GFXDisplayPutPixel(10, 10, BLACK); this word is valid. be shown in about(11, 10).

I wish I could drive LS027B7DH01A nomally.

2701d796667ef3a158341f3833dd7c3

andylu321123 commented 8 months ago

Try different points, Find patterns, then modify "void GFXDisplayPutPixel(uint16_t x, uint16_t y, COLOR color)" and so on. Good luck!!!