💾 Archived View for sdf.org › blippy › avr.gmi captured on 2023-09-28 at 16:38:46. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

avr

Created 2022-11-08 Updated 2022-11-26

avrdude

It's somewhat complicated to set up

https://projects-raspberry.com/raspberry-pi-avr-programmer/

sudo apt install avrdude arduino-core-avr

https://www.instructables.com/Programming-the-ATtiny85-from-Raspberry-Pi/

Raspi pi GPIO T84

RESET GPIO22 15 4

3V3 17 1

MOSI 19 7

MISO 21 8

SCLK 23 9

GND 25 14

---

avrdude -p t84 -P /dev/spidev0.0 -c linuxspi -b 10000 -V -U flash:w:app.hex

avrdude: Can't find programmer id "linuxspi"

Try

sudo apt install spi-tools # didn't help

---

/etc/avrdude.conf

---

Download latest avrdude sources

DISABLED linuxgpio

DISABLED linuxspi

./configure --enable-linuxgpio --enable-linuxspi

sudo apt install gpiod

sudo avrdude -p t84 -P /dev/spidev0.0:/dev/gpiochip0:22 -c linuxspi -b 10000 -V -U flash:w:app.hex

https://microchipdeveloper.com/8avr:avrfuses

ISP

FUNC UNO T84

SCK D13 9

MISO D12 8

MOSI D11 7

RST D10 4

See also

db07.82

Fuses

Read fuses:

avrdude -c stk500v1 -p attiny84 -P /dev/ttyUSB0 -U lfuse:r:-:i -v  -b 19200

Set clock to 8MHz:

avrdude -c stk500v1 -p attiny84 -P /dev/ttyUSB0 -U lfuse:w:0xE2:m -v  -b 19200

See also: db07.129

CLKPR - setting the clock speed

Set clock speed:

	CLKPR = (1<<CLKPCE); // prepare the clock for speed reset
	CLKPR = 0; // => 8MHz. For 1MHz, use 0b11

I2C

i2c_attiny85_twi, github