Notice: Click on the Disclaimer button prior to taking any action shown on this website.
SPECIAL NOTICE TO EUROPEAN UNION (EU) VIEWERS

This site may use cookies for delivering advertisements, and is not intended for use by subjects of the EU. Continued use of this site is acknowledgement of your compliance with all EU laws, and accepting full responsibility for any and all actions related to accessing this website, including (but not limited to) agreement to the use of cookies.

 

Setting up the Adruino IDE

 


Arduino Primer.

Learn to Solder Tutorial

 

 

Prior to 2018, if you constructed any of my ATTiny85 based projects, I recommended using a SparkFun Tiny AVR Programmer.

Unfortunately, in the year I have used this programmer, it has failed twice, requiring me to re-dowload the entire Arduino IDE application, and troubleshoot the SparkFun driver.

I want to spend my time building stuff, not troubleshooting drivers for $20 programmers.

For that reason, I now recommend the procedure on this webpage rather than the SparkFun programmer. The cost difference is nil.

However, if you bought the SparkFun hardware and it is still working for you, then you should continue to use that programmer. I recommend the new procdure for new setups, unless you are having difficulty in using the SparkFun programmer.

 

In order to program an ATTiny85, you need to accomplish a few tasks. First, you need to download the Arduino IDE (Integrated Development Envrionment), which is a fancy way to say the interface software for these microcontrollers. It is essentially the programmer. Ardunio is one of the public domain companies that was instrumental in the growth of microcontrollers for hobbyists, and their IDE is a free download.

You can download the IDE here: Ardunio IDE

There are two versions of the IDE. A web version, and a version you can download to your computer (Windows, MAC, Linux). Since the ATTiny85 is not part of the mainstream Arduino line, you will need to use the download version.

 

Programming the ATTiny85

Next, you will need a way to insert the ATTiny85 into your computer to load the program. This is easily done with an Arduino Uno - which is a higher level MicroController. Essentially, we can use a MicroController to program a MicroController.

Please note that there are many low-cost clones to the Arduino Uno, some costing as little as $5, which may work. And the Arduino IDE is open-source, so you can use the application with the clones. However, I encourage you to purchase a genuine Arduino Uno as that provides the funding to keep the Arduino open-source.

You can also use the Arduino Uno to learn about MicroControllers when not programming the ATTiny85. There are many kits on the market with parts and instruction guides for this purpose. Who knows, perhaps you will soon be inventing your own projects.

 

Additional Items Needed

In addition, you will need a breadboard, 10uF/25V elecrolytic capacitor, and a few jumper cables to program the ATTiny85 using the Arduino Uno. You simply attach the Arduino Uno to the computer that has the Arduino IDE programmer loaded on it, then wire the ATTiny85 to the Uno. You then setup the Arduino IDE to use the Arduino Uno as the ATTiny85's programmer

The capacitor ensures that you are programming the ATTiny85 and not the Arduino Uno.

Everything is explained step-by-step in a comprehensive setup guide that is available at the Arduino Website. Click on the button below to view the programming guide. Note that the instructions will show you how to add the Arduino core for the ATTiny85. Make sure you do not skip that section (a Core tells the Arduino IDE about the microcontroller).

 

 

I also recommend purchasing a "Shield" containing the breadboard. These are inexpensive, and allow you to have a neater programmer. The shield plugs directly onto the Arduino Uno and with the on-board breadboard, you can wire the ATTiny85 to the shield.

The shield at the right even includes jumper cables, so you only need to buy the 10uF capacitor, and you can start programming the ATTiny85.

Download any necessary Library you may need.

You may also need a library for the sketch. Many of the RV-Project.Com projects require external libraries... think of them as hardware drivers as they contain the additional commands and information for the microcontroller to interface with the hardware. Sometimes more than one library is required.

All of the RV-Project.Com project pages list the required libraries for that project, and where to download them. As well, the sketches already have defined the libraries. So all you have to do is download the library and install it into the IDE. Libraries only need to be installed once, and they will be available to all projects. Click below for a tutorial from the Arduino website:

 

 

Going A Step Further

While you have everything you need to start programming the ATTiny85, I am providing a permanent programmer solution. This alleviates the need to wire up the programmer each time you want to program an ATTiny85 (and sometimes troubleshoot if you messed up the wiring). It is useful if you do a lot of ATTiny85 programming. I designed this board from the same wiring description at the Arduno website, but with the addition of status LEDs.

 

Shown at the right is the ATTiny85 programming shield (add-on boards are called Shields in Arduino'speak). It not only programs the ATTiny85, but can program other "Tiny" MicroControllers as well, including the ATTiny13, 24, 44, 45, 85, 2313, and 4313.

These MicroControllers differ in their power and number of GPIO (General Purpose Input/Output) pins available. I have no current plans for any projects based on these MicroControllers, but it didn't cost any extra to add them to the programming board.

Also included on the board is the required capacitor, along with noise suppression capacitors for each chip. And there is even a window on the board so you can see the TX and RX LEDs on the Arduino Uno underneath the shield.

 

The Shield simply snaps over the Arduino Uno as shown here. That way, you have a dedicated programmer that doesn't require wiring a circuit every time you want to use it.

Of course, unless you dedicate the Arduino Uno to programming ATTiny85 MicroControllers, you will have to download the programming sketch everytime you want to use it. And that procedure is fully explained in the link to the Arduino website above.

While I had circuit boards made at OSHPark (remember there is a minimum order of 3), many hobbysts/makers make their own shield using perf board or blank shields (you can use the shield shown above by leaving the breadboard off). They simply solder a socket for the ATTiny85 on the board, then solder wires to the socket. Again, this is also explained in the Arduino guide.

By the way, boards such as these are highly prized by Arduino hobbysts/makers. You could most likely build three boards, then sell two on-line (eBay etc), and recover your costs not only for the shield, but also for the Arduno Uno itself.

 

 

 

Building the Programmer Shield

 

The first task is to order the circuit board, which can be done here. Order from OSH Park

Next you will have to purchase a few components. You may notice that this project is constructed using SMD (surface mount) devices, however, I am using large components, so soldering should be easy for anyone with a bit of experience. Check out my Learn to Solder Tutorial for more information about soldering.

The Bill of Materials is shown below:

 

Bill of Materials
ItemPart NumberQuantitySource
2.54mm HeaderHDR100IMP40M-G-V-TH1Digikey.Com
8Pin IC DiP Socket210-1-08-003 1Digikey.Com
14Pin IC DiP Socket210-1-14-003 1Digikey.Com
20Pin IC DiP Socket210-1-20-003 1Digikey.Com
10uF 16V SMD Electrolytic CapacitorUWX1C100MCL1GB 1Digikey.Com
0.1uF Ceramic Capacitor 1206C1206C104K5RAC7867 3Digikey.Com
1K Ohm 1/4W Resistor 1206RMCF1206JT1K00 3Digikey.Com
3mm Red LED151031SS04000 1Digikey.Com
3mm Green LED151031VS06000 2Digikey.Com

 

 

Parts placement on the board are as follows:

  • Snap off the approprite number of pins from the header and insert in the areas marked YELLOW.
  • Insert the 8pin, 14pin, and 20pin sockets in the areas marked VIOLET.
  • Insert the three 1K Ohm resistors in the areas marked GREEN.
  • Insert the three 0.1uF Capacitors in the areas marked RED.
  • Insert the 10uF Electrolytic Capacitor in the area marked BLUE. Pay attention to the polarity.
  • Insert the two Green LEDs in the area marked ORANGE. Pay attention to the polarity.
  • Insert the Red LED in the area marked GREY. Pay attention to the polarity.

 

 

Note the graphic above illustrates how the board will have a marking showing where the negative lead goes for both LED and electrolytic capacitor. The negative lead of the capacitor is identified by the black mark on the top. As well, the positive lead is identified by the notches on the base of the capacitor.

The LED's negative side will be identified by the shorter lead. As well, some LEDs have a flat spot at the base of the lens for the negative side. The negative side of the LED should match the mark on the board.

FYI: Especially with LEDs, the negative side is often called the "CATHODE", and the positive side called the ANODE.

 


Setting up the Arduino IDE environment.

 

Practice, practice, practice.

Do you want to learn more about Arduino. I highly recommend one of the learning kits below. They not only will get you started with Arduino programming, they include enough hardware to make all sorts of cool items. And it includes a (clone) Arduino Uno so you can program the ATTiny85 (but it may or may not include the necessary 10uF capacitor required for ATTiny85 programming). So for just a few dollars more than an Arduino Uno, you can start programming ATTiny85 microcontrollers.

 

Advertisement
        

 

Other Reference Material.

Hint: You can often buy used (but acceptable condition) books in print from from Amazon for pennies-on-the-dollar. Often, the shipping costs more than the book does. The Arduino books you can order range from beginner to advanced, so be sure to read the description before deciding on a book.

Advertisement
        

 

Q: Should I buy a genuine Arduino Uno or can I buy a less expensive clone?

A: I have purchased both. Most of the time, the less expensive clones work perfectly fine as they use the same Atmel microcontrollers... just the support circuitry differs. The biggest difference between the two in my view is the USB hardware. The clone versions typically use less expensive hardware and that means a different driver. Any problems I have experienced with the clones has always been getting the driver to work.

If you are knowledgeable about computers, you won't have any problems with the clones. But if you are unsure how to fix a problematic driver, then the official Arduino Uno is your best bet. You don't want to add to the level of fustration by having driver problems.

Q: What is a library, and why do I need one?

A library is an extension of the command set of the Arduino IDE. The library includes functions not in the base IDE. The IDE does contain basic commands that allow you to turn a LED on or off, but not to control LCD displays, Mice, and other hardware.

Some libraries do come built-in the IDE, and all you have to do to use one is to add the library to the sketch. In that way, the sketch is a combination of the libraries plus the software you write. You may use one or more libraries in your sketches.

Libraries are used since there is limited program space in the typical microcontroller, and there would be no room to write the program instructions if all of the instructions in the available libraries were loaded.

There are also external (i.e. 3rd party) libraries that allow the use of additional hardware. A good example is the Adafruit "NeoPixel" programmable LEDs. They require a library (also available from Adafruit) that allows you to control the hardware.

Are libraries absolutely necesary? Technically, no. But in the absence of a library, you would have to write the instructions to manipulate the hardware yourself. It can be done, but it can be undaunting - especially for a beginner. It's much easier to simply use a library already in existance.

Most libraries are free, and I cannot recall seeing one with a cost. They are usually copyrighted, but within the public domain.

One downside to using a library is compatibility. For that reason, it is recommended to update your libraries prior to starting a new project. This is easily done in the Arduino IDE, and in fact, the IDE may prompt you to do so if it finds an outdated library.

Q: What is a core?

A: While the Arduino IDE supports many micro controllers, it does not support them all - not by a long shot. Therefore, if you want to use the IDE for a non-supported micro controller, you must tell the IDE about it. That is accomplished by a Core, and they exist for most of the Atmel micro controllers, as well as some of the IOT (Internet of Things) ESP controllers.

Like libraries, you install them once in the IDE, then they become available for future projects. Also like libraries, they can become obsolete, so you may need to replace a Core with an update if you find a function is not working. The ATTiny85 is not officially supported by the Arduino IDE, so a Core (ATTiny) must be installed. The link above "Arduino Uno Programmer Hookup Guide" has instructions for installing the ATTiny85 Core.

Q: Why so many micro controller projects?

A: Well, it is kind of the future. And it makes projects less costly, simpler to design, and more feature laden. Lets take for example the Super Dimmer project. An ATTiny85 is used in the dimmer, and provides the PWM oscillator, logic circuitry to turn the LEDs on or off, a secondary timer for the OFF Delay function, and even a logarithmatic brightness control.

Trying to do these functions without a micro controller would require 3 or more integrated circuits as well as a handful of other components. This would cost $20 or more once you factor in the cost of the larger circuit board for all of those components.

In contrast, all of this functionality is simply written in software in the $2 ATTiny85. And the behavior can easily be changed by a simple software update. These days, devices not having a micro controller is the exception.

Q: Why so much Amazon advertisement?

A: First and foremost, feel free to purchase your RV supplies from where you deem necessary. I do provide links to Amazon (and other websites) for the products I have used or have personally reviewed. But by all means, if you can find the item somewhere else cheaper, buy it there. But purchasing though my links helps pay the bills; keeps this website free, and the projects coming.

 


Last reviewed and/or updated Feb 5, 2026