For up to date micronucleus bootloaders see here.
Improved version of Digistump avr core for ArduinoAvailable as Arduino Board Manager entry "Digistump AVR Boards" using the Board Manager URL: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
New micronucleus bootloader and binary version 2.6 with info function.
First version without MH-ET LIVE Tiny88(16.0MHz) support, since it is now supported by ATTinyCore. It is not planned to add MH-ET LIVE Tiny88 support in the future.
Another great core for ATtinies with ongoing support is the ATTinyCore of Spence Konde, which currently added micronucleus support. Use the Board Manager URL: http://drazzy.com/package_drazzy.com_index.json for it.
Reduced code size was enabled by the following changes:platform.txt
. To help finding code which consumes the flash, the generating of disassembler and memory map files are added. For Arduino IDE you will find these files in C:\Users<Name>\AppData\Local\Temp\arduino_build_.boards.txt
.package_digistump_index.json
.#define LED_BUILTIN
in some pins_arduino.h.#define __FlashStringHelper fstr_t
in Print.h.xtensa-lx106-elf-gcc
in package_digistump_index.json.recipe.output.tmp_file={build.project_name}.hex
in platform.txt and EEPROM library.// Set main and bundled indexes as trusted
=> all others are untrusted.DigisparkKeyboard
library with 22 keyboard layouts from Teensyduino Core Library, fixed bugs, documented and improved it. Here it is documented how the mapping works, so now you can fix wrong mappings by your own (but please give me feedback to include the fix).To get all the benefits, just replace the old Digispark board URL http://digistump.com/package_digistump_index.json (e.g. in Arduino File/Preferences) by the new https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json and install the Digistump AVR Boards version 1.7.2 or later.
As reference you may look at your C:\Users\AppData\Local\Arduino\packages directory to see how other packages are installed.
For Windows you must install the Digispark driver before you can program the board.
if you have the Digistump AVR Boards already installed, then the driver is located in %UserProfile%\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.5\Digistump_Drivers
. Just execute the Install_Digistump_Drivers.bat
file.
Or download it here, open it and run InstallDrivers.exe
.
Different bootloader configurations are available here.
To update your old, flash consuming bootloader, you have 2 choices.
Use the new Digistump board manager URL (see above), choose a bootloader with Tools > Micronucleus variant and then burn it with Tools > Burn Bootloader.
Run one of the Windows scripts like e.g. the 0_Upgrade-t85_recommended.cmd. The internal mechanism is described here.
You may also test the t85_agressive bootloader, a configuration overwiew is available here. It works for my boards but the USB timing is not guaranteed as stable as in the other configurations.
The meaning of fuses can be seen with the Engbedded Atmel AVR� Fuse Calculator. Windows helper scripts for setting fuses can be found here.
The default fuses for a Digispark board are:
BOD enabled requires additional 20 �A in sleep state and therefore may be not desirable for low power battery applications. To disable BOD, use 0xDF as Hfuse.
The default fuses for a Digispark Pro board are:
This can only be done by means of a High Voltage programmer.
You require 16.5 MHz only if your appliction uses the V-USB library, i.e. if it acts as an USB devive like mouse, keyboard etc.
In all other cases it is recommended to use the standard CPU frequencies of 16, 8, 1 MHz. This is the frequency the CPU is running after the bootloader part, which must run with 16.5 MHz!
Information about reducing power consumption can be found here and here.
+-\/-+
RESET/ADC0 (D5) PB5 1| |8 VCC
USB- ADC3 (D3) PB3 2| |7 PB2 (D2) INT0/ADC1 - default TX Debug output for ATtinySerialOut
USB+ ADC2 (D4) PB4 3| |6 PB1 (D1) MISO/DO/AIN1/OC0B/OC1A/PCINT1 - (Digispark) LED
GND 4| |5 PB0 (D0) OC0A/AIN0
+----+
USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 68 ohm series resistor to the ATtiny pin.
On boards with a micro USB connector, the series resistor is 22 ohm instead of 68 ohm.
USB- has a 1.5k pullup resistor to indicate a low-speed device.
USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.
ATtiny167 on Digispark pro
Digital Pin numbers in parenthesis are for ATTinyCore library
+-\/-+
RX 6 (D0) PA0 1| |20 PB0 (D8) 0 OC1AU
TX 7 (D1) PA1 2| |19 PB1 (D9) 1 OC1BU - (Digispark) LED
8 (D2) PA2 3| |18 PB2 (D10) 2 OC1AV
INT1 9 (D3) PA3 4| |17 PB3 (D11) 4 OC1BV USB-
AVCC 5| |16 GND
AGND 6| |15 VCC
10 (D4) PA4 7| |14 PB4 (D12) XTAL1
11 (D5) PA5 8| |13 PB5 (D13) XTAL2
12 (D6) PA6 9| |12 PB6 (D14) 3 INT0 USB+
5 (D7) PA7 10| |11 PB7 (D15) RESET
+----+
USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 51 ohm series resistor to the ATtiny pin.
USB- has a 1k5 pullup resistor to indicate a low-speed device.
USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.
MH-ET LIVE Tiny88 (16.0MHz) board
Digital Pin numbers in parenthesis are for ATTinyCore library
USB
+-\__/-+
PA2 15| |14 PB7
PA3 16| |13 PB5 SCK
D17 PA0 A6| |12 PB4 MISO
D18 PA1 A7| |11 PB3 MOSI
(D17) D19 PC0 A0| |10 PB2 OC1B/PWM SS
(D18) D20 PC1 A1| |9 PB1 OC1A/PWM
(D19) D21 PC2 A2| |8 PB0
(D20) D22 PC3 A3| |7 PD7 RX
SDA (D21) D23 PC4 A4| |6 PD6 TX
SCL (D22) D24 PC5 A5| |5 PD5
(D23) PC7 25| |4 PD4
RESET PC6 RST| |3 PD3 INT1
LED PD0 0| |5V
USB- PD1 1| |GND
USB+ INT0 PD2 2| |VIN
+------+
USB+ and USB- are each connected to a 3.3 volt Zener to GND and with a 68 ohm series resistor to the ATtiny pin.
USB- has a 1k0 pullup resistor to indicate a low-speed device.
USB+ and USB- are each terminated on the host side with 15k to 25k pull-down resistors.
Pins not available: PB6 is CLOCK_IN, PC7 is 25
The Arduino ESP8266 core available with https://arduino.esp8266.com/stable/package_esp8266com_index.json supports the Digistump Oak board now, better use that.
Burn Bootloader Method
like in ATTinyCore.boards.txt
to make use of menus. Therefore some board names changed like digispark-tiny1
-> digispark-tiny:clock=clock1
etc.OSCCAL
to factory default instead of using a rule of thumb, which was not reliable.-mrelax
. This reduces code size at least for ATtiny167.lto
and changed upload.maximum_size
for micronucleus bootloader 2.5.LED_BUILTIN
definition in pins_arduino.h.#define __FlashStringHelper fstr_t
in tiny/Print.h.xtensa-lx106-elf-gcc
in package_digistump_index.json.recipe.output.tmp_file={build.project_name}.hex
in platform.txt and EEPROM library.#define true 0x1
and #define false 0x0
in wiring.h.#define TwoWire USI_TWI
in Wire.h. #include <avr/delay.h>
to #include <util/delay.h>
in 3 files.Please write me a PM including your motivation/problem if you need a modification or an extension.
If you find this library useful, please give it a star.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4