Introduction: #DIY# Tiny Arduino(without Crystal)
It is easy to program a Attiny ! just follow these simple steps...! you will do it in less than 30mins.
Step 1: About Attiny 85
The high-performance, low-power Atmel 8-bit AVR RISC-based microcontroller combines 8KB ISP flash memory, 512B EEPROM, 512-Byte SRAM, 6 general purpose I/O lines, 32 general purpose working registers, one 8-bit timer/counter with compare modes, one 8-bit high speed timer/counter, USI, internal and external Interrupts, 4-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, three software selectable power saving modes, and debugWIRE for on-chip debugging. The device achieves a throughput of 20 MIPS at 20 MHz and operates between 2.7-5.5 volts.
By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.
Step 2: Components Needed !
1) Attiny85-1
2) Breadboard-1
3)Led-2
4)jumpers-10
5)Usbasp (10pin) -1
6)Usbasp adaptor (10pin to 6pin)#Optional
7) Resistors (220ohm-1k) - 2
Software - Arduino IDE
Step 3: NOTE : : YOU MUST BOOTLOAD YOUR ATtiny85 IC FIRST TO UPLOAD ANY ARDUINO CODE ...!!
Step 4: Connections to Bootload Attiny !
Connect the Jumpers between the Attiny and Usbasp as shown in the Circuit diagram !
Step 5: To Add Attiny Support Package to the Arduino IDE
#1 Open the preferences dialog in the Arduino software.Find the “Additional Boards Manager URLs” field near the bottom of the dialog.
#2 Paste the following URL into the field (use a comma to separate it from any URLs you’ve already added):
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-
#3 Click the OK button to save your updated preferences.
#4 Open the boards manager in the “Tools > Board” menu.
#5 Scroll to the bottom of the list; you should see an entry for “ATtiny”.
#6 Click on the ATtiny entry. An install button should appear. Click the install button
#7 The word install would appear on the screen
Now your Arduino Ide is ready to program your Attiny ..!
Step 6: Bootloading Attiny85
Once connection is complete and Support package is installed ,now you can upload the bootloader program to your tiny85.
for that follow these steps :
Goto “Tools > Board” menu>select ATtiny
Select >Processor as Attiny
Goto Tools > select programmer as "USBasp
then click " Burn Bootloader"
Step 7: Connecting LEDs to ATtiny
Connect two LED's anode pin to PB1 and PB0 respectively and short it's cathode to ground pin through Resistor.
Step 8: Attiny Blink Code !
void setup ( )
{
pinMode (1,OUTPUT);
pinMode(0,OUTPUT);
}
void loop (){
digital write(0,HIGH);
delay(100);
digital write(0,LOW);
delay(100);
digital write(1,HIGH);
delay(100);
digital write(1,LOW);
delay(100);
}
Step 9: Thank You !! Please Do Comment If You Have Any Doubt ...
amaraxr@gmail.com
www.xolcano.com

Participated in the
Beyond the Comfort Zone Contest
28 Comments
6 years ago
EXCELLENT!!!!
7 years ago
Is PWM possible with attiny85?
Reply 7 years ago
Ya..
7 years ago
https://www.htlinux.com/product/attiny-isp-shield/ This makes the job just more easier.
Reply 7 years ago
cool !
7 years ago
Can i program atmega 328p using usbasp too?
Btw thanks for tutorial :)
Very usefull
Reply 7 years ago
If You whant to program a stand alone Atmega328P or similar just add this
https://raw.githubusercontent.com/sleemanj/optiboo...
to board manager in Arduino IDE 1.6.X, install it.
Now You can decide to burn bootloader and progrma it like an Arduino or not and progam with UsbAsp (safe 2kB of flash)
Reply 7 years ago
yes ! you can ...
https://www.instructables.com/id/Easy-Technique-for-Bootloading-Atmega328pu-and-Atm
7 years ago
Great Instructable. I've been using '85s for years as micro-Arduinos. I learned a ton about inputs, outputs, timers, etc. as I got into the gritty details of these little powerhouses. Try making cool flashy Christmas Tree ornaments as gifts!! To those who like this and are interested in th enext steps, I might suggest some of the available ATTinyX5 boards like Tinusaur.
7 years ago
https://www.youtube.com/watch?v=30rPt802n1k will also help your if your having trouble getting it to work for you.
7 years ago
Hi, I don't really see the goal of the boot loader here ? Usually on a arduino you put the boot loader in order to use the usb/serial port and remove usbasp but here if you just upload the blink program without uploading the boot loader before it should Work? Or am I missing something ?
Thanks.
Reply 7 years ago
You are right !
What is a Bootloader?
Atmel AVRs are great little ICs, but they can be a bit tricky to program. You need a special programmer and some fancy .hex files, and its not very beginner friendly. The Arduino has largely done away with these issues. They’ve put a .hex file on their AVR chips that allows you to program the board over theserial port, meaning all you need to program your Arduino is a USB cable.
The bootloader is basically a .hex file that runs when you turn on the board. It is very similar to the BIOSthat runs on your PC. It does two things. First, it looks around to see if the computer is trying to program it. If it is, it grabs the program from the computer and uploads it into the ICs memory (in a specific location so as not to overwrite the bootloader). That is why when you try to upload code, the Arduino IDE resets the chip. This basically turns the IC off and back on again so the bootloader can start running again. If the computer isn’t trying to upload code, it tells the chip to run the code that’s already stored in memory. Once it locates and runs your program, the Arduino continuously loops through the program and does so as long as the board has power.
Why Install a Bootloader
If you are building your own Arduino, or need to replace the IC, you will need to install the bootloader. You may also have a bad bootloader (although this is very rare) and need to reinstall the bootloader. There are also cases where you’ve put your board in a weird setting and reinstalling the bootloader and getting it back to factory settings is the easiest way to fix it. We’ve seen boards where people have turned off the serial port meaning that there is no way to upload code to the board, while there may be other ways to fix this, reinstalling the bootloader is probably the quickest and easiest. Like I said, having a bad bootloader is actually very very rare. If you have a new board that isn’t accepting code 99.9% of the time its not the bootloader, but for the 1% of the time it is, this guide will help you fix that problem.
7 years ago
I have never been able to get my Arduino IDE to recognise an ATtiny device. I thought you had the solution but following your instructions did not cure the problem. Even installing the full version of the URL you provided into the 'Preferences' > 'Additional Boards Manager URLs' did not result in the IDE giving me an ATtiny option. Can you confirm that this is the correct address of the URL? https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
Reply 7 years ago
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
yes ! this is working well for me..!
but the same type of problem occurred for me once when I was trying to install node MCU module to Arduino! I don't know the solution for that !
7 years ago
I love the Attiny85, but hate doing to the wiring to program it, so I designed an Arduino shield that makes it quick and easy:
https://www.instructables.com/id/Arduino-AVR-Progam...
Here is one of my favorite Attiny85 projects if you need inspiration:
https://www.instructables.com/id/SnapNsew-An-Educational-Soft-Circuit-Platform/
Reply 7 years ago
awesome sir !
7 years ago
In the e-mail is said: #ONLY 3STEPS
but on this page it is 9 Steps !
Reply 7 years ago
ha ha !! Bro
but still its a 3 only
1)connection
2)Bootloading
3)Led blinking
7 years ago
how abaut usbasp error like udate......?
and error notsuported board (have this problem a few days ago with arduino mega +usbasp)
Reply 7 years ago
make sure you are not using BETA of arduion i mean software