How to Get Started with ATTiny85 in Arduino IDE
Introduction
I have this little tiny microcontroller lying around for some time in my bins. I purchased this out of curiosity but not able find time to try. Yesterday, I saw it again and I decided to give it a try. So here it is.
For the datasheet you may refer to:
https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf
For the schematic and pinouts, you may refer to:
https://s3.amazonaws.com/digispark/DigisparkSchematicFinal.pdf
And for more details, you may refer to the Digistump wiki:
https://digistump.com/wiki/digispark?redirect=1
Instruction
1. USB Driver Installation for Digispark ATTiny85 Development Board:
a. Install the USB driver from:
https://github.com/digistump/DigistumpArduino/releases
and look for Digistump.Drivers.zip and download it
b. Uncompressed the downloaded Digistump.Drivers.zip
c. Look for DPinst (if you are in Windows 32-bit) or DPinst64 (if you have 64-bit Windows) and install it.
2. Arduino IDE Preparation for ATTiny85:
a. You may follow the Digistump wiki in:
https://digistump.com/wiki/digispark/tutorials/connecting
or you may follow me by opening the Arduino IDE.
b. Click File menu
c. Then select Preferences
d. And in the “Additional Boards Manager URL:” add the following:
http://digistump.com/package_digistump_index.json
e. Click OK.
3. Install the Digistump Board Manager
a. Click the “Tools” menu
b. Select “Board”
c. Then click the “Boards Manager”
d. In the search box type “digistump”
e. Install the Digistump AVR Boards
Now the Arduino IDE should be ready for the ATTiny85 coding.
Video Demonstration
Call To Action
If you have any concern regarding this article, be sure to leave your message in the comment box below. You may also write me in the Contact Form in the left-hand-side of this article.
Thank you and have a good days ahead.
Happy tinkering.
Source Code
Example 1
1Blink example from Arduino IDE > File menu > Examples > Basics > Click Blink
Example 2, Blink the onboard LED using direct port manipulation
1// the setup function runs once when you press reset or power the board
2void setup() {
3 // initialize digital pin LED as an output.
4 //pinMode(LED_PIN, OUTPUT);
5 DDRB |= 0B00000010;
6}
7
8// the loop function runs over and over again forever
9void loop() {
10 //digitalWrite(LED_PIN, HIGH); // turn the LED on (HIGH is the voltage level)
11 PORTB |= 0B00000010; // turn the LED on using port manipulation
12 delay(50); // wait for 50ms
13 //digitalWrite(LED_PIN, LOW); // turn the LED off by making the voltage LOW
14 PORTB &= 0B11111101; // turn the LED off using port manipulation
15 delay(50); // wait for 50ms
16}
Posts in this series
- Tutorial: How to use MFRC522 RFID module using Arduino
- SOS Flasher Using Millis Function with Enable Switch
- Tutorial: How to use DS3231 RTC in Arduino
- Tutorial: How to use 0.96 OLED - a small and cute display
- Tutorial: Getting Started with the NRF24L01 | How to use | Arduino
- Tutorial: How to use SIM800L GSM Module for Controlling Anything | Arduino
- Tutorial: How to use Keypad | Text Entry Mode | Arduino
- Tutorial: How to use 4x4 Keypad | Arduino
- Project Idea: Arduino Voltmeter
- Project Idea: Door Lock Security | Arduino
- Multitasking with Arduino | Relay Timer Controller | using millis
- Tutorial Understanding Blink Without Delay | How to millis
- Arduino Simple LCD Menu
- How to use SIM800L GSM Module using Arduino | Make or Answer Voice Calls
- Tutorial: How to Use Arduino Uno as HID | Part 2: Arduino Mouse Emulation
- Tutorial: How to Use Arduino Uno as HID | Part 1: Arduino Keyboard Emulation
- Tutorial: How to use SIM800L DTMF to Control Anything | Arduino
- Tutorial: Arduino EEPROM
- How to use SIM800L GSM Module | Arduino | Send and Receive SMS
- 16x2 LCD Menu for Arduino
- Tutorial: Arduino GPIO | How to use Arduino Pins
- MIT App Inventor for Arduino
- RC Car using L298N, HC-06, and Arduino Uno
- How to Use LCD Keypad Shield for Arduino
- How to Use Arduino Interrupts
- Project: Automatic Alcohol Dispenser
- TUTORIAL: How to use HC-SR04 Ultrasonic Sensor with Arduino
- Source Code: Astronomia Meme and Funeral Dance | melodies the Arduino way
- How to Get Started with L293D Motor Driver Shield with Arduino
- How to Get Started with L298N Motor Driver module using Arduino
- Part 2: Wav Music Player with Lyrics Using Arduino and SD Card
- Interfacing Infrared to Arduino Uno
- Part 1: Wav Music Player Using Arduino Uno and SD Card
- How to Interface Stepper Motor to Arduino Uno
- How To Play MP3 Files on Arduino from SD Card
- What is Arduino Software Serial
- How to Interface SD card to Arduino (without SD card shield)?
- Playing Melodies Using Arduino
- 8 Degrees Of Freedom (DOF) Robot Using Arduino Uno
- How to Interface PS2 Controller to Arduino Uno
- Part 3: DF Player Mini Tinkering with Arduino Nano and LCD
- How to Interface HC-06 to Arduino
- How to make a Remote Control RC car using Arduino and HC-06 bluetooth module
- Part 2: DF Player Mini Tinkering with Arduino Nano
- Part 1: DF Player Mini - a mini cheap mp3 player
No comments yet!