Documentation

ATtiny85 USB Development Board (Digispark) for Arduino | ShillehTek Product Manual
Documentation / ATtiny85 USB Development Board (Digispark) for Arduino | ShillehTek Product Manual

ATtiny85 USB Development Board (Digispark) for Arduino | ShillehTek Product Manual

manualshillehtek

Overview

The Digispark is a thumbnail-sized development board built around the ATtiny85 microcontroller. It plugs directly into a USB port — no cable, no separate programmer — and is programmed from the Arduino IDE through the Digistump board package. With six I/O pins and about 6 KB of usable flash, it is not a replacement for an UNO; it is the board you reach for when a full Arduino is overkill.

Typical uses: a single-sensor trigger, an LED controller, a small automation gadget, a wearable, or a simple USB keyboard emulator. Its tiny footprint and sub-dollar-chip economics make it easy to leave permanently embedded in a finished project.

Uploading works differently than on other Arduinos — you plug the board in after clicking Upload. The Getting Started section below walks through it.

At a Glance

Microcontroller
ATtiny85
Logic Level
5V
I/O Pins
6 (P0-P5)
Usable Flash
~6 KB
Clock
16.5 MHz
Programming
Direct USB plug-in

Specifications

Parameter Value
Microcontroller ATtiny85 (8-bit AVR)
Clock Speed 16.5 MHz (internal PLL, no crystal)
Operating Voltage 5V
Power Input 5V via USB, or 7-35V on VIN (12V or less recommended)
I/O Pins 6 (P0-P5); P3 and P4 shared with USB
PWM Outputs 3 (P0, P1, P4)
Analog Inputs 4 (on P2, P3, P4, P5)
Flash Memory 8 KB total (~6 KB free after micronucleus bootloader)
SRAM / EEPROM 512 B / 512 B
Onboard LED P1 (some revisions P0)
Dimensions ~23 x 18 mm

Getting Started

The Digispark needs no wiring — it plugs straight into a USB-A port. What it does need is a one-time IDE setup and a different upload rhythm than other Arduinos.

1. Install the Digistump board package

In the Arduino IDE, open File → Preferences and add the Digistump package URL to "Additional Boards Manager URLs": http://digistump.com/package_digistump_index.json. Then install "Digistump AVR Boards" from the Boards Manager and select Digispark (Default - 16.5mhz). On Windows, install the Digistump/micronucleus drivers if the board is not recognized.

2. The upload ritual

Click Upload with the board unplugged. When the console prints "Plug in device now...", insert the Digispark into USB. The micronucleus bootloader runs for the first ~5 seconds after plug-in, accepts the sketch, then starts it automatically.

Pin Functions
P0 Digital I/O, PWM, I2C SDA
P1 Digital I/O, PWM, onboard LED
P2 Digital I/O, ADC1, I2C SCL
P3 Digital I/O, ADC3 (USB D-, has ~1.5k pull-up)
P4 Digital I/O, ADC2, PWM (USB D+)
P5 Digital I/O, ADC0 (reset pin on some units; weak drive)
Warning: P3 and P4 are shared with the USB data lines. Circuits attached to them can block uploads — prefer P0, P1, and P2, and disconnect P3/P4 wiring while programming.
Tip: For standalone power, feed the VIN pin (7-12V works well) or 5V directly to the 5V pin. There is no serial monitor over the USB pins by default — debug with the LED or use the DigiCDC library, keeping its flash cost in mind.

Code Examples

Blink (first upload test)

digispark_blink.ino
// Digispark ATtiny85 - Blink the onboard LED
// LED is on P1 (change to 0 if your revision uses P0)

const int LED_PIN = 1;

void setup() {
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  delay(300);
  digitalWrite(LED_PIN, LOW);
  delay(300);
}

Button-triggered PWM fade

digispark_fade.ino
// Digispark ATtiny85 - Fade an LED on P0 while a button on P2 is held.
// Wiring: LED + 220R resistor from P0 to GND; button from P2 to GND.
// Uses only P0/P1/P2, so USB uploads stay unaffected.

const int LED_PIN = 0;      // PWM capable
const int BUTTON_PIN = 2;   // input with pull-up

void setup() {
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUTTON_PIN, INPUT_PULLUP);
}

void loop() {
  if (digitalRead(BUTTON_PIN) == LOW) {   // button held
    for (int b = 0; b <= 255; b += 5) {
      analogWrite(LED_PIN, b);
      delay(10);
    }
    for (int b = 255; b >= 0; b -= 5) {
      analogWrite(LED_PIN, b);
      delay(10);
    }
  } else {
    analogWrite(LED_PIN, 0);
  }
}

Frequently Asked Questions

The IDE says "Plug in device now" but nothing happens. What's wrong?
Try a different USB port (avoid unpowered hubs), check Windows drivers (micronucleus/Digistump), and make sure nothing is wired to P3/P4. Some USB 3.0 ports are picky — a USB 2.0 hub between the PC and the Digispark often fixes detection.
How much flash can my sketch actually use?
About 6,010 bytes of the 8 KB remain after the micronucleus bootloader. The IDE reports usage after compiling — keep libraries lean, and avoid heavyweight ones written for bigger chips.
Why is there no Serial Monitor?
The ATtiny85 has no hardware UART, and USB is bit-banged only during the bootloader. For debugging, blink the LED, or use the DigiCDC library for a software USB serial port — it costs a large share of your flash, so remove it for production.
Can it act as a USB keyboard like a Leonardo?
Yes, with the DigiKeyboard library it can type keystrokes into the host PC — a popular use for automation shortcuts. It is slower and more limited than a 32U4 board, but works for simple macros.
How do I power it without a computer?
Feed regulated 5V to the 5V pin, or 7-12V to VIN (the onboard 78M05 regulator handles it; up to 35V is tolerated but runs hot — stay at 12V or below). The sketch starts ~5 seconds after power-up, once the bootloader times out.
Can I use I2C sensors with the Digispark?
Yes — P0 is SDA and P2 is SCL. Use the TinyWireM library (or Wire on newer cores) and add 4.7k pull-ups if your sensor module doesn't include them.