#avr Logs

Apr 24 2019

#avr Calendar

11:26 AM Maya-sama is now known as Miyu
04:24 PM vmt: --
10:01 PM weilawei: Welp, I'm a dumbass. Bricked 2 ATmega32s today and possibly my usbasp. Not a huge deal, it's like $12 of parts, and I've got a raspberry pi swapped in as a programmer for the moment... but instead of throwing out chips, I'd like to start recovering them (I've bricked at least 4 over the years now).
10:02 PM weilawei: I see that I could do HVPP, and probably wire it up from another ATmega32 (I've got 2 remaining good ones). Any suggestions on the simplest possible circuit and code to reset the fuses?
10:03 PM weilawei: I've looked at a number of them online, and they almost all focus on the ATtiny or much larger ATmegas
10:43 PM rue_shop1: hi
10:44 PM rue_shop1: how the hell did who m32 cost you $12?
10:44 PM rue_shop1: did you set the reset pin to be an io?
10:45 PM rue_shop1: /who/two/
11:08 PM day__ is now known as day
11:08 PM weilawei: rue_shop1, plus the usbasp already assembled
11:09 PM rue_mohr: dude, tha should be like $6
11:09 PM rue_mohr: maybe 5
11:09 PM weilawei: rue_shop1, I've been ona good run of bricking chips today. And it involved a ground loop
11:09 PM weilawei: they're 3.65 a pop to start. ;)
11:09 PM weilawei: right off digikey
11:11 PM weilawei: I'm not even entirely confident the chips aren't just flat out fried. But.. they'll boot.. part way, sometimes. And then hang. But if I dial the voltage waaaay down on the power supply and back up, it'll continue on its merry way.
11:12 PM weilawei: Can't reprogram them, ID comes back all wrong, etc
11:15 PM rue_shop1: well your paying too much right here
11:16 PM rue_shop1: so, how did you brick it, were you playing with fuses randomly???
11:16 PM rue_shop1: do you have a 10k pullup resistor on the reset line?
11:17 PM weilawei: nah, no fuses. I've used engbedded for that. I was trying to diagnose a problem with some USART code and there was a ground loop there. The cp2101 usb-uart dongle was actually powering the chip right through the TXD/RXD pins. @_@
11:17 PM weilawei: Like I said, not entirely sure. There's a pretty fair chance it's just fried now.
11:18 PM weilawei: Reset was only ever hooked to the programmer, a usbasp
11:18 PM weilawei: No extra pullup added by me
11:19 PM rue_mohr: you have to have a pullup on the reset line
11:19 PM rue_mohr: thats likley your issue, floating reset
11:20 PM rue_mohr: not 1k, 10k
11:20 PM weilawei: To reprogram them?
11:20 PM weilawei: Doesn't it have an internal pullup?
11:21 PM rue_mohr: nope
11:21 PM rue_mohr: try it
11:22 PM rue_mohr: if your ground lifted you MAY have fried the chip, thats not bricking, thats frying
11:23 PM weilawei: rue_mohr, can't be sure yet, because they still run code. just not well.
11:23 PM weilawei: One sec, gotta pop a fried/bricked one in
11:33 PM rue_mohr: if they dont have a pullupon the reset line, they will randomly halt
11:34 PM weilawei: rue_mohr, Well, that did the trick for that chip! I was able to reset the fuses and reprogram it
11:34 PM weilawei: One saved! guess it wasn't fried.
11:34 PM rue_mohr: yay
11:34 PM weilawei: Thank you! Man, I can't believe I never put a pullup there. I've played with them for years
11:35 PM weilawei: And it's not even mentioned in the datasheet at the beginning under pin configuration