-
Notifications
You must be signed in to change notification settings - Fork 10
hardware spi
Starting with version 2.2 of this code, in an effort to support additional OLED screens and bring new features, graphics support has migrated from the "default" Adafruit-GFX library to U8g2. Versions of the Digi-gurdy prior to this used a non-standard pin layout for the screen, and run their screen in "software" mode. This has proven too slow with the new graphical elements.
In order to support the on-board graphics card of the Teensy unit, the wiring to the screen must be altered on exiting Digi-Gurdies. v2.2+ requires it.
Units produced by John Dingley as of mid-December 2022 will come wired for "hardware" SPI as outlined below.
Two of the wires going to the screen are ground and voltage-in. These do not need to be modified.
Your screen (especially if you source your own) may use the alternate names below instead of the more standard SPI names, particularly if the screen also supports I2C.
Name | Alternate Names | Old Pin Assignment | NEW Pin Assignment |
---|---|---|---|
CLK | SCK, SCL | 10 | 13 |
MOSI | SDA, DATA | 9 | 11 |
CS | 12 | 10 | |
DC | 11 | 9 | |
RESET | RST | 13 | 38 |
Note: if your screen has an 8th pin called something like "3Vo", this is for voltage coming out of the screen. We don't use this at all. The Adafruit "white" screens are known to have this, for example.
John Dingley has produced a video which outlines what is required to re-wire an existing Digi-Gurdy. This process requires some light soldering (one new wire, one contact), and some short male-to-female jumper wires to rearrange the existing ones.
- When using hardware SPI, pin 12 is unavailable. It is used by the SPI chip (for a function we do not use: input data from the screen). This is why RESET had to move to pin 38, an unused pin.
- It is possible to move the DC and RESET (and maybe CS) pins if you need to use a non-standard layout, but MOSI and CLK must be on pins 11 and 13. You would have to modify the code in
display.h
to refer to your layout if you do this.
Digigurdy-baz is the awkward name for the software that powers the Digi-gurdy.
The Digi-gurdy is an electronic/MIDI hurdy gurdy.