UPDI - The Next Best Thing Since Bread Came Sliced
Vložit
- čas přidán 6. 09. 2024
- Programming an MCU is always something to consider. Do I need in circuit programming? Can the MCU be removed to be programmed? Does the project needs to be be user-updatable in the future?
With something like an ATTINY85 you need a dedicated programmer; you can do in-circuit, but this takes careful planning on the surrounding circuit and could even be impossible to archive.
And then UPDI came along.
UPDI is a one-wire programming and debugging interface for the TinyAVR 0, 1 and 2 Series of MCUs. You could program the MCUs with something like the ATMEL ICE and even have debugging capabilities in ATMEL Studio - or you can go the getto way with a 2 dollar USB-2-Serial Interface and the Arduino IDE.
This video is the getto way.
BTW: the best way to program a MCU is no wires - but that needs WIFI and is called OTA Update. Let me know if we need to talk about that in a video :)
Boards Core -- ATTiny Core:
github.com/Spe...
Installation:
github.com/Spe...
Link for the Preferences Thingy:
drazzy.com/pack...
Mr. Bleep (uses an ATTiny85):
• The Incredible Mr. Ble...
ye olde german video:
• Det baut Zeugs - NANO ...
The Canary Connection:
Learn Electronics Repair (Richard) - @LearnElectronicsRepair
Retro Upgrade (Carlos) - @RetroUpgrade
Meet us live bi-weekly (on the even sundays): @theelectronicschannel
Video Recording Software: obsproject.com
Video Editor: www.capcut.com/
Hi Det. I have successfully used a FTDI adaptor to program an ATTINY412, i used a 4.7k resistor, worked first time. thanks again for the video. I used the 2.2.1 Arduino IDE and serialUPDI as the programmer
Hi Peter - great news! Thanks a lot for the info: it's alsways good to have a second head thinking about this stuff :) UPDI will follow us in the comming projects; this morning, Rich and myself started a new one with an 3226 - stay tuned :)
Argh! Thanks Arduino guys! Sketch menu, 'Upload using programmer' not just 'Upload', or the 'Upload' button on the toolbar! Wouldn't it have been better just to use the programmer if one was defined in the 'Tools'? I was on my third pass of the video (believe me, Det's little digressions are a lot less amusing third time round!) and my second banging of my head on a brick wall before I noticed that little gotcha! And the error message could be more helpful: 'A programmer is required to upload'. No shit, but I have a programmer, I've defined it here, I've double checked its COM port, and then doubted my own wiring, and my sanity!
As a tip, it is probably quite easy to make your own, but at only $10, Adafruit's 'HV UPDI Friend' seems like less work (and, by the time you are done, probably less cost too). USB C connector, switch for 3V/5V and a 12V boost converter for resetting the UPDI pin if necessary. If I'd made my own, I'd still be double-checking the wiring now!
Glad I could help, John :)
This video is so slow paced that even watching it on 1.5x I have troubles to not fall asleep. First three minutes = ATTiny needs to use lot of pins for programming, new TINYAvr just one. On ATTiny these pins have multiple functions, on TINYAvr the pin is dedicated to programming.
Hi Radek - you know, the one thing youtube taught me: you can't make it right for everybody. So I stopped trying. I make my videos in the way I think they should be made - if this doesn't work for you: bad luck there, watch someone elses stuff.
I won't even discuss this - let's talk electronics, not bs like that.
@@DetBuildsStuffWell, if you want to talk electronics.... The issue is that the useless filler talk will make you make mistakes. For example around 2:00-2:40 you talk about how using pin for multiple things is an issue. And then you mention that it can get more complicated because there are chips with more pins....
Also in an 18 minutes video covering UPDI I would expect more information. For example mention of high voltage UPDI, description of the UPDI physical layer (a.k.a. how is it able to communicate both ways on a single wire), the reason why there is a resistor on TX/RX (you can choose any value for the resistor - what if I choose 1M resistor), the fact that using UART is quite a hack and needs the software to behave the special way as the resistor is (unsurprisingly) not UART to UPDI convertor. What is the speed of UPDI and maybe even a screenshot of the scope with the signal on it.
You should also mention that there is a curiosity nano board for various AVR chips. And it can be used as USB programmer as well and even with the support of official AVR tools.
Also with the introduction that the viewer got to a level that he/she can use the "raw" chip on his/hers boards, I would expect tips and tricks how to do that. So for example how to make a programming connector on your own board - for example what pins do you need to have on the connector. Or also if it is a good idea to include the resistor on the board, so then you can just connect the UART adapter....
You see how much information you did not include in your 18 minutes long video... So if you cut your, how you call it bs, to the half, you could include so much more of actually interesting information...
You know that us creators do these video on our free time, right? I mean - for someone who doesn't produce content, you're a pretty greedy (can't write the word here).
Maybe a little respect for the folks who does this for you would be nice - but' maybe that's just me.
Please - unfollow. You're wasting time here.
@@DetBuildsStuffNo, you should know that there are creators that do it for money.
And how do you know that I do not produce content? Maybe you meant that I am not producing "(low quality) free content on youtube...."
But you see, you said: "let's talk electronics - the core content of the video - not the form". So I pointed out like 5 examples of that and now you call me greedy.... I would unfollow at once, but luckily I am not subscribed....
Wooow!, I had no idea this was possible!, you forget to mention to put the programmer config in SerialUPDI and SLOW was the inly one that worked for me. Thank you for your video, It helped to me a lot. Question: how would be possible utilizing the Serial communication as well? I was trying both at the same time, bit there seems to be interferance with the Serial pins of the attiny
Hi Fabian - welcome to the channel!
Thanks for the kind words - glad I could help! And yeah - Serial is possible - sadly not over the UPDI pin :) At least not in an Arduino IDE - not sure if debug statements over UPDI are a thing in Atmel Start/Atmel Studio.
If you wanna have some trusted "debug" I'd suggest a second serial adapter and something like CoolTerm to read from the serial - in Arduino IDE you'd have to switch ports for Programming and debugging (b'c of the separate program/debug port).
Keep in mind that serial functionality "costs" a lot of program memory; I think just including
Serial.begin(115200);
Serial.print("Hello");
Will cost you about 1k - on a '412 MCU that's 25% of program memory.
To find the pins dedicated for serial - check Spence Konde's documentation: look for your chip, you'll find something like RX and TX in the pinout. Remember that the connection to your Serial Adapter is cross over... yeah, it's easy to forget things like that. Ask me how I know....
Anyways - have fun with UPDI!!
Insightful.
Hi Det loved the video, i have FTDI adaptors, When i try these i will let you know how i get on. Keep up with the videos
Hi Peter - thanks, man! FTDI should (!) work; you may have to fiddle around with the settings (Tools>>Programmer) when you choose the adapter. You probably have the working drivers - so yeah - please let me know about your experience.
Appreciate the insight. Maybe I will eventually learn how to give it a try. Regards
Hi Ed - wait for the next video (the halloween one) - the project in there uses UPDI :)
Thank You for the video
Hi Tom - thanks!!! Have fun with UPDI!!
Heya, as I never worked with this kind of processors I have no Idea what you are talking about I think I really have to learn the basics first. I don't want to sound negative because your explanation is very good so I know it's me who doesn't get it
If you're wanting to get started with microprocessors and all things CPU, Ben Eaters videos provide a great learning resource thats accessible even as a beginner : )
Mornin' Dutch - yeah, you and I have a very different approach on electronics :) But that's the beauty of it: I can learn from your videos, too!
There will be more videos with "naked" controllers - to me, designing a circuit around a bare MCU is more intuitive than fiddeling around with Uno/Nano boards. But I'll try to trow them in from time to time :)
Hi @@amelted - welcome to the channel!
I love Ben's videos, but the Arduino-approach is a totally different thing. Ben does his projects bare metal 6510 assembler - with those MCUs, c++ gives you way more flexibility (in my eyes). The Bare Metal approach is fine from a learning point of view - for real world projects I would always use a MCU (and I hate Breadboards) :)
Ralph S. Bacon's channel (czcams.com/channels/8Ob-HnnmhlgSv5Vs_i32TQ.htmlvideos) was a great rescource when I started out with MCUs - there are some great projects on his page.
Sketch name is a reference to your experiences making the video? 😉
please explain line 8. can the pickit 5 be used with arduino ide?
Hi TheUnofficialMaker - welcome to the channel!
Line 8 - man, I have no idea what you're talking about. If I have to guess what ppl wanna know, there's a high chance I'll get it wrong (rabbitholes, you know?).
I have to admint that I've never been the PIC guy; back in the days I did some 8031/51 assembly, but PICs always escaped me. From the channel you can tell that my current focus is ATIMEL or ESPRESSIF. The next most intersting MCUs for me would be STMs - RP2040 is nice, but ESPs are nicer :)
So - no idea about your PickIt 5. But you may wanna give UPDI a try - these are some smart MCUs.
Very useful stuff !...cheers.
Hi Andy - thanks mate!!
:)@@DetBuildsStuff
Can't add the json file as the certificate for Spence's github has expired. Hopefully, he will update it soon. I love ATTiny, but my Mac is new so I don't have the boards on my Arduino IDE.
Hi Michael - sorry, can't really help there; Windows, you know :)
But I can confirm: the JSON link to drazzy.com isn't working. Normally (!) this should get fixed pretty fast - fingers crossed!
You can always go the long road and get the core from github itself - but I feel ya: the other way around is way more comfortable.
same for me just tried and still isn't working !
Hi Det, It seems there is an issue with Dr Azzy site and the Jason URL dosent work at the moment. No idea why !! not my thing....cheers!!
Hi Andy - yeah, it's been down for a week now and I have no good way contact Spence. The Core is included in the DL for the multiload Display module (czcams.com/video/WBLlpKupU5E/video.html), but this is the Windows version; if you wanna do linux or mac, you have to extract the needed files from the DL.
Fingers crossed!
Cheers !@@DetBuildsStuff
Man i can't find the box on AliExpress
Hi PhonixGaming - love to help you, but I have no idea what you mean with "the box". And - trying not to sound rude here: if you expect some help, you may wanna put some effort into your question ;)