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

Поделиться
HTML-код
  • Опубликовано: 28 фев 2020
  • 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.
  • НаукаНаука

Комментарии • 104

  • @alandelgado5406
    @alandelgado5406 2 года назад +5

    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 ?

  • @ronpenrose3467
    @ronpenrose3467 2 года назад +1

    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.

  • @stickbug5182
    @stickbug5182 3 года назад +11

    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.

  • @tomlewis2477
    @tomlewis2477 3 года назад +1

    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.

  • @grimbo930charlyboy4
    @grimbo930charlyboy4 Год назад

    I just came across your video. Thank you. It is very clear and easy to follow. Excellent. Greetings from the UK.

  • @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!

  • @chrisblain7065
    @chrisblain7065 3 года назад +4

    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)

  • @mikes3801
    @mikes3801 3 года назад +2

    Your genius. Very easy to follow.

  • @bobtookyt
    @bobtookyt 2 года назад

    fun stuff, and as a novice, I did get it to work, looking forward to other applications, tks

  • @kolosis1149
    @kolosis1149 6 месяцев назад

    I am about to work on a project where small form-factor plays a huge factor... thank you for providing this detailed video.

  • @vegansynths7757
    @vegansynths7757 3 года назад +7

    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.

  • @DAAI741
    @DAAI741 2 года назад

    Basically worked first try. Thanks a lot

  • @yonil256
    @yonil256 2 года назад

    This is a very good tutorial!
    Thanks!

  • @k.chriscaldwell4141
    @k.chriscaldwell4141 7 месяцев назад

    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 Год назад +1

    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

  • @Surbitron9000
    @Surbitron9000 3 года назад

    Exactly what I was after. Many thanks.

  • @peterhuesmann3956
    @peterhuesmann3956 2 года назад

    Thank you, this worked great!

  • @stephantrampler4323
    @stephantrampler4323 7 месяцев назад

    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?

  • @pietvermaat5928
    @pietvermaat5928 8 месяцев назад +1

    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

  • @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?

  • @h.a.7393
    @h.a.7393 2 года назад

    Thanks, at last I program it.

  • @doverivermedia3937
    @doverivermedia3937 6 месяцев назад +1

    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 ... 🇬🇧

  • @pixelfrenzy
    @pixelfrenzy 2 года назад +4

    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)

  • @dragonthefly1210
    @dragonthefly1210 Год назад

    thanks only guide that worked :)

  • @_crazytechz
    @_crazytechz 3 года назад

    Nice video helpful
    Thanks

  • @Jorge-or3fr
    @Jorge-or3fr Год назад

    Excellent My friend! May I use this tutorial a exacto same setup and tutorial for the attiny 13A? Cheers

  • @regal_7877
    @regal_7877 4 года назад +9

    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.

  • @flinkiklug6666
    @flinkiklug6666 2 года назад +1

    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 года назад +1

      i am completely new in this. I lock the Videos more for fun as I use these infos.

  • @damian-ondrejsulista1533
    @damian-ondrejsulista1533 3 года назад +2

    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...

  • @flightsimguy3897
    @flightsimguy3897 2 года назад

    Great tutorial can it also read input from code? I want make a light detector chip

  • @t1d100
    @t1d100 Год назад

    Good information.

  • @xsirfr1958
    @xsirfr1958 2 года назад +1

    resistor in series with LED, recommended.

  • @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

  • @Decco6306
    @Decco6306 4 года назад +1

    Wonderfull!

  • @pauldusa
    @pauldusa Год назад

    I did all of this with many Attiny's yrs before Covid time

  • @armandokrulc3822
    @armandokrulc3822 3 года назад +2

    can you program attiny10 with arduino like attiny85?

  • @superdogmeatmeat
    @superdogmeatmeat 3 года назад +1

    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.

  • @feynthefallen
    @feynthefallen 2 года назад

    That breadboard sure has had a hot supper at some time in the past...

  • @gedr7664
    @gedr7664 4 года назад

    aweomse thanks!

  • @Drxxx
    @Drxxx 4 года назад

    Nice video

  • @the555timer
    @the555timer 3 года назад

    THANK YOU! :)

  • @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!

  • @danielliden6829
    @danielliden6829 2 года назад

    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?

  • @G1NT0N1C
    @G1NT0N1C 3 года назад

    "define SERIAL Serial"
    Error Message:
    'Serial' was not declared in this scope
    Any solution to this?

  • @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 года назад +1

      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!

  • @alancv86
    @alancv86 Год назад +1

    Led resistor?

  • @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?

  • @scottmassanelli2404
    @scottmassanelli2404 3 года назад

    Thank you for the video. Attiny85PU what does PU MEAN Please.

  • @marcello4258
    @marcello4258 3 года назад

    anyone found a got comparison to pic microprocessors?

  • @satyasunarya7765
    @satyasunarya7765 3 года назад +1

    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 7 месяцев назад

      same here

  • @szuzmariacsatkai3496
    @szuzmariacsatkai3496 2 года назад

    Might be a stupid quiestion, but im noob. Can I program the attiny with a raspberry too?

  • @DingoAteMeBaby
    @DingoAteMeBaby 3 года назад

    dont you need capacitors?

  • @NathanCroucher
    @NathanCroucher 3 года назад

    This works for me but led blinks faster than 1 sec, is that bootloader issue? Anyway great vid

  • @venkatasaiprasadbhumireddy2314
    @venkatasaiprasadbhumireddy2314 2 года назад

    Which language is used to Attiny 85

  • @eross21
    @eross21 5 дней назад

    so do you know of any way to make a midi drum module from an Attiny 85?

  • @brunoposavec9501
    @brunoposavec9501 2 года назад

    i cant find attiny in boards manager

  • @skepsis9238
    @skepsis9238 2 года назад

    How can I do same thing with ATtiny828?

  • @Icecreaam97
    @Icecreaam97 2 года назад

    Can you use this same method to program an attiny204?

    • @0Smile0
      @0Smile0 Год назад

      did you figure it out?

  • @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 Год назад +2

      Problem solved: I should have used "Sketch" → "Upload Using Programmer" not just the "Upload" button!

    • @batchrocketproject4720
      @batchrocketproject4720 Год назад +1

      @@GeorgMierau useful tip, thanks

  • @jesuschoyley7088
    @jesuschoyley7088 9 месяцев назад

    You don't show how you wired to load the "blink" sketch

  • @tonysicily2687
    @tonysicily2687 3 года назад

    Can the ATTINY run off a 3v button battery?

    • @NunoRVOliveira
      @NunoRVOliveira 3 года назад +1

      According to the datasheet it can run:
      4MHz @ 1.8v - 5.5v
      10MHz @ 2.7v - 5.5v
      20MHz @ 4.5v - 5.5v

  • @unidahl5821
    @unidahl5821 3 года назад +2

    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 3 года назад

      I wouldn't say this is a very healthy way to drive an LED

  • @blueey2938
    @blueey2938 3 года назад

    okay so how do you do it without arduino ide

  • @bob-ny6kn
    @bob-ny6kn Год назад

    "Up to Date" - Hello! from the future!

  • @dassajityadav5555
    @dassajityadav5555 4 года назад +1

    For attiny13 please suggest

    • @mikes3801
      @mikes3801 3 года назад +1

      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

  • @codingfun63
    @codingfun63 5 месяцев назад

    had to do this method after windows sh^% the bed over installing digispark attiny85 divers , making a shield to go on nano to program .

  • @evertspies3345
    @evertspies3345 2 года назад +1

    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 года назад +3

    Wer keinen Widerstand vor die LED setzt, braucht auch keinen Kondensator

  • @marcusstenbeck
    @marcusstenbeck 9 месяцев назад

    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 года назад +1

    Y everyone is only blinking led.

  • @goldenpiston8449
    @goldenpiston8449 3 года назад

    just use teensy, it is much much faster, and legit just better.

    • @TrillShatner
      @TrillShatner 3 года назад +2

      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 года назад +1

      @@TrillShatner sure you can program an ARM chip with a teensy

    • @TrillShatner
      @TrillShatner 3 года назад

      @@goldenpiston8449 Nice~ Thanks man