The purpose of this project is to display One Hertz with absolute precision and it does it. Forget decimal cases, forget rubidium oscillators, forget strontium ionic chambers. No Hertz can be more unitary than Heinrich Rudolf Hertz himself.

To accomplish that, only two components were used, a rp2040 Zero (for compactness) and a GC9A01 round display (for style)

The circuit is wired as shown in the schematic below

The rp2040 runs a script in Circuit Python that was installed using the excellent Thonny IDE. 

The script is based on a demo by todbot named  gc9a01_picture_locket. The list of files to be displayed was adapted and the new pictures were added. It was also necessary to change the pin configuration to use the rp2040 zero.

It is necessary to install some drivers and libraries to run the script. To do that it is necessary to install two modules on python using PIP. One of the modules (circup) is a tool that download and install the drivers locally on the rp2040.

:>python -m install setuptools
:>python -m install circup

 And the drivers are installed using circup tool

:>circup install gc9a01
:>circup install adafruit_display_text
:>circup install adafruit_imageload

The pins must also be configured on the script.

tft_clk = board.GP2 # was 10 # must be a SPI CLK
tft_mosi= board.GP3 # was 11 # must be a SPI TX
tft_rst = board.GP5 # was 12
tft_dc  = board.GP4 # was 13
tft_cs  = board.GP6 # was 14

 
The images displayed must be Bitmaps with 240x240 pixels without RLE. The code have a command line to be used with imageMagick but it produced no compatible images, the the images were converted using irfanview :

  • resize/cut to 240 x 240 pixels
  • change color depth to 24 bits
  • save image as .BMP

The resulting image takes 168kbytes and that limits the amount images that can be stored to 6. Such figure can be considered the maximum refresh rate of this circuit: 6 Hertz - one at a time.