attiny burn mistake - Page 1
Forum section: electronics / beginners

author: Halford
author_rank: Contributor
timestamp: June 21, 2014, 08:52:47 pm
content: Hi everyone,I think this should be in an other section, but as a total beginner I ask it in here.few days ago I was trying to program an attiny85 with an arduino, I achieved my goal on my third attempt. the first two I made a mistake that made the attiny unusable, I set an external 20Mhz clock. Could anybody explain me how can I get them back? I found few information about it, one was that I should link a real external resonator or crystal and another one was talking of a version of arduinoISP that would send a decent clock signal out of pin 9.I'm completely new to this, until now I just made basic led lamps or easy gadgets, I'm a bit lost with these terms.any help or explanation would be much appreciatedHal.

author: 128er
author_rank: Regular Contributor
timestamp: June 21, 2014, 09:45:15 pm
content: Hi,if you realy set the fuses for an external clock, then you can use a quartz crystal oscillator. It's a four pin device in a metal can. Needs a supply voltage and has a output pin for the clock signal. This signal can you connect to pin 2 (CLKI) of your Tiny85. Then you should be able to reconfigure the fuses over the ISP interface (for external resonators or the internal RC oscillator).Compare at wikipedia:http://en.wikipedia.org/wiki/Crystal_oscillator#mediaviewer/File:18MHZ_12MHZ_Crystal_110.jpgThe right one is what you are looking for.

author: Halford
author_rank: Contributor
timestamp: June 21, 2014, 09:56:56 pm
content: thanks a million, I'll get on it

author: theatrus
author_rank: Frequent Contributor
timestamp: June 21, 2014, 11:23:10 pm
content: If you have any other clock source, you can use that too. This includes using another micro controller toggling it's pin.

author: IanB
author_rank: Super Contributor
timestamp: June 21, 2014, 11:25:55 pm
content: There's no way to reset the fuses?

author: rob77
author_rank: Super Contributor
timestamp: June 21, 2014, 11:37:05 pm
content: if it's fused for external clock , the you need the external clock to make it running and accept further ISP commands...and actually you don't have to buy a dedicated quartz crystal oscillator part... if you have any crystal handy (within the allowed frequency for the attiny) + a 7404 or 7414, then just hook up a oscillator on a breadboard and use it's output as clock for the fused attiny.

author: IanB
author_rank: Super Contributor
timestamp: June 21, 2014, 11:46:34 pm
content: But you could use a direct programmer (if you have one), instead of ISP?

