Тёмный

Programming the new ATtiny from Arduino using UPDI [Beginner Tutorial] 

bitluni
Подписаться 251 тыс.
Просмотров 88 тыс.
50% 1

This tutorial shows how to make a cheap and simple UPDI Programmer and upload a sketch to the new ATtiny micro controller series. The programmer is made from an old Arduino Nano and requires only two additional passive components. The megaTinyCore library provides an Arduino core to start developing. A short blink sketch demonstration should provide a good start for every beginner in this matter.
Links to the github projects:
github.com/SpenceKonde/jtag2updi
github.com/SpenceKonde/megaTi...
Boards package url:
drazzy.com/package_drazzy.com_...
Dave darko's K.I.T.T. badge: www.tindie.com/products/daved...
My Halloween Badge: www.tindie.com/products/bitlu...
Links to the parts (affiliate links):
Arduino nano clone ($2):
aliexpress.bitluni.net/nano
amazon.bitluni.net/nano
Electrolytic Capacitors 12Values (120pcs $1.60):
aliexpress.bitluni.net/elecCaps
Metal Film Resistors 30 Values (600pcs $2.65):
aliexpress.bitluni.net/resistors
ATTiny ($0.65):
link.bitluni.net/attiny
SOP16 SSOP16 Break Out Board (20pcs $2):
aliexpress.bitluni.net/sopBre...
SOP16 Programming Adapter ($2.20 shipped):
aliexpress.bitluni.net/sop16A...
5mm LEDs (different colors 100pcs for ~$1):
aliexpress.bitluni.net/leds5mm
Breadboard Set (~$3.50):
aliexpress.bitluni.net/breadb...
My camera and lens (4k 60fps):
amazon.bitluni.net/gh5
plz share :-)
Check out my Tindie store to get some of my creations:
www.tindie.com/stores/bitluni
Consider supporting my lab on Patreon for some extras and frequent updates:
/ bitluni
I'm also thankful for any donation on PayPal:
paypal.me/bitluni
Twitter: @bitluni
reddit: r/bitluni
#electronics #diy #tutorial

Опубликовано:

 

