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

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

peardox
Copy link
Contributor

@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
Contributor 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
Contributor 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

@Gadgetoid
Copy link
Member

Sorry, it's been a busy time and I haven't got 'round to testing this yet 😬

Nonetheless, this is appreciated thank you!

@Gadgetoid Gadgetoid self-assigned this Nov 26, 2024
@Gadgetoid Gadgetoid added the enhancement New feature or request label Nov 26, 2024
@Slion
Copy link

Slion commented Dec 1, 2024

In fact you really need that header defining the RGB pins cause they were changed for that display.

@Gadgetoid Gadgetoid merged commit 6346133 into pimoroni:main Dec 11, 2024
15 checks passed
@Gadgetoid
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants