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

Why does it work with SoftSPI on Display without CS but not on SPI? #20

Open
TecDroiD opened this issue Feb 21, 2025 · 1 comment
Open

Comments

@TecDroiD
Copy link

TecDroiD commented Feb 21, 2025

Hi,

I'm playing around with those tiny displays from aliexpress which don't have CS (btw. I also tried to patch those things for adding CS) like this one https://de.aliexpress.com/item/32880670572.html and am a litttttttttle confused now..

while SPI does not work, SoftSPI does. Even if I set both to same frequency of 500khz (which sadly is max for SoftSPI).
I tried this on ESP32-S3 as well as RP-Pico board. Both with the same result.

So while this works:

...
spi1 = SoftSPI(baudrate=500000, polarity=1, phase=0, sck=spi1_sck, mosi=spi1_mosi, miso=spi1_miso)
print(spi1)
display = st7789py.ST7789(spi1, disp_width, disp_width,
                          reset=st7789_res,
                          dc=st7789_dc, cs=spi1_cs, 
                          )

print("start")
start = time.ticks_ms()
display.fill(st7789py.RED)
end = time.ticks_diff(time.ticks_ms(), start)
print(f"took {end}ms.") # takes 2261ms on rp2, 3361ms on esp32

this doesn't

...
spi1 = SPI(1, baudrate=500000, polarity=1, phase=0, sck=spi1_sck, mosi=spi1_mosi, miso=spi1_miso)
... # rest is same

@TecDroiD
Copy link
Author

TecDroiD commented Feb 25, 2025

I bought a display with cs and hardware SPI doesn't work either.. So what's going on there?


Edit: It does work.. using polarity 0. so, it's an issue with the cs pin..

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

1 participant