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

Add Pico Display Pack 2.8 and fix SPI for st7789 on Pico2 #1006

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

peardox
Copy link

@peardox peardox commented Oct 1, 2024

This adds libraries/pico_display_28 along with a demo that displays the FPS in examples/pico_display_28

Also updated drivers/st7789 as per #985 / #1005

Full repo build impossible owing to hardware/rtc.h not existing for Pico2 when it hits breakout_encoder_wheel (about to raise issue) so just built and tested pico_display_28

@Slion
Copy link

Slion commented Oct 2, 2024

Why do we need a specific example for 2.8? I thought is was exactly the same as the 2 but physically larger.

Does the higher baud rate work on Pico 1?

@peardox
Copy link
Author

peardox commented Oct 2, 2024

Why do we need a specific example for 2.8? I thought is was exactly the same as the 2 but physically larger.

It isn't a carbon copy. It changes the text from "Hello World" to one that displays the Frames Per Second which is calculated on every update so has a benefit not present in other demos (as none of them do FPS)

You can also change the code trivially to work on other pico_displays

The baud rate is dependant on the device in modified driver/st7789.hpp

#if !PICO_RP2350
static const uint32_t SPI_BAUD = 62'500'000;
#else
static const uint32_t SPI_BAUD = 75'000'000;
#endif

@Slion
Copy link

Slion commented Oct 2, 2024

The baud rate is dependant on the device in modified driver/st7789.hpp

Yeah I saw that I was just wondering if the faster baud rate also works on Pico 1.

@peardox
Copy link
Author

peardox commented Oct 2, 2024

Yeah I saw that I was just wondering if the faster baud rate also works on Pico 1.

I most sincerely doubt it (might give it a go tho)

The baud rate is tied to the system clock and those values are 1/2 device clock frequency (Pico 1 should be 66.5 for 1/2 freq - might be worth a try) although the docs say 16us apparently

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

Successfully merging this pull request may close these issues.

2 participants