author: rob77
author_rank: Super Contributor
timestamp: June 21, 2014, 11:54:59 pm
content: Quote from: IanB on June 21, 2014, 11:46:34 pmattiny85 got no parallel programming interface, so only ISP. (btw.. it's a DIP8 package)

author: Halford
author_rank: Contributor
timestamp: June 22, 2014, 11:50:27 am
content: Quote from: rob77 on June 21, 2014, 11:37:05 pmI have a couple of ceramic resonators here, a 8Mhz and a 20Mhz, they should do?

author: amyk
author_rank: Super Contributor
timestamp: June 22, 2014, 11:58:53 am
content: Quote from: rob77 on June 21, 2014, 11:54:59 pmThey do have a HVSP interface, which works completely independently of the CPU and so it doesn't need to be clocked.

author: rob77
author_rank: Super Contributor
timestamp: June 22, 2014, 12:46:58 pm
content: Quote from: amyk on June 22, 2014, 11:58:53 amwasn't aware of the HVSP interface of attinythanks for highlighting it !but anyways if only the clock is fused to external (and isp or reset was not fused out) - then the fastest way is to quickly hook up a clock source and use the ISP.

author: Zero999
author_rank: Super Contributor
timestamp: June 22, 2014, 04:07:52 pm
content: Quote from: rob77 on June 21, 2014, 11:37:05 pmDoes it even need to be a crystal oscillator?

author: theatrus
author_rank: Frequent Contributor
timestamp: June 22, 2014, 04:18:46 pm
content: Quote from: Halford on June 22, 2014, 11:50:27 amYup. All you need to do is wiggle the XIN pin. Any speed up to 20MHz (there is a minimum to work with ISP, but it's low).

author: rob77
author_rank: Super Contributor
timestamp: June 22, 2014, 04:39:40 pm
content: Quote from: Hero999 on June 22, 2014, 04:07:52 pmRC oscillitors might work, but you might experience a lot of communication failures. especially with a few MHz RC oscillator on a breadboard (just hook it up on a breadboard and connect a scope - and you'll see what i'm talking about)

author: Halford
author_rank: Contributor
timestamp: June 28, 2014, 10:54:33 pm
content: Ok guys, I hooked up a resonator 20Mhz to my attiny85 on the Arduino shield. I was able, and very happy about it, tu burn back on internal clock 3 of them. The remaining 2 don't want to know anything about it, I keep getting a signature failure message... Are they dead, they are talking back to the Arduino....

author: XOIIO
author_rank: Super Contributor
timestamp: June 28, 2014, 10:57:22 pm
content: Quote from: theatrus on June 22, 2014, 04:18:46 pmYeah, just do it by hand XDThese micros are cheap enough (buck 25 each or so?) that it's no huge loss, btw I find 8mhz fine for a lot of stuff with them.

author: rob77
author_rank: Super Contributor
timestamp: June 28, 2014, 10:58:54 pm
content: Quote from: Halford on June 28, 2014, 10:54:33 pmmost probably you fused the ISP interface as well (disabled it).google for attiny HVSP - as others mentioned those got a high voltage programming interface as well - that's the only way how to re-enable ISP programming.

author: zapta
author_rank: Super Contributor
timestamp: June 28, 2014, 11:00:34 pm
content: Quote from: Halford on June 28, 2014, 10:54:33 pmFor the ICSP to work, the oscillator frequency needs to be at least 4x of the ICSP bit rate.

author: Delillusions
author_rank: Contributor
timestamp: June 29, 2014, 04:00:31 pm
content: I suggest to you for times like this build yourself a Fusebit Doctor. With it you can reset the AVR back to it's factory state. I've made one for myself, but I never needed it, but I tested and it works. Plus I loaned it a few times when some friends messed up the fuses and they didn't remembered what did they set.Just Google it. I believe you won't regret having one.And yes, the ISP frequency has to be 1/4-th of the MCU clock frequency at max. It can be lower frequency, but not higher, than 1/4th. If you don't know the clock frequency, then set the ISP to the slowest. It will take a while, but it could work.

author: nsayer
author_rank: Regular Contributor
timestamp: June 29, 2014, 05:15:10 pm
content: I second what the guy above me said, but with one caveat.The fuse bits for each AVR chip are very different from each other, and it's easy to brick them. If you make a mistake, you can eliminate your ability to ISP program them. You can always use "high voltage" programming to get them back. What that really means is applying 12 volts instead of 5 to the RESET pin.Or you could just throw it away. They're, what?, a dollar-fifty or so each maybe?This may, in particular, be my particular orientation because I use SMD chips, and in general you wouldn't be able to engage the HV programming mode with the device in-circuit. Replacing it with a new one is very much the path of least resistance, and then to recover the removed one, you'd need a ZIF SMD socket for your HV programmer, and the whole exercise for me becomes just... meh.

author: XOIIO
author_rank: Super Contributor
timestamp: June 29, 2014, 05:29:51 pm
content: Quote from: nsayer on June 29, 2014, 05:15:10 pmI'd even toss em and I use DIP ones, though the fusebit doctor looks interesting, though I wouldn't use it for a long time too no doubt.

author: Halford
author_rank: Contributor
timestamp: June 30, 2014, 06:53:02 am
content: It's true that they are cheap, but I don't like to waste when I know there is a way to repair it. And even if they are cheap, after a while it still money and I'm on a budget as this is a hobby. I'll have to do a fusedoctor for myself, very interesting gadget! I found as well a reset circuit driven by a 2313 that can reset all 8pin attiny.

author: Halford
author_rank: Contributor
timestamp: July 23, 2014, 07:36:46 pm
content: thanks for all the help, I have a new question about the attinys.I build myself a small shield to plug on my arduino to program the attiny, and with a slot for a resonator in case I need an external clock (as did to reset it).now, how does the reset pin work on the attiny? I keep finding different information about it.the only one that is consistent on all forums is about the hvp 12v reset for factory reset. ( wouldn't 12v kill the arduino gnd?)thanks for any hint/explanations/links referencesHal.

author: amyk
author_rank: Super Contributor
timestamp: July 23, 2014, 08:01:13 pm
content: Quote from: Halford on July 23, 2014, 07:36:46 pmThe correct information will almost certainly be inthe datasheet. See section 1.1.4. 20.6-20.7, and 21.1.

author: Halford
author_rank: Contributor
timestamp: July 23, 2014, 08:29:51 pm
content: Quote from: amyk on July 23, 2014, 08:01:13 pmthanks.... that was so obvious, getting tired today