10 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 123   
@StephenBrown85
@StephenBrown85 3 года назад
This tutorial was great! There are so many confusing guides to get this chip working but yours was crystal clear and worked perfectly first time!
@DRSDavidSoft
@DRSDavidSoft 4 года назад
Great style of explanation, I praise your ability to go into the fundamental details.
@johnconnolly512
@johnconnolly512 2 года назад
Brilliant! A very concise, elegant tutorial. A little humour always helps, too. Thank you.
@MarcusAshleyLowDBs
@MarcusAshleyLowDBs 4 года назад
Amazing work. Thank you for your in-depth, no assumptions, every step is shown work. People should use your videos as a standard for electronic tutorials.
@cashewmilkfan
@cashewmilkfan Год назад
YAY! I got my attiny402 working thank you so much for the clear and professional tutorial
@dl8cy
@dl8cy 4 года назад
Bitluni's videos are always awesome!
@Vimerum
@Vimerum 4 года назад
Your videos are always awesome and that end song it's amazing as well
@avejst
@avejst 4 года назад
Great walkthrough Thanks for sharing this new approach for programming the ATtinyminis :-)
@spaceengineersmods
@spaceengineersmods 4 года назад
Eeeendlich auf das Video hab ich ewig gewartet. DANKE
@Nono-hk3is
@Nono-hk3is 4 года назад
Spence Kinds is my hero. I've been using his attiny core for years. I'm glad he's working on the new tiny's.
@michatroschka
@michatroschka 4 года назад
yeah it works pretty fine for the 85
@Lyndon_K
@Lyndon_K 3 месяца назад
Wow, what a great video! All of your explanations were super clear and the editing was superb. 👍 Thank you very much! 🙂
@GnuReligion
@GnuReligion 4 года назад
Very glad to find your video about this. Have avoided buying any of the new AVR chips for the uncertainty of being able to program them without an expensive, proprietary device. I made a PDI programmer a couple years back for some Xmega chips ... it was a 2-wire affair though, that uses a special patched USBASP. It is nice that STM32 and ESP chips ship with the ability to program through ordinary serial ... though 57600/8E1 is a bit weird.
@BernhardHofmann
@BernhardHofmann 4 года назад
I just watched this on my TV where I can't comment. This video is so well packed with information and humour I just had to get my phone out and let you know I loved this. I laughed out loud when I heard the crickets. 🤣 You've gained another subscriber!
@bitluni
@bitluni 4 года назад
Thanks Bernhard!
@seferideveloper6933
@seferideveloper6933 2 года назад
I always feel myself like a silly when i try to search how to program new tinys and megas. Finally i could understand. Thanks a lot.
@bardenegri21
@bardenegri21 4 года назад
Great stuff. I have to read up on these new gems.
@jparky1972
@jparky1972 4 года назад
Brilliant! I've only just become aware of the new attiny chips. Looking into programming them looked to be a bit of a nightmare. As well as expensive if you use the official AVR package. So thanks for putting this tutorial together.
@DRSDavidSoft
@DRSDavidSoft 4 года назад
Me neither! I knew about Microchip acquiring Atmel, but didn't think they would "refresh" the ATTiny line-up. This is an excellent guide, and very informative! I
@djrrmml7514
@djrrmml7514 3 года назад
Thanks! this really helped me getting started, once you go updi you want nothing else for those attiny's
@opsahle2
@opsahle2 4 года назад
Great video, Bitluni!
@pandarojodronero2919
@pandarojodronero2919 4 года назад
i didn't have any idea about the new atinys and this new interface, and the SWD with only to pins seem nice before... and using the reset pin! genius!
@OliNorwell
@OliNorwell 4 года назад
Great video - has motivated me to try this myself
@deathshaker0026
@deathshaker0026 4 года назад
Yep watching this video makes me feel more like a nerd then ever! Thanks Luni! ;) Don't forget the cap... ok I have breakout boards.... ok I have adapter socket and the CMOS clip ok I just need a some ICs and a projects.
@Digithalis
@Digithalis 4 года назад
very cool! you are able to make so much more great tutorials that must be seen ;-)
@thenoisyelectron
@thenoisyelectron 3 года назад
Flawless tutorial, thank you! My old Attiny85's hate this video!
@pauldusa
@pauldusa 4 года назад
I built a 3 wire UPDI interface out of a USB Ftdi and a arduino pro mini for my Attiny 3217. Very small and handy. Works well..
@tjwatts100
@tjwatts100 4 месяца назад
Really useful - thanks mate :)
@matheusisrael4121
@matheusisrael4121 2 года назад
Man, this channel is amazing! I would love see a video about how to use a processor and memories to build video on a TFT LCD of a laptop or more... in the bitluni style of course haha
@coxsj
@coxsj 3 года назад
Brilliant, thank you so much for sharing this!! ;-)
@onebreh
@onebreh 2 года назад
Thank for this!
@andymouse
@andymouse 4 года назад
Great info!...cheers.
@thenoisyelectron
@thenoisyelectron 2 месяца назад
I keep coming back to this video when I reformat my PC and forget how to set everything up to program these little brains :)
@arnauddurand127
@arnauddurand127 4 года назад
A quick extension of this tutorial to illustrate how to send a 12V pulse to RESET to put the ATtiny back in UPDI mode would be awesome! This is very useful for the low pin count variants.
@regal_7877
@regal_7877 4 года назад
Hey your comment piqued my interest and also raised my anxiety. What is this about putting the chip BACK into updi mode? Does that mean that the new attiny chips are one time programmable or something? Sorry if this is a stupid question but I’m very new to this
@arnauddurand127
@arnauddurand127 4 года назад
@@regal_7877 If you use all of the GPIO pins for your applications, it means that none of the pins will be dedicated to programming anymore. In that case, you have to force the ATtiny to go back into programming/UDPI mode by sending a 12V pulse to RESET in order to reprogram it.
@regal_7877
@regal_7877 4 года назад
@@arnauddurand127 Oh alright I understand. That's whyh most of the tutorials I find only use 5 GPIO when actually the RESET pin can somehow be used as a GPIO too. The digispark version has 6 GPIO (the old series attiny85). Thanks for the explanation
@dawnless852
@dawnless852 4 года назад
"use a zocket to" love ur german accent :D
@power-max
@power-max 4 года назад
I implemented a small 30W LED driver (boost converter) and used an ATtiny1616 MCU because it had a DAC that I could use to set the brightness without PWM, but was halted by the fact I had to development environment in Linux or a programmer for it. Guess I need to dig that project out of the failed projects bin!
@Evgen-Evgen-Evgen
@Evgen-Evgen-Evgen 2 года назад
Thanks, works with tinyAVR 2 Family, specificly with ATtiny1626 and 1624
@Leif_YT
@Leif_YT 4 года назад
The new little 412 is similar priced to the old chinese Attiny 13 ones. It's very tempting to try them out.
@voncky9999
@voncky9999 3 года назад
Hello, great material, will use it in my activity. Just a weird question is on my mind. Is there any chance of using this UPDI link as normal serial (UART) port? It means after programming, can I use to communicate with ATtiny from PC terminal? Or do I have to use Rx and Tx pins for serial communication?
@Beredro
@Beredro 4 года назад
Nice to know. Now I can throw out my adapter board I made for a Nano->Attiny Adapter and make a new one. Unfortunately I do have the tendency to use the 328p for nearly everything. I still got no idea for my next PCB Art project for Christmas.
@bitluni
@bitluni 4 года назад
Legit. Do you know how much current it takes clocked down? Cr2032 needs to last long
@Evgen-Evgen-Evgen
@Evgen-Evgen-Evgen 2 года назад
i hope to see atTiny AVR 2 Family in future
@michatroschka
@michatroschka 4 года назад
thank you/danke for this tutorial and the notice on the release of new attinys!! theyre not really easy to get, as mouser charges a lot for shipping to germany.. so with the price of around 80 cents, theyre very cheap. but the smd component require a breakout for breadboard use, thats plus 2 euro. then i can get a nano for 3.. whats the benefit of the new attinys, compare to for example the nano, with the 328 chip, or the old attiny 85, which is Dil8, so directly usable without breakout. is there also an updated version of the Attiny 85 with dil and 8 pins? thanks!
@peterkrause7700
@peterkrause7700 10 месяцев назад
Great Video! Will this work if the part is already mounted on a PCB circuit with a 4k7 resitor and pin. ie I am creating a circuit to use it as a simple program to set TWI (I2C) on power on to another part requiring I2C comms to set its paramenters. Thnaks Peter
@paulbehrens5842
@paulbehrens5842 4 года назад
Didn't know Microchip bought Atmel. PIC and Atmel fans must love this fact.
@akj7
@akj7 4 года назад
Man, this was common knowledge for the longest of time. Microchip had always been trying to acquire Atmel.
@DRSDavidSoft
@DRSDavidSoft 4 года назад
I recall the day it was introduce, and as someone who works with both AVR and PIC, I was excited about the news!
@Ed19601
@Ed19601 4 года назад
Very informative, thanks. I will try one of the new ones, just to see if I can, if I can get it cheaply: Delivery charges at mouser turn these into expensive (30 dollar) chips
@Leif_YT
@Leif_YT 4 года назад
Usually above 50€ the shipping is free. I order a lot of stuff from China, but there are always some things you can only get from Mouser or similar sources. I usually add them up in the basket until i'm above the 50€ limit and then i order. Or try to find some people nearby and order together. Mouser should start selling Amtech Flux ...then it would be much easier to get above the 50€ on a regular basis :)
@Ed19601
@Ed19601 4 года назад
@@Leif_YT yes, but currently I do not need 50 euro from mouser. They are literally around the corner from me, so charging me 20euro shipping is a complete nono
@bitluni
@bitluni 4 года назад
just get them from ebay or a local electronic dealer. mouser is not affiliated here. I just liked it so you have a starting point
@Ed19601
@Ed19601 4 года назад
@@bitluni cheapest I found d them is 1.12 euro plus 4.95 shipping. Ordered some out of interest, but realistically it is cheaper to get a pro mini from china. Ironically Mouser IS local. They are 10 minutes away from me
@azyfloof
@azyfloof 4 года назад
Did a double take when you said "Dr Azy" hahaha :D
@bitluni
@bitluni 4 года назад
I probably butchered your name. that line was at least 3 takes :-D
@azyfloof
@azyfloof 4 года назад
@@bitluni No my name's pronounced exactly the same 😜 Despite the single Z 😆
@retrozvoc6189
@retrozvoc6189 4 года назад
Amazing! I've been looking all over for this UPDI thing! However, I wish there was an actual XMEGA microcontroller programmable the same way with enough memory and performance to be able to send a stable video signal to a display with a retro game resolution like at least 240x224 with beautiful Pico-8 pallette consisted of 16 most desirable colors. Do you know if there is any such?
@tomasz9517
@tomasz9517 4 года назад
why bother with arduino, whan you have na FLIP programmer nested in nearly all xmegas as bootloader? you need only hook up the usb connector directly to the pins of uC, shorted one pin to ground (propably one of J pin) and use the flip interface to upload hex. maybe someone already combine flip and arduino?
@bitluni
@bitluni 4 года назад
not really, but even the attiny is also interesting. 20Mhz could be enough for a pong game
@philippeschjelderup9644
@philippeschjelderup9644 4 года назад
Great work man! I got my Attiny1604 to work based on your video today! I noticed one thing people should be aware of. I'm using an Arduino Nano with an Atmega168, and in Arduino IDE it reports that it has 16k programming memory. And since the Attiny1604 only have 8k you can be fooled to think that you have more memory than you actually do. Make sure you stick to the limit on the actual Attiny and not the device you use to program it with.
@RA4FOC
@RA4FOC 2 года назад
Hi! Can I connect several microcontrollers to one UPDI pin at the same time and program them one by one?
@MinecraftLPAlex
@MinecraftLPAlex 4 года назад
Do these common arduino libraries work with the attiny?
4 года назад
Wow that's cool! How about making a board to program this attiny? Also please make a video on the new Arduino IDE Pro!
@andymouse
@andymouse 4 года назад
There is a new IDE sir?
4 года назад
@@andymouse yep! It's on public alpha now though. I'm used to code esp and Arduinos in vscode and it is so much better than the default Arduino IDE. I'm super excited about this shift towards eclipse theia.
@andymouse
@andymouse 4 года назад
@ Thanks gonna try it now!
@andymouse
@andymouse 4 года назад
There's a bit of work to do!..I had errors and could not select a board so I'm gonna wait a bit, after all it's an Alpha release...cheers!
@gudimetlakowshik3617
@gudimetlakowshik3617 2 года назад
Hi, I'm actually working on a similar project. I have a very simple question,can an esp32 be used to program the attiny instead of a nano?? I'm very very interested to know if this is is possible, if not whats the exact reason ESP32 cannot be used? Please help me understand this...thanks in advance bitluni
@wanabeasailor
@wanabeasailor 2 года назад
Thanks for the tutorial. Do you know if there is something about the ATTINY404 except for selecting that chip from the menu? I followed the steps and can't get it to work.
@wanabeasailor
@wanabeasailor 2 года назад
After checking all the wiring and everything several times and still no luck, I tried another chip and it worked! Something in my first attempts must have bricked the first chip.
@Beatleman91
@Beatleman91 3 года назад
How can I upload binaries generated by other compilers, e.g. Atmel Stuido?
@DiyintheGhetto
@DiyintheGhetto 2 года назад
Does it matter what size of capacitor is needed between reset and ground?
@muhammadzahid2653
@muhammadzahid2653 3 года назад
Can you use Serial Monitor with this UPDI method? It doesn't work in my case. Ofcourse it does not use the UART but still if we are able to upload a program to it then we may be able to get some serial output out of it. Anyone has a clue?
@TajuSingh
@TajuSingh 4 года назад
how much power it consume in sleep mode
@rahuls7039
@rahuls7039 Месяц назад
Does the ATTINY(816, let's say) microcontroller have to be at 5V(powering) for programming using Arduino(as UPDI)? What if the ATTINY uC is powered separately by a 3.3V power supply? Will a level shifter do the work in coding it?
@mikelespinosa796
@mikelespinosa796 2 года назад
Dear friend. The first of all, thanks for this video which learn us to use the new attiny family. But I have a small problem when I try to upload the code. I need 10 or 20 times to upload the code correctly. Always appear an error and suddenly it upload correctly. At the beginning I thought that it was a problem of the protoboard and soldered the resistor, the capacitor and the power directly. After that I thought that maybe it was a problem of the version of the library or the IDE version and I installed the same that you use. But nothing works. Do you know what it can be happened? Thanks in advance
@angelioto007
@angelioto007 4 года назад
omg, i need to know what's that background song at the installation timelapse called
@bitluni
@bitluni 4 года назад
Hold On a Minute - Silent Partner It's from the youtube media library
@gkeepleft
@gkeepleft 10 месяцев назад
Hey bitlini, how did you open that .zip file in the arduino ide? I tried everything and no luck.
@pavelsan1954
@pavelsan1954 3 года назад
I have problems with UPDI on tiny412. How do I reset UPDI to factory settings?
@campionstn9347
@campionstn9347 4 месяца назад
Hello can you read an atmel 85 for example with arduino you can make a video please thank you
@xumatyt
@xumatyt 4 года назад
But what about D in UPDI? How can you debug attinys?
@pandarojodronero2919
@pandarojodronero2919 4 года назад
Arduino its turning into a huge project. every day i learn it support a new board, a new chip or core inside other chips... but the IDE needs a rewriting. and the language an update
@safakozer4687
@safakozer4687 2 года назад
how can i connet nrf2401 to attiny1604 (via spi)? does anyone know how to do?
@donprefontaine3237
@donprefontaine3237 3 года назад
4.7K or 470 ohms? Your resistor is 470 (seen at 3:43/7:58) but the diagram prescribes 4.7k...
@advpareshmhatre
@advpareshmhatre 4 года назад
I was quite upset when there was not expected view s you got for ping pong ball screen project, You have taken to much efforts for that video i seen. You must have to make such video in long series and must include a to z detail not just 2 or three part. You deserve more, explore your video as much as possible.
@user-so2xd7pw9l
@user-so2xd7pw9l 4 года назад
does it work with ATTINY10?
@dave-in-nj9393
@dave-in-nj9393 4 года назад
do a vid that shows how to play music while a sketch is being uploaded. that save us watching the monitor.
@GelectronicsTv
@GelectronicsTv 4 года назад
Schönes Video ;D Kennst du mich noch von mer Maker Fair Hannover?
@bitluni
@bitluni 4 года назад
Klar, wir hatten ja schließlich ein rennen. Ich will noch eine Revanche. Übrigens hab ich deine nachricht beim makercast gelesen, aber irgendwie seh ich da nix auf insta.. bin zu alt dafür :-D
@GelectronicsTv
@GelectronicsTv 4 года назад
@@bitluni ;D alles gut kein thema wie kann ich dich noch gut erreichen? Schönen abend noch ;D Achso villeicht weil ich bei Insta GliffLP heiße ;D
@atihrot755
@atihrot755 Год назад
Cheers. Everything is perfectly explained. I can't load the jtag2updi program. He keeps throwing chiba at me. pls help me.
@edgarskulinics5540
@edgarskulinics5540 Год назад
Hi! You can plz help - I cant upload a code to Attiny414 with arduino Nano. I cant find any information how to do that. Please help. I have UPDI, but it dont work. Anything from internet dont work.
@MiniRobotShop
@MiniRobotShop 4 года назад
Hey man, where do you throw your garbage?
@atihrot755
@atihrot755 Год назад
Hello, I can't load the jtag2updi program. Please as a total cod. I downloaded it from github and I can't upload it. Please help.
@godzalli44
@godzalli44 Год назад
1:05 i got your finger print
@jendull4682
@jendull4682 3 года назад
can i program ATtiny20 XU with this way?
@nrdesign1991
@nrdesign1991 4 года назад
Was für ein Flux-Gel ist das eigentlich? Könnte ich auf der Arbeit extrem gut gebrauchen... muss QFN leadless löten
@bitluni
@bitluni 4 года назад
das ist no-clean von reichelt.. ich mag aber den geruch nicht so sehr und die färbung lässt meine US-Cleaner füllung schnell gelb werden. ist aber einfach aufzutragen und zu entfernen.
@nrdesign1991
@nrdesign1991 4 года назад
@@bitluni Vielen Dank für die Info
@WaldemarHeimann
@WaldemarHeimann 4 года назад
Whats the difference to debugWire? For me its the same?!
@watersoundsmx
@watersoundsmx 4 года назад
Candle light please tutorial
@edgarskulinics5540
@edgarskulinics5540 Год назад
Please help! SOS! Dont work - is error avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding
@Beatleman91
@Beatleman91 3 года назад
How to debug it?
@dumle29
@dumle29 4 года назад
The comparison of pin requirement is kind of weird. It's not a 6 -> 1 pin shrink. It's a 4 -> 1 pin shrink, which is still impressive. No need to dress it up any further :)
@benjocrostar
@benjocrostar 10 месяцев назад
The board package URL is no longer working
@TheRaduRek
@TheRaduRek 2 года назад
Hello. I'm Radu from Romania. I really appreciate your work and videos. I can't load the programmer code into Nano. I tried several versions, it gives me all kinds of errors. What's wrong? what's the secret. I mention that I want to program an Attiny 402... Thanks for any information. All the Best !
@danielcichon2087
@danielcichon2087 4 года назад
Was ist updi - gibts das auf deutsch auch? :-)
@hansdietrich83
@hansdietrich83 4 года назад
@tailerbrown6825
@tailerbrown6825 4 года назад
no tinies, esp32 one love
@xExPiRedLaRdx
@xExPiRedLaRdx 4 года назад
IC is backordered from every vendor...
@martinx8348
@martinx8348 3 месяца назад
All great until you selet the arduino IDE options, I get to see what you select for about 100ms . Nearly impossible to see what you do.
@goury
@goury 7 месяцев назад
Good. Except jtag2updi is long deprecated.
@cedrichirschi8036
@cedrichirschi8036 4 года назад
Dont search for the link written on Lunis UNO-Board. JUST DONT
@nopparuj
@nopparuj 4 года назад
Wow it literally lag my phone, incognito mode for sure...
@ChunkySteveo
@ChunkySteveo 4 года назад
hahahahahaha!!! OMG!
@ac1dra1n
@ac1dra1n Год назад
jtagmkII_getsync(): sign-on command: status -1
@WagonLoads
@WagonLoads 3 года назад
// simplest blink line.. digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); delay(500);
@atihrot755
@atihrot755 Год назад
Cheers. Everything is perfectly explained. I can't load the jtag2updi program. He keeps throwing chiba at me. pls help me.
Далее
Make a UPDI Programmer for the Arduino ATTiny
14:50
Просмотров 23 тыс.
На чем играют ПРО | Standoff 2
07:25
Просмотров 137 тыс.
СКАМ НА TWITCH
14:07
Просмотров 303 тыс.
I made a custom ASIC: World's first of its kind
16:38
Просмотров 187 тыс.
How to use the Atmel ATTINY10 Microcontroller
53:02
Просмотров 548 тыс.
I made a VGA card that blew my mind
15:44
Просмотров 422 тыс.
From blink to DIY Mini Game - Charlieplexing explained
15:12
How to Program an ATtiny with Arduino (Up to Date)
10:09
DIY Sonar Scanner Ep. 2 (STEM, RMT tricks)
8:20
Просмотров 142 тыс.
DIY sonar scanner (practical experiments)
14:30
Просмотров 1 млн