Introduction: How to Use Attiny85 With Arduino

About: Electronics Hobbyist and Robotics Enthusiasts.... My Projects are completely Open Source... You are free to use, modify, share... Just share your modified projects to others also . Make a chain #we_love_open_s…

I bought a new Digispark's Attiny85 Board.

But was unable to use it for two days just because of the driver packages. And finally after searching a lot I found the answer. I refered various tutorials for this and tried. I was getting an error for COM port in Arduino. Here I solved for it.

Pinouts: All pins can be used as Digital I/O

Pin 0 → I2C SDA, PWM (LED on Model B)

Pin 1 → PWM (LED on Model A)

Pin 2 → I2C SCK, Analog In

Pin 3 → Analog In (also used for USB+ when USB is in use)

Pin 4 → PWM, Analog (also used for USB- when USB is in use)

Pin 5 → Analog In

For a handy pin reference flip over the Digispark - pin capabilities are listed on the back

Step 1: Install Windows Driver for Attiny85

If using Arduino 1.6.6 or higher and windows - you will need to download and install the drivers manually. Download, unzip and run “Install Drivers” (on 32bit systems) or “DPInst64” (on 64bit systems).

The driver files are located here:

Link

After Downloading the .zip file > extract it.

and run the

Install drivers.exe (For 64 bit OS)

DPinst64.exe (for 32 bit OS)

Step 2: Install Board Packages for Arduino

Copy this url and paste in the File>preference> additional board manager url

http://digistump.com/package_digistump_index.json

  • Go to the “Tools” menu and then the “Board” submenu - select “Boards Manager” and then from the type drop down select “Contributed”:
  • Select the “Digistump AVR Boards” package and click the “Install” button.
  • You'll see the download progress on the bottom bar of the “Boards Manager” window when complete it will show “Installed” next to that item on the list.
  • WINDOWS USERS: When complete the install with pop up a Driver Install Wizard window, please click “Next” on this Window to install the drivers for Digistump Boards (If you already have them installed, this installer will update them and install any that are missing)
  • With the install complete, close the “Boards Manager” window and select the Digispark from the Tools→Boards menu. “Digispark (Default - 16.5mhz)” is the board that should be selected by all new users.
  • The install is now complete! (Linux users see note below)

Linux Install If you haven't before - Install the udev rules found here: Troubleshooting section

ATTENTION LINUX USERS: PLEASE CHECKOUT THE LINUX TROUBLESHOOTING PAGE**

Step 3: How to Upload the Program

The Digispark works a bit differently than some Arduino compatible products. The Digispark programs with a different procedure.

From the Tools menu select Board→Digispark (Default - 16.5Mhz)

Write some code, open your code.

You do not need to plug in your Digispark before invoking upload Hit the upload button.

The bottom status box will now ask you to plug in your Digispark - at this point, you need to plug it in - or unplug and replug it.

You'll see the upload progress and then it will immediately run your code on the Digispark. If you unplug the Digispark and plug it back in or attach it to another power source there will be a delay of 5 seconds before the code you programmed will run. This 5-second delay is the Digispark Pro checking to see if you are trying to program it.

Step 4: Troublshootings

This to keep in mind

Digisparks do not create serial ports. The digispark arduino software communicates directly to the digispark over a combination of raw low speed USB protocols and HID protocols in order to save space and be more compliant with the USB specification.

When using the Digispark Arduino software it doesn\'t matter what is selected in the serial ports list - none is used. Just make sure Digispark is selected in the Programmer menu and Digispark (tiny core) is selected in the Board menu and you should be up and running.

When using the Digispark Arduino software it doesn\'t matter what is selected in the serial ports list - none is used. Just make sure Digispark is selected in the Programmer menu and Digispark (tiny core) is selected in the Board menu and you should be up and running.

  • For the example programs if you are getting “Device not found” even after installing the DigiUSB driver in the examples folder then try this: http://digistump.com/board/index.php/topic,257.0.html
  • If Windows does not recognize a “DigiUSB” but a generic “HID-compliant device”/“USB Input Device” pair, go to the Device Manager, find in the “Human Interface Devices” category the USB Input Device with a vendor ID of 0x16C0 and select “update driver” / “browse my computer” / “let me pick from a list” and the DigiUSB should show up there.