项目作者: vi7

项目描述 :
Digispark USB clone examples and docs. Micronucleus bootloader programming cheat sheet
高级语言: C++
项目地址: git://github.com/vi7/digispark-usb-blink.git
创建时间: 2020-11-28T17:40:11Z
项目社区:https://github.com/vi7/digispark-usb-blink

开源协议:

下载


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:

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

Flash Micronucleus bootloader and set default Digispark fuses:

  1. curl -LO https://github.com/micronucleus/micronucleus/raw/v2.5/firmware/releases/t85_default.hex
  2. 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.