How to Program an ATtiny with Arduino (Up to Date)

  Переглядів 52,699

Levi Janssen

Levi Janssen

4 роки тому

GitHub link to be pasted in Arduino preferences - raw.githubusercontent.com/dam...
I explain how to program an ATtiny of any variety using Arduino as an ISP (programmer). This is the modern method and utilizes the most up to date software.

КОМЕНТАРІ: 103
@ronpenrose3467
@ronpenrose3467 2 роки тому
Excellent tutorial. I'm just getting started with Elegoo and Arduino but looking to get into programming the ATTiny. This video is perfect to get started.
@alandelgado5406
@alandelgado5406 2 роки тому
This is the ONLY video that worked for me, even almost 2 years later by the way. Highly recommended to others. Thank you!
@juanhurtado2679
@juanhurtado2679 2 роки тому
What version of the arduino IDE are you using ?
@stickbug5182
@stickbug5182 3 роки тому
This was an excellent tutorial. After uncommenting the #define it finally worked, thanks for the detailed explanation. You made the world a better place by sharing. Thanks again. I will use my attiny85 to trigger a relay circuit to turn on and off my hydroponics water pump. This will allow me to change the turn on time and off time with another program using millis () commands to reduce energy use in the hydroponics system.
@grimbo930charlyboy4
@grimbo930charlyboy4 Рік тому
I just came across your video. Thank you. It is very clear and easy to follow. Excellent. Greetings from the UK.
@tomlewis2477
@tomlewis2477 3 роки тому
I really like this demo. It is such a please to listen to speech that I can understand. Thank you so much for producing this.
@mikes3801
@mikes3801 3 роки тому
Your genius. Very easy to follow.
@Dreamsarefragile
@Dreamsarefragile 3 роки тому
Thank you sooo much I've been stuck on trying to get PSNEE to work on Attiny, It work on a nanno using an FTDI addapter but for the life of me I couldnt get it to work when flashing a attiny45. you were the first turorial to say burn the boot loader I owe you a drink!
@yonil256
@yonil256 2 роки тому
This is a very good tutorial! Thanks!
@bobtookyt
@bobtookyt 2 роки тому
fun stuff, and as a novice, I did get it to work, looking forward to other applications, tks
@kolosis1149
@kolosis1149 3 місяці тому
I am about to work on a project where small form-factor plays a huge factor... thank you for providing this detailed video.
@chrisblain7065
@chrisblain7065 2 роки тому
Just FYI.. if you're using an attiny84A 14 DIP, connections are: 5V pin 1 (vcc) GND pin 14 (GND) D10 pin4 (Reset) D11 pin6 (MOSI) D12 pin8 (MISO) D13 pin9 (CLK)
@DAAI741
@DAAI741 2 роки тому
Basically worked first try. Thanks a lot
@vegansynths7757
@vegansynths7757 3 роки тому
best video on this currently. one thing to note on the Uno and Mega; you will still need to connect a 10uf capacitor from the reset pin to ground (on the Uno or Mega). I tried the bootloader twice without the capacitor and it wouldn't sync.
@derkonsument7061
@derkonsument7061 2 роки тому
yes, I had the same problem. thanks for the tip
@sarimbinwaseem
@sarimbinwaseem Рік тому
Mine worked without capacitor
@Surbitron9000
@Surbitron9000 3 роки тому
Exactly what I was after. Many thanks.
@peterhuesmann3956
@peterhuesmann3956 2 роки тому
Thank you, this worked great!
@k.chriscaldwell4141
@k.chriscaldwell4141 5 місяців тому
Superb! Thanks. I did this with an ATTINY45, as I had no 85s. Same pins, just less memory. The only problem I had was hooking up to the 45's physical pin-3, not it's digital/virtual pin-3, which is on physical pin-2. Oops! I'm gonna get some 85s for projects. Thanks.
@sarimbinwaseem
@sarimbinwaseem Рік тому
Wanted to make motor alarm, definitely not gonna use nano or even pro mini.. i knew there is something called ATTINY 85 found this video and it worked. Thanks bro
@_crazytechz
@_crazytechz 3 роки тому
Nice video helpful Thanks
@stephantrampler4323
@stephantrampler4323 5 місяців тому
Thanks a lot for this great tutorial, very clear and helpful. Do I have to restore any settings in the Arduino after having programmed the Attiny85?
@h.a.7393
@h.a.7393 2 роки тому
Thanks, at last I program it.
@kb3cxe
@kb3cxe Рік тому
This is an excellent video. Might I ask what would happen if you burn the boot on a chip that all ready had the boot loaded?
@dragonthefly1210
@dragonthefly1210 10 місяців тому
thanks only guide that worked :)
@t1d100
@t1d100 Рік тому
Good information.
@Jorge-or3fr
@Jorge-or3fr Рік тому
Excellent My friend! May I use this tutorial a exacto same setup and tutorial for the attiny 13A? Cheers
@pietvermaat5928
@pietvermaat5928 6 місяців тому
Excellent explanation. Go to sketch --Upload using programmer and it worked right away. The normal upload Arrow continued to produce the Error: Programmer needed. IDE2.2.1
@doverivermedia3937
@doverivermedia3937 4 місяці тому
Great video. Question: should a current limiting resistor be used with the LED (most arduino projects seem to require that, to avoid blowing it). Or is the AtTiny85 somehow negating that need ? Many thanks ... 🇬🇧
@damian-ondrejsulista1533
@damian-ondrejsulista1533 3 роки тому
i had to put 100uF capacitator (had this one avaliable) between nano's gnd and rst pin in order to flash ATtiny 13. My nano is Chinese clone and i have to use old bootloader option while flashin ISP sketch. Got me stuck for few hrs. Mabye helps others...
@the555timer
@the555timer 2 роки тому
THANK YOU! :)
@flightsimguy3897
@flightsimguy3897 2 роки тому
Great tutorial can it also read input from code? I want make a light detector chip
@Decco6306
@Decco6306 4 роки тому
Wonderfull!
@jhondeleon63
@jhondeleon63 2 роки тому
good day sir levi, i have a ATtiny85 chips already programmed and used in a small board with relay. this board is used in motorcycle with two additional low/high LED lights left and right of the bike. The board has two terminal connection for passing light switch. when the passing switch was press the two led blinks low and high continuously and can adjust the rate with a potentiometer. my query is can i copy the program of attiny85 chip installed on the board and re program to anew IC attny85? or there another way to copy the program using any programmer. thanks
@gedr7664
@gedr7664 4 роки тому
aweomse thanks!
@flinkiklug6666
@flinkiklug6666 2 роки тому
That is amazing. I have think that these little birds have a program by Factory. I don't know that I can change these Programs. Thank you so much
@flinkiklug6666
@flinkiklug6666 2 роки тому
i am completely new in this. I lock the Videos more for fun as I use these infos.
@pauldusa
@pauldusa Рік тому
I did all of this with many Attiny's yrs before Covid time
@armandokrulc3822
@armandokrulc3822 3 роки тому
can you program attiny10 with arduino like attiny85?
@xsirfr1958
@xsirfr1958 Рік тому
resistor in series with LED, recommended.
@regal_7877
@regal_7877 3 роки тому
Hey, what exactly is the new wiring method? Because all the tutorials I've seen so far show the wiring method you use but without uncommenting the #define use_old_wiring. Sorry if it's a stupid question but any help would be much appreciated.
@theRealUser101
@theRealUser101 2 роки тому
I believe the new wiring uses the ISP header, but the old wiring just uses the pins. I may be wrong, so don't blame me if your sketch won't work.
@Drxxx
@Drxxx 4 роки тому
Nice video
@alexanderxatprime
@alexanderxatprime Рік тому
I'm looking at the pinout of the arduino nano and I'm wondering why it is pin 11, 12 ,13. I have like 100 teensy 4.0s in the lab and I'm wondering if I need to order an arduino nano to program my ATTINY861V-10MU. Thanks!
@NERO-ez1mn
@NERO-ez1mn 3 роки тому
subbedddddddddddddddddddddddddddddddddddddddddddddddd. 7:35 regards. should i press the burn bootloader instead if in case it was not installed? is it the same code for the bootloader?
@jesuschoyley7088
@jesuschoyley7088 7 місяців тому
You don't show how you wired to load the "blink" sketch
@danielliden6829
@danielliden6829 Рік тому
Can I choose to use 8 MHz clock in the bootloader to make the board 8 MHz? And after I have burnt it, can I change the clock speed to eg 1 MHz?
@pixelfrenzy
@pixelfrenzy Рік тому
Very clear and useful, thanks. 8:29 Note that the LED is connected to the pin named *PB3* on the ATtiny, not "pin 3"... it's actually physical pin 2 on the chip :-). BTW there's no need to disconnect all the wires from the Arduino to test the blink sketch; just stick the LED in.
@bob-ny6kn
@bob-ny6kn Рік тому
You are correct (DIP8 pin 2) but so is Chris "PIN3" is PB3 and DIP2 ("PIN0/PB0" is on DIP5, for another example)
@feynthefallen
@feynthefallen 2 роки тому
That breadboard sure has had a hot supper at some time in the past...
@G1NT0N1C
@G1NT0N1C 3 роки тому
"define SERIAL Serial" Error Message: 'Serial' was not declared in this scope Any solution to this?
@scottmassanelli2404
@scottmassanelli2404 3 роки тому
Thank you for the video. Attiny85PU what does PU MEAN Please.
@alancv86
@alancv86 Рік тому
Led resistor?
@nuca5104
@nuca5104 3 роки тому
I have a question about the remaining "unused" pins... how come the A3 & A2 pins of the Attiny don't need to be hooked up like all the others to be programmed? I have a project where I need 3 digital outputs for RGB LED and 2 touch buttons - is this possibles with the ATTINY85? What would I have to name the two touch buttons in the ARDUINO sketch to programme them onto the Attiny chip? I haven't found an answer.
@pedrovelazquez6166
@pedrovelazquez6166 3 роки тому
Hi!, those "unused" pins are not needed to program the attiny that's why he didn't hook them up. 2.- you can use pins 0, 1, 2 (or PB0, PB1 and PB2 which are the same) to control your led and 3 & 4 (or PB3 and PB4) to read your buttons. 3. you can find the name of each pin googling "attiny85 pinout" there are a bunch of images or 1->RESET 2->3 or A3 (analog input) 3 -> 4 or A2 (another analog input/digital IO) 4->GND 5->0 or MOSI, SDA 6 -> 1 or MISO 7 -> 2 or A1, SCK, SCL 8->VCC. Just to be clear #number from the attiny physcal pin -> number that you should use in your sketch. For example if you want to turn on an led with pin 0, first attacht it to physical pin #5 and in your sketch it should look something like this "digitalWrite(0, HIGH);" that should get the work done
@nuca5104
@nuca5104 3 роки тому
@@pedrovelazquez6166 Thank you so much!
@superdogmeatmeat
@superdogmeatmeat 3 роки тому
Cool; but what would be the limit of what you could use this board for? Say; 1 sensor and simple actuator control?
@batchrocketproject4720
@batchrocketproject4720 Рік тому
5 programmable GPIO equivalent pins (and a optional hack to use the reset pin as a 6th). Many more if you use external shift registers to expand.
@DingoAteMeBaby
@DingoAteMeBaby 3 роки тому
dont you need capacitors?
@skepsis9238
@skepsis9238 2 роки тому
How can I do same thing with ATtiny828?
@szuzmariacsatkai3496
@szuzmariacsatkai3496 2 роки тому
Might be a stupid quiestion, but im noob. Can I program the attiny with a raspberry too?
@venkatasaiprasadbhumireddy2314
@venkatasaiprasadbhumireddy2314 2 роки тому
Which language is used to Attiny 85
@marcello4258
@marcello4258 3 роки тому
anyone found a got comparison to pic microprocessors?
@brunoposavec9501
@brunoposavec9501 2 роки тому
i cant find attiny in boards manager
@NathanCroucher
@NathanCroucher 2 роки тому
This works for me but led blinks faster than 1 sec, is that bootloader issue? Anyway great vid
@batchrocketproject4720
@batchrocketproject4720 Рік тому
probably wrong clock frequency setting, try varying at set up.
@blueey2938
@blueey2938 3 роки тому
okay so how do you do it without arduino ide
@bob-ny6kn
@bob-ny6kn Рік тому
"Up to Date" - Hello! from the future!
@satyasunarya7765
@satyasunarya7765 3 роки тому
i have problem avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.
@billd01rfc
@billd01rfc 3 роки тому
Same error, did you find a resolution?
@tionanima
@tionanima 5 місяців тому
same here
@GeorgMierau
@GeorgMierau Рік тому
I'm using Arduino Uno R3, Arduino IDE 2.0.3 and attiny 1.0.2. I've uncommented "USE_OLD_STYLE_WIRING" and I'm not using a capacitor. I was able to burn the bootloader on my ATtiny85, but not the Blink sketch: "A programmer is required to upload".
@GeorgMierau
@GeorgMierau Рік тому
Problem solved: I should have used "Sketch" → "Upload Using Programmer" not just the "Upload" button!
@batchrocketproject4720
@batchrocketproject4720 Рік тому
@@GeorgMierau useful tip, thanks
@Icecreaam97
@Icecreaam97 2 роки тому
Can you use this same method to program an attiny204?
@0Smile0
@0Smile0 Рік тому
did you figure it out?
@unidahl5821
@unidahl5821 3 роки тому
Why does the LED not fry without a resistor? :O
@gopalshekar986
@gopalshekar986 3 роки тому
Great question. I suspect both ATTiny and the LED would be stressed without a current limiting resistor. Perhaps the LED survives because of the one second off, following the one second on. I wonder if this could be left running for a long time, anyway. Many ATTinys have limited current current output - of the order of 30 mA. Overdriving a load could perhaps cause heating , or evrn breakdowns
@mhe123321
@mhe123321 2 роки тому
I wouldn't say this is a very healthy way to drive an LED
@codingfun63
@codingfun63 3 місяці тому
had to do this method after windows sh^% the bed over installing digispark attiny85 divers , making a shield to go on nano to program .
@tonysicily2687
@tonysicily2687 3 роки тому
Can the ATTINY run off a 3v button battery?
@NunoRVOliveira
@NunoRVOliveira 3 роки тому
According to the datasheet it can run: 4MHz @ 1.8v - 5.5v 10MHz @ 2.7v - 5.5v 20MHz @ 4.5v - 5.5v
@dassajityadav5555
@dassajityadav5555 3 роки тому
For attiny13 please suggest
@mikes3801
@mikes3801 3 роки тому
Check out this link for ATtiny13. create.arduino.cc/projecthub/taunoerik/programming-attiny13-with-arduino-uno-07beba
@dassajityadav5555
@dassajityadav5555 3 роки тому
@@mikes3801 attiny2313a ic program upload process please try but not successful
@evertspies3345
@evertspies3345 2 роки тому
What about the ATTiny 2313
@Daniel-hd7gq
@Daniel-hd7gq 2 роки тому
Did you figure it out?
@evertspies3345
@evertspies3345 2 роки тому
@@Daniel-hd7gq Never got around to try it.
@evertspies3345
@evertspies3345 2 роки тому
@@Daniel-hd7gq Will look at it the weekend again. If you sort it it please share. Notice that the author does not respond to comments or questions.
@Daniel-hd7gq
@Daniel-hd7gq 2 роки тому
@@evertspies3345 I've eventually got it working pretty fast. Just had to download the right board lib. If you need help, let me know.
@evertspies3345
@evertspies3345 2 роки тому
@@Daniel-hd7gq Hi thank you. I remembered that I did download the board library. There were a couple of them. Just had to get one that worked. I looked at what I had done then and found that I had made a few piggy back boards that plugged into the arduino uno for the different microcontrollers. I never did make one for the 2313 although. Used AVRDUDESS to program hex files. Would a appreciate the link to the library you used.
@Acodalimus
@Acodalimus 3 роки тому
Wer keinen Widerstand vor die LED setzt, braucht auch keinen Kondensator
@marcusstenbeck
@marcusstenbeck 7 місяців тому
The reason it fails is most likely because of the Arduino Nano clone you're using. I have the same one. The RX/TX LED:s on the Nano clone board are connected in a way that interferes with serial programming, so just go ahead and desolder those LEDs and the whole thing should be way more stable. :)
@AmitSingh-py2nt
@AmitSingh-py2nt 3 роки тому
Y everyone is only blinking led.
@goldenpiston8449
@goldenpiston8449 3 роки тому
just use teensy, it is much much faster, and legit just better.
@TrillShatner
@TrillShatner 3 роки тому
ATtiny = $1 // Teensy = 19.95 . Everything has their uses. Unless you need "computing technology" there is no need to use an expensive microcontrollers. An ATtiny85, ATtiny84 or an ATtiny10 in conjunction with other IC's will reduce your crafting costs by 15 bucks a build.
@goldenpiston8449
@goldenpiston8449 3 роки тому
@@TrillShatner I was talking about the start of the vid where he says he uses an arduino nano. they cost around 10$, yet are super slow, even an order of magnitude slower than a basic 3$ arm chip.
@TrillShatner
@TrillShatner 3 роки тому
@@goldenpiston8449 agreed, however not entirely sure if you can program one of these with a teensy.
@goldenpiston8449
@goldenpiston8449 3 роки тому
@@TrillShatner sure you can program an ARM chip with a teensy
@TrillShatner
@TrillShatner 3 роки тому
@@goldenpiston8449 Nice~ Thanks man
Bare-Metal MCU #9 - Review; ATTiny85 from scratch
14:25
Mitch Davis
Переглядів 61 тис.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
GreatScott!
Переглядів 471 тис.
Мама забыла взять трубочку для колы
00:25
Даша Боровик
Переглядів 451 тис.
How To Program An Attiny85 With An Arduino Nano
9:20
SciTyeTech
Переглядів 4,7 тис.
ATtiny 85 Serial Print
8:52
Mr.T's Design Graveyard
Переглядів 8 тис.
How to program the ATtiny 841 using the Arduino IDE
11:03
Brian Lough
Переглядів 29 тис.
Make a UPDI Programmer for the Arduino ATTiny
14:50
element14 presents
Переглядів 22 тис.
Program ATtiny85 directly via USB
7:43
Mr.T's Design Graveyard
Переглядів 19 тис.
EEVblog #506 - IR Remote Control Arduino Protocol Tutorial
23:56
EEVblog
Переглядів 265 тис.
ATTINY10 Console Part 1
52:51
Ben Heck Hacks
Переглядів 150 тис.
The fastest way to make crisp PCBs at home!
10:56
Made with Layers (Thomas Sanladerer)
Переглядів 857 тис.
ATtiny85 simplest radio controller - 4 digital channels
12:14
Electronoobs
Переглядів 56 тис.
ATTiny85 Programmer (based on an Arduino Nano)
16:19
Det Builds Stuff
Переглядів 1,5 тис.
ПОЛГОДА строгого режима для Lenovo Legion 5 pro. Чем может обернуться обычный ремонт ноутбука?
31:47
ААНТ КОНТАКТ Сервис по ремонту техники в ЕКБ, СПБ
Переглядів 32 тис.
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Переглядів 22 тис.
Портативная PS 5 🎮 #ps5 #expressly
0:22
ExpresSLY Shorts
Переглядів 296 тис.
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Переглядів 5 млн
Компьютерная мышь за 50 рублей
0:28
dizzi
Переглядів 2,2 млн