-
Software support
11/02/2020 at 18:17 • 0 commentsavrdude 6.3 comes with a bit-banged GPIO driver that is suitable for use with this hat. All you need to do is add this to your avrdude.conf file:
programmer id = "pihat"; desc = "Use the Linux sysfs interface to bitbang GPIO lines"; type = "linuxgpio"; reset = 25; miso = 9; mosi = 10; sck = 11; ;
This works, but there is a higher performance variant of this that actually uses the Pi SPI bus. To use it, you must first enable SPI in raspi-config. Once this is done, you'll see /dev/spi0.0 show up. Apply the patch (see below) to avrdude and then add this section to your avrdude.conf file:
programmer id = "pihat"; desc = "Use Linux SPI device in /dev/spidev*"; type = "linuxspi"; reset = 25; baudrate=100000; ;
The patch to avrdude is here. This patch also adds support for using the TPI adapter for TPI programming.