Mirror of pimoroni/pimoroni-pico@github.com
Go to file
Chris Blume 261d2732f0 Improve ST7789 frame rate ~4x
The ST7789's Tscycw (time between serial write clock cycles) is
16 ns. This can be found on page 44 of the datasheet I'm using:
https://www.waveshare.com/w/upload/a/ae/ST7789_Datasheet.pdf

(I do not know which manufacturer Pimoroni products use and if
their parts might be different. But it seems like this wouldn't
change.)

The existing code sets the SPI baud to 16 * 1000 * 1000. But baud
is Hz, not seconds. That 16 * 1000 * 1000 doesn't represent 16 ns.
It represents 16,000,000 Hz.

16 ns * (1 Hz / s) = 62,500,000 Hz.

This commit changes the baud from 16 * 1000 * 1000 to 62'500'000,
representing ~4x speed improvement in SPI and thus ~4x frame rate
improvement, since the display's frame rate is currently
SPI-limited.

A before & after video can be seen here:
https://www.youtube.com/watch?v=n2y19TCnATo

Note that also on page 44 of that datasheet Tscycr (the read speed)
is only 150 ns, not 16 ns. Right now, the Pimoroni code doesn't read
any values back from the ST7789 so it is safe to operate at the
higher speed.

Also note that the 16 * 1000 * 1000 is the requested baud. The actual
baud is the closest the Pico can get, which is 15,625,000.
The new requested baud of 62'500'000 results in an exact match.
2021-11-11 15:36:13 -08:00
.github/workflows Bump MicroPython to v1.17 2021-10-11 12:23:40 +01:00
common make GAMMA common 2021-09-13 17:40:51 +01:00
drivers Improve ST7789 frame rate ~4x 2021-11-11 15:36:13 -08:00
examples Merge pull request #183 from pimoroni/driver/icp10125 2021-11-09 17:02:50 +00:00
libraries Merge pull request #206 from pimoroni/driver/pwm3901 2021-10-06 11:19:29 +01:00
micropython Merge pull request #183 from pimoroni/driver/icp10125 2021-11-09 17:02:50 +00:00
.gitignore Add heirarchical build to mimic pico-examples 2021-01-16 14:43:21 +00:00
.gitmodules C++ SDK Support for BME280 and BMP280 2021-08-02 14:20:40 +01:00
CMakeLists.txt Enable -Werror -Wall and fix all the things 2021-05-17 16:20:42 +01:00
LICENSE Initial commit 2021-01-15 14:24:32 +00:00
README.md Typo 2021-02-12 20:36:29 +01:00
pico_sdk_import.cmake Add heirarchical build to mimic pico-examples 2021-01-16 14:43:21 +00:00
pimoroni_pico_import.cmake Add an external import helper module 2021-06-17 11:57:52 +01:00
setting-up-micropython.md linked to releases page 2021-01-23 23:17:23 +00:00
setting-up-the-pico-sdk.md Add submodule init to instructions for #189 2021-08-04 10:30:33 +01:00

README.md

Pimoroni Pico Libraries and Examples

Welcome to the brave new world of Pico! This repository contains the C/C++ and MicroPython libraries for our range of Raspberry Pi Pico addons.

First of all you need to decide if your project is going to be done in MicroPython or using C/C++ with the Pico SDK. We have instructions for both here:

Software support for our Pico range

It's very early days for Pico and we've been working our little socks off to get everything ready for launch.

Most of our Pico addons have support for both C/C++ and MicroPython but we're still catching up a little bit in places.

The table below shows the current state of compatibly and some notes to set expectations:

Product C/C++ Library MicroPython Library Notes
Pico Explorer Base Yes Yes
Pico RGB Keypad Yes Yes
Pico Unicorn Pack Yes Yes MicroPython support added in v0.0.3 Alpha
Pico Audio Pack Yes No Limited support for MicroPython planned
Pico Scroll Pack Yes Yes
Pico Display Pack Yes Yes

We will keep this information updated as things develop.

Note: It's very early days for Raspberry Pi Pico and it's likely that our libraries will undergo quite a lot of changes over the next couple of weeks as we take in feedback and expand the functionality.