setting up the arduino attiny

4
SparkFun Electronics learn.sparkfun.com 1 Setting up the ATTiny85 in Arduino using the TinyAVR Programmer If this is your first time programming an ATTiny85 using the TinyAVR Stick, we'll need to do a little setup in Arduino. What we need to do is add new boards files for the ATTiny85 and then configure Arduino to program this chip. Let's get started. 1. Go to http://www.sparkfun.com/attinyBoards This will re-direct you to a JSON configuration file. 2. Click on the full URL in the Address bar. Click CTRL-A to highlight all of it and CTRL-C to copy it. This is a Boards Manager URL that we are going to insert into Arduino to add the necessary ATTiny Board Files. 3. Open up Arduino and Click on FilePreferences to open up the Preferences Window.

Upload: brian-huang

Post on 24-Jan-2018

202 views

Category:

Technology


0 download

TRANSCRIPT

SparkFun Electronics learn.sparkfun.com

1

Setting up the ATTiny85 in Arduino

using the TinyAVR Programmer

If this is your first time programming an ATTiny85 using the TinyAVR Stick, we'll need to do a little setup

in Arduino. What we need to do is add new boards files for the ATTiny85 and then configure Arduino to

program this chip. Let's get started.

1. Go to http://www.sparkfun.com/attinyBoards This will re-direct you to a JSON configuration file.

2. Click on the full URL in the Address bar. Click CTRL-A to highlight all of it and CTRL-C to copy it.

This is a Boards Manager URL that we are going to insert into Arduino to add the necessary

ATTiny Board Files.

3. Open up Arduino and Click on FilePreferences to open up the Preferences Window.

SparkFun Electronics learn.sparkfun.com

2

4. Now, click on the text box that says Additional Boards Manager URLs, and paste (CTRL-V) the

URL that you copied above. If the textbox is not blank, add a comma at the end and append this

URL to the end.

5. When you're done, you should have something like this. Click OK.

6. Now to add the new board files in the Boards Manager. Go to ToolsBoardBoards

Manager…

SparkFun Electronics learn.sparkfun.com

3

7. When Boards Manager finishes loading, type attiny in the search bar. Click the selection

once on the attiny Boards file that comes up, and finally Click on Install. When it's done, click

Close.

8. Now, you should see a new boards option for ATTiny. Click ToolsBoardsATTiny. It's near the

bottom of the list.

SparkFun Electronics learn.sparkfun.com

4

9. With the ATTiny, there are several variations of this board, so we need to select the type. Click

ToolsProcessorATTiny85.

10. Finally, we need to configure the programmer. To program the ATTiny, we will be using the

USBTinyISP to program the chip. Select this under ToolsProgrammerUSBTinyISP

11. Congratulations! That's it. You're now ready to program your chip. Plug in the chip into your

TinyAVR Programmer. Pay special attention to the orientation of the chip. If you plug it in

backwards, the chip will get very hot. Check that the notch / dot are pointing in the same

direction.

12. Now, write some lines of code, or try the Blink Example

under FileExamples01.BasicsBlink. Change all of the

pin 13s to 0s. Now just click Upload!