vi7 / digispark-usb-blink

Digispark USB clone examples and docs. Micronucleus bootloader programming cheat sheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Digispark USB ATTiny85 Usage Tips

Usage tips and examples for the Digispark USB ATTiny85 clone. Built-in LED resides on the pin 1 (PB1)

This README also contains info about programming of the Digispark USB ATTiny85 clone with the Bus Pirate

Program Micronucleus bootloader to the ATtiny85

Tools versions

Hardware connection

Bus Pirate Digispark ATtiny85
GND (BR) GND (or pin4)
+5V (OR) 5V (or pin8)
CS (WT) P5 (RESET)
MOSI (GR) P0 (MOSI)
MISO (Blk) P1 (MISO)
CLK (PU) P2 (SCLK/CLK)

Program commands cheat sheet

Check buspirate connection:

avrdude -P /dev/tty.usbserial -c buspirate -p t85 -v

Flash Micronucleus bootloader and set default Digispark fuses:

curl -LO https://github.com/micronucleus/micronucleus/raw/v2.5/firmware/releases/t85_default.hex

avrdude -P /dev/tty.usbserial -c buspirate -p t85 -b 115200 -U flash:w:t85_default.hex -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m

Additional information

Serial console (UART)

Digispark ATTiny85

dtiny core TinyDebugSerial overrides Serial and uses:

  • PB3 as TX for CPU frequencies <= 8MHz
  • PB2 as TX for other frequencies

See TinyDebugSerial.h for the details

Generic ATtiny85

tiny core TinySoftwareSerial overrides Serial and uses:

  • AIN0 (PB0) as TX
  • AIN1 (PB1) as RX

See src/main.cpp for the example.

About

Digispark USB clone examples and docs. Micronucleus bootloader programming cheat sheet


Languages

Language:C++ 100.0%