Dave battles the Atmel/Microchip AVR ISP Mk2 programmer with AVRdude in order to program an ATMEGA328 and get his uRAD radiation monitor working again. Can he do it?
http://www.uradmonitor.com
Forum: http://www.eevblog.com/forum/blog/adventures-in-avr-isp-programming/'>http://www.eevblog.com/forum/blog/adventures-in-avr-isp-programming/
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
EEVblog Amazon Store (Dave gets a cut):
http://astore.amazon.com/eevblogstore-20
T-Shirts: http://teespring.com/stores/eevblog
๐ Likecoin โ Coins for Likes: https://likecoin.pro/ @eevblog/dil9/hcq3
http://www.uradmonitor.com
Forum: http://www.eevblog.com/forum/blog/adventures-in-avr-isp-programming/'>http://www.eevblog.com/forum/blog/adventures-in-avr-isp-programming/
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
EEVblog Amazon Store (Dave gets a cut):
http://astore.amazon.com/eevblogstore-20
T-Shirts: http://teespring.com/stores/eevblog
๐ Likecoin โ Coins for Likes: https://likecoin.pro/ @eevblog/dil9/hcq3
Hi do you remember the micro red monitor radiation Network thing that I got in the mailbag quite a few years ago from Radu motifs and um, well I used to have it hooked up to my network here and I was monitoring everything else. but I think he changed the system I don't know something happened because I got in like an early Biddy unit or something like that and I was supposed to and it just stopped working in one day and he sent me some new firmware and this was quite a long time ago. but I never got around to updating that firmware. so I just thought I'd actually do that Now it's an 80 mega three to eight I think it is inside this thing and radios got this nice firmware upgrade guide page.
so I thought I'd just do this I've got my AVR mark to programmer so hopefully that will work. It's a 3.3 volt compatible unit. so he sent me a hex file. It has to be individually programed hex file for each unit and so I've got that and presumably it will work again if I flash that.
So I've got to do the AVR Well, I was going to well, he's suggested AVR dude here but I thought ah now look I'll install Atmel Studio seven I haven't installed it for a long Atmel studio for a long time I mean you know five or six was the last one I used before they got bought out by Microchip. Anyway, I've been sitting here trying to install this heap of crap for like 10-15 minutes and it's just been spinning its wheels most of the time it's spent. this was all the way over here. Now it says it's caching something.
it's just in I The worst installer I've ever seen. It just sits there giving you no information at all. Absolutely ridiculous. Anyway, not happy with that at all.
So I think I'll go down the AVR Dude route and we'll give that a try. I've never used AVR Dude before so we'll give that a go anyway. We'll go into when AVR I believe is contains AVR dude and everything else are download and install the latest version of that. Let's go so we'll just install that English Thank you very much.
install that and give it a bill. Ah, it's on my other screen and I can't drag it. Hang on. Yes I can.
yeah I Agree. Whatever. Signed my life away. Ah, just going to put it in my C Drive oh yeah, whatever.
So nice more let's go store program is notepad. I Don't like that so that's install that was quick and painless son like a bloody Atmel studio thing. unbelievable thank you very much. Eric B Weddington Who maintains this? Some open source we know AVR is like an open source I sort the suite of executable open source software I'm fantastic and yes it contains AVR dude down here.
5.8 cv open-source programmer software is use it extensible. So there you go. Um now I presume I've got to our plugin my A VR ISP Mark 2 programmer. hopefully this works.
Find out. I'll plug it in and it's installing device Driver here we go. Driver not found. Terrific.
First hurdle I mean I Haven't done a VR programming on this machine for a long time and well may not have Enum originally beam this machine. So yeah, let's like give me a break. Ah hey bloody tools like this just want to prove in one chip. That's it. Now my cursor is frozen. What the hell going on? Stupid mouse Logitech: M2 1/5 Nope. Nope. Disconnect the programmer.
Nope. The money curse is frozen. Alright now. I Remember year you had to install the AVR ISP drivers separately and that installer didn't do it.
So let's um here it is Live USB blah blah blah blah blah. So we can actually go in here in the win a VR stuff it installed and we'll have to do that on our own. It looks like it might be in utils. Libby USB Ben obviously.
Um, is that where the install info wizard? Why don't I live USB Yep. Libby USB That's what we want so much I Guess try and run that. this program will create a new file for your device before clicking I Yeah, here we go. Well, we got.
note: Select the device Okay I got to plug it in. Hang on here we go! Oh so much fun. Something for the whole family. Sorry Keansburg, going back to the other screen I capture on a specific screen because I've got a full HD screen a 1920 by 1080 screen that I capture on.
it's not my main screen so it's A. that's just the way it is anyway. So AHA there it is next I assume insert manufacturer name Atmel or is it microchip now So I guess I don't know I haven't done this rule. your file okay oh okay.
can I load that so it's saving? Okay, we'll just save it as your file. Mmm okay. a VR is P2 Imp. that's the there's that like a Windows setup thingamabob is it I don't know I don't know enough about this crap.
All right now we're talking I went into Device Manager Here we go Yeah! I went into Device Manager AVR ISP did all the manual stuff Windows can't verify and install this driver software anyway. you bet. Come on, let's go all this manual start like it probably would have worked if I installed the quencher. The pain of installing the Atmel studio thing if it ever bloody well downloaded anyways counter the problem of course it has I think I remember this before and I've probably even done a video on it.
but I can't bloody well remember our close kernel and digitally signed driver. Blow it out your ass. Oh god, why can't tools just work? Man Whoo! it may have actually worked. Look there it is Live! USB Win32 Drivers AVR Asp Mark 2 It's no longer in the other devices, so why did tell me that? whatever? it didn't work anyway? Um, okay.
we might be cooking with gas. Let's give it a bell. All right. I'm in my command prompt here.
good eye. back to the days of dust. Jeez. Unbelievable.
Anyway, there's my Micro red monitor hex file that rod is prepared for me and AVR dude there it is accessed now I Like my A VR Asp Mark 2 programmer, the orange light on the top is flashing. so I don't I can't recall if that's normal or not. I'm surprised that you know there wouldn't be surprised if there's some sort of firmware incompatibility issue because I've had to update the firmware on the AVR ASP mic to several times in the past and it's been a whole pain in the arse. It really has. So let's what we have to do. Here we go. We've got a command here AVR dude so we should be able to. Can we copy that anyway? So there's my AVR Asp Mark 2 hacked version.
You might remember that I did a video on how to hack that to make it a 3.3 volt compatible and I can't remember if that's normal I don't know it's doing something Anyway, time to hook it up to the DUT the poor old dot so he is inside my little micro red mondo. Sorry about the focus. This C920 webcam seemed to have a hard time focusing on stuff I'm not exactly sure why. Anyway, let's should make sure we get pin 1 correct of oriented as per the photo so that looks that looks correct.
Come on, get on there. Ah, dull, You're not going to believe it. This is a 10 pin header. I've only got the 6 pin, only got the 6 pin header and like this.
Let's just like it just sucks your time away. It really does when you've got to do something like this just once like you know, like ordinarily I haven't programmed Atmel AVR stuff for years, don't have the software, don't have the you know I'm not doing something, not something I'm doing everyday and just like should have checked but I didn't and of course it doesn't fit. And of course I'm not in my lab. I'm actually at my editing office here doing this and I don't have the little jumper cables to go over.
Ah yeah, hang on. Yep, typical. Friday And there it is. There's the two different six pin and ten pin is.
AVR ISP headers all right? So I've got all the wires bogged in converting because it's not the same pin out. It's not. You know, like it's obviously got the same connections, but the actual pin out is apart from VCC I Think is the only end? Maybe yeah, an equivalent ground on pin six. there is basically the only one that's the same, so it's yeah, just rather annoying.
Alright, hit multiple ISP programming things anyway. 3.3 volts I Don't believe we need to apply power to this. It should pair it through the ISP So let's switch it on and see what happens. I believe it's supposed to.
hey hello, there's a LED under there Oh Green green. Yes, we got it. I presume that's er, all hunky-dory let's try out. Come on now.
we might be on a winner. Alright, now we're supposed to put in this command here to do the AVR do program, but see is to specify the actual our programmer itself. now. I'm not sure of the ID name.
Obviously, it's not the usbasp of what I don't think it could be. um, but apparently you can type in the command AVR dude - see Asdf and that's supposed to put in. The supported programmers are there we go. a VR IFP M'kay - okay, you can put evil one. Okay, so it's all lowercase Avri FP Mk III let's try that. Cool, All right? I'm going for broke here. Here we go. hopefully.
I've got that command right. AVR Dude. I've replaced the AVR Asp mark - I put in my file name exactly : I on the end Wha? Here we go. Fingers crossed in shot, it's doing something.
Come on. What's the note? note that doesn't look promising. Oh no, Here we go receive timeout not ftk 500 - no, it's not talking to the programmer. Ah great.
I knew this had happened like Murphy it was guaranteed it was guaranteed not to work. Ok, let's try changing the programmer name. AVR ISP - let's try that. give that a bill and no I'd expect it to instantly connect.
so what? wha? and I think I might know what's wrong. Look, it's got the little La warning thing next to it. It didn't have that before. So yeah, it's obviously not talking to that anymore.
So what's going on? Hmm. alright. so I just installed like another random driver off the interwebs and it seems to afar seems to have done the trick. There you go, it seems to have done the trick.
so now it's well. Device manager says it's all hunky-dory but I'm sure it said that last time. did it all righty. let's try that again.
Glutton for punishment? No. I would have expected it to talk straight away surely. night-night I think it's going to do the same thing. No yeah it time out there you go and it still says it, still says it's installed.
So yep. but why it's looking for the STK 500 - well maybe that's sort of the driver it's kind of using. but yeah it's getting time out so it's obvious clearly not working. It's not talking to the programmer.
well who I got it. Hang on here we go. I'll tell you in a second I know you forgot it. Record: Ok what I did Whoa.
We're done Safe mode, fuses ok, Flash verified. Thank you Thank you very much Avi Dude Done! what I did is I'll go back in here. here we go: I put in the - uppercase P as opposed to lowercase P which is program by putting the uppercase P which is port and then USB yeah the - P USB uppercase P port So apparently it's supposed to. The drivers are supposed to just do USB by default or something, but hey, it couldn't find it so that's all it was and everyone's probably screaming I'm going dope dull.
that's obvious I know about that? Well, of course you do right. It's either worked perfectly for you before, or you follow the instructions that works perfectly or you've been using it forever. But when you come, you know to something like this like once in a couple of years, you just want to print you know, dig out your old programmer and just program a header, then. well, anyway, we're done.
I'm sorry I'm happy. Hopefully now all closed. So this is our E flash to reprogram. so I'll put it back in the case I'll hook it up to the Usb.
Apparently it takes a while to connect to the micro read system or whatever so I can't exactly remember if it's like it pops up. should auto pop up with my like hey, if memory serves me correctly because my one's programmed with my location so it should automatically identify on the network. So anyway, there you go. Since that was just that took me a little bit. not sure you know how long that took me all up like an errand something. Plus you know going back to get the cables from the other lab. So there you go I hope you enjoyed that. Well is nothing to enjoy I just wanted to share with me you the ultimately what I knew would be a little bit of pain in getting this working I knew this sucker would not work first.
Go I Don't think it ever has the AVR is P marked or had so many issues with it in compatibility with various our tool AVR tools that I've used over the years. pain in the butt. But anyway, yeah it's like driver issues and whatnot. but I'm no surprises in this.
update. The firmware in this again. but yeah, mine's like a 2009 vintage unit or something. It's pretty old so yeah.
anyway hopefully I'll get this working. It looks like we've got one that look it wasn't live in Sydney before, but check it out unfortunately I know it's got to be mine unit. Yep, a double one, double zero, double zero zero B in Cremona Military Road Cremorne I Do not live anywhere near Cremorne For those who want to know, for those who haven't been to Sydney before, let's have a look at the map. Here is the Sydney Central Business District of Sydney CBD and the iconic Opera House is up yet right in there.
That's the Harbour Bridge. Then you've got the harbour tunnel. Nobody likes to have a tunnel, but it's functional. It works.
and I used to work at the Garden Island Naval Base there for Australian Defence industry cheese that was in the Galaxy far far away. And yeah, so that's Sydney CBD But Sydney actually extends basically all of this. All of this whites so well. it doesn't extend down that far.
pretty much stops down at like Camden. There pretty much end up pinned roof at the base of the Blue Mountains. Yeah, that's where it stops and that all of that. that's about 50 kilometres from Sydney right out to the base of the mountains there.
So Sydney's a pretty darn big place and I am like out in the Hills district somewhere around here, somewhere around there, so they have it. I am back on the grid and I am currently the only operational one in Sydney um I Don't know if these other four other people have got them, whether or not their um head like with that firm where like early units and then somewhere. Also, we're not being compatible with some upgrade or something like that, but anyway, mine is working. What Am I getting? What sort of dose am I getting Microsieverts per hour? Point One Five point One eight.
Ah should go to the bunker I think Anyway, hope you liked it. Catch you next time.
One of the most entertaining videos I've watched today.
i think he just need fluffing chill and he making this harder than it should be
I appreciate that you posted this. nice to see we you were persistent and worked it out. Ill be doing something similar later today.
The red light will go green when you power the target device use usbtiny as programer : – ))
OMG!!! Enough of the whining!!!! Approach the problem and frickin' solve it! I couldn't finish this video…
can you program an ATMEGA/ATtiny with arduino directly from the USBasp? After burning the arduino bootloader
Why do you have to critisize everything? Why are you never satisfied with anything
This is why I'm still using Windows XP in 2023 and everything works just fine.
You could have just gone and had your lunch or something while Atmel Studio installed and when you got back it would have taken 3 seconds and you'd have Atmel Studio ready for next time you needed it.
Installing the libusb-win32 driver is basically an obsolete thing to do. Modern versions of libusb 1.0 work fine with Microsoft's built-in generic USB driver, WinUSB.
I love how Dave just IGNORES the error messages, even though the answer to the problem was IN THERE! He ALWAYS does this too, it drives me nuts…. just randomly closes error windows without reading them and then gets angry when something doesn't work. WTF Dave?! You're supposed to be one of us.
For someone who makes videos on topics related to embedded development, and who in general is a "techie", I find it EXTREMELY surprising and disappointing that you didn't know what to do. I think all techies know that Windows 10 will only accept digitally signed drivers. If a driver is NOT digitally designed you have to reboot into a special mode (which is actually quite easy, just look it up).
Yes, the 6 and 10 pin ISP headers are just more of Atmel's shiithouse design decisions.
Firstly, because there's two of them, secondly, because they're both stupid, and thirdly, because DIL headers are more difficult for home-made PCBs, if you need to run a trace between the pins. They just make for a crap layout.
I've always used a 6-pin SIL header in my designs: MOSI-MISO-SCK-VCC-RST-GND. With that, 5 of the 6 pins then match many of the DIP package AVRs (eg: Mega8). It's so bloody obvious really, you just put the header next to the MCU with 5 very short, straight, pin-to-pin traces. The only slightly more complicated one is RST. And the header causes minimal interference when routing those MCU pins for non-ISP usage.
I can never understand how people manage to make adapters like these such a pain in the arse to install with weird custom unsigned drivers etc. I just use a serial port programmer (basically a couple of transistors and a few resistors for cheapo level shifting) for AVR programming – admittedly I'm only doing basic programming of the flash and fuses, nothing extra fancy like in circuit debugging and the like.
But you have noticed, that the software and usblib was from 2010. 7 year old software is not the best thing to go with I think. Even your avrdude version is about 6 years behind.
Dave the vast majority of these devices just a need a generic usb driver (that's what libusb is) and by far the easiest way to set that up on windows is a free tool called zadig.ย It has several usb drivers, including libusb, so if one doesn't seem to work well with a particular device you easily try a different one.
There is no need to make an adapter for 10pin ISP.
If you open up the AVRISP mk2 (just 4 clips on the bottom) you'll find that there are pads for a 10pin header, you merely have to solder it and connect a ribbon cable. You can also leave both 10pin and 6pin ribbon cables attached, the front slot is large enough.
I loved it. LMAO
I hate these tools. Why can't hardware manufacturers supply nice easy to use tools like MPLAB or MPLABX????? I used DOS command line programming tools in the early '90s, why are they still available? FAIL.
Oh dear, the Windows World is sooo broken :/ It's a shame that a lot of food Software like Fusion360 only has Windows support.
That is precisely the type of experience that made me dump Windows for Linux years ago. Never looked back. Very occasionally I am forced to use Windows on my job, and every time I ask myself why on earth anyone would still put up with that bloated, malignant, overrated heap of malware out of their own free will.
That was a fun one! Glad you got it working. Looking at the map of Sydney made me think how neat it might be to see your take on a video outside the lab. I'm thinking around town and some of your favorite spots (want to know where to go when I come for a visit). It seems like such a beautiful city and I'm definitely planning to visit at some point in the future.
Ha, you have as much patience as I do for poor programming and interface design LOL
how about just use any Arduino, flash it with ArduinoISP then use it as an ISP??
Some years ago, returning to ยตcontroller stuff, I had to choose between 8051, AVR and microchip. Familiar with 8051 assembler, I found the products old and lacking features. I went to microchip and when I watch the pain with Atmel products, I think I made the right choice. Pickit3 doesn't need painfull microcode update. Correction. microcode updates on pickit3 are handled by mplabx.
this thing has the same IC as arduino
This video shows the joys of not reading the manual, and just clicking on stuff. He does read the info/marketing blurb parts, and then just clicks on stuff. Then struggles.
Would he use a component on a breadboard without checking the datasheet? No? They why not read it for the software? Because he just wants to do one thing with it! Does that make it take less time to get it set up? Of course not!
"Why can't tools just work?" Because they do work, and not all work is the same. So you have to read the manual.
Like he says, he can't remember. Of course not, you're not supposed to run off memory, you're supposed to open the manual and then instead of "d'oh!" you just follow the instructions. The tools aren't doing anything wrong in this video, it is just that the operator presumed that he doesn't need to check what he's doing, because he's only programming one unit. But is there supposed to be an economy of scale there, where it is less work if you're only doing one? Or is that actually when you have to spend the largest effort per unit, when you're just doing one?
I think this video just about sealed the deal for me. For a while, I was a dedicated viewer. I could deal with the occasional "bitch fest." It's been quite some time since I've even seen a title that grabbed my attention … but this one did. I was really looking forward to some "Adventures in AVR ISP Programming." What I didn't anticipate was by "adventures" you really meant "simple troubleshooting that you're going to whine about throughout the entire video." Not only should ALL engineers have no trouble with this type of shit… they should actually ENJOY it! Do us all a favor and just have David do these particular videos. He doesn't seem to mind troubleshooting. He doesn't seem to mind reading documentation first. Even when he can't figure something out… he doesn't whine about it… he laughs! So yeah… It's about time I make it one subscriber less. Good luck.