The Digispark ATTINY85 is a compact, low-cost microcontroller development board manufactured by Digistump. It is based on the ATtiny85 microcontroller chip and is designed for rapid prototyping and development of small-scale electronic projects. The board is compatible with the Arduino IDE, making it accessible to both beginners and experienced developers.
The Digispark ATTINY85 is a versatile board with the following key specifications:
Specification | Details |
---|---|
Microcontroller | ATtiny85 |
Operating Voltage | 5V |
Input Voltage (USB) | 5V |
Flash Memory | 8 KB (6 KB available for user code after bootloader) |
SRAM | 512 bytes |
EEPROM | 512 bytes |
Clock Speed | 16.5 MHz (internal oscillator) |
Digital I/O Pins | 6 (all can be used as PWM outputs) |
Analog Input Pins | 3 |
USB Support | Built-in USB interface for programming and communication |
Dimensions | 25 mm x 18 mm |
The Digispark ATTINY85 has 6 I/O pins, which are multifunctional and can be used for digital, analog, or PWM operations. Below is the pinout description:
Pin | Name | Function |
---|---|---|
P0 | D0 | Digital I/O, PWM, USB+ (used during USB communication) |
P1 | D1 | Digital I/O, PWM, USB- (used during USB communication) |
P2 | D2 | Digital I/O, PWM, Analog Input (A1) |
P3 | D3 | Digital I/O, PWM, Analog Input (A3), I²C SDA |
P4 | D4 | Digital I/O, PWM, Analog Input (A2), I²C SCL |
P5 | D5 | Digital I/O, PWM, Reset (active low, used for programming) |
File > Preferences
.http://digistump.com/package_digistump_index.json
Tools > Board > Boards Manager
, search for "Digistump AVR Boards," and install it.Tools > Board > Digispark (Default - 16.5 MHz)
in the Arduino IDE.The following example demonstrates how to blink an LED connected to pin P0 (D0):
// Blink an LED on Digispark ATTINY85
// Connect the positive leg of the LED to P0 (D0) and the negative leg to GND.
void setup() {
pinMode(0, OUTPUT); // Set pin P0 (D0) as an output
}
void loop() {
digitalWrite(0, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(0, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
Problem: The Digispark is not recognized by the computer.
Solution: Ensure the necessary drivers are installed. Visit the Digistump website to download and install the drivers for your operating system.
Problem: Code upload fails or times out.
Solution: Unplug the Digispark, click "Upload" in the Arduino IDE, and replug the board when prompted.
Problem: USB communication is unstable.
Solution: Avoid using P0 and P1 for other purposes while USB communication is active. Ensure the USB port provides stable power.
Problem: The board does not power on.
Solution: Check the USB connection and ensure the port is functional. Try a different USB port if necessary.
Can I use the Digispark with external power?
Yes, you can power the board with an external 5V source by connecting it to the VCC and GND pins.
Is the Digispark compatible with all Arduino libraries?
Not all libraries are compatible due to the limited memory and processing power of the ATtiny85. Use lightweight libraries whenever possible.
How do I reset the Digispark?
The Digispark resets automatically when replugged into the USB port. Alternatively, you can manually reset it by pulling the P5 (Reset) pin low.
This documentation provides a comprehensive guide to using the Digispark ATTINY85 for your projects. With its small size and ease of use, the Digispark is an excellent choice for compact and cost-effective designs.