Author Topic: attiny burn mistake  (Read 9407 times)

0 Members and 1 Guest are viewing this topic.

Offline Halford

  • Contributor
  • Posts: 29
attiny burn mistake
« on: June 21, 2014, 08:52:47 pm »
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 appreciated

Hal.
 

Offline 128er

  • Regular Contributor
  • *
  • Posts: 229
  • Country: de
Re: attiny burn mistake
« Reply #1 on: June 21, 2014, 09:45:15 pm »
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.jpg

The right one is what you are looking  for.

« Last Edit: June 21, 2014, 09:47:15 pm by 128er »
 

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #2 on: June 21, 2014, 09:56:56 pm »
thanks a million, I'll get on it
 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: us
Re: attiny burn mistake
« Reply #3 on: June 21, 2014, 11:23:10 pm »
If you have any other clock source, you can use that too. This includes using another micro controller toggling it's pin.
Software by day, hardware by night; blueAcro.com
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9618
  • Country: us
Re: attiny burn mistake
« Reply #4 on: June 21, 2014, 11:25:55 pm »
There's no way to reset the fuses?
I'm not an EE--what am I doing here?
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: attiny burn mistake
« Reply #5 on: June 21, 2014, 11:37:05 pm »
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.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9618
  • Country: us
Re: attiny burn mistake
« Reply #6 on: June 21, 2014, 11:46:34 pm »
But you could use a direct programmer (if you have one), instead of ISP?
I'm not an EE--what am I doing here?
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: attiny burn mistake
« Reply #7 on: June 21, 2014, 11:54:59 pm »
But you could use a direct programmer (if you have one), instead of ISP?

attiny85 got no parallel programming interface, so only ISP. (btw.. it's a DIP8 package ;) )
 

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #8 on: June 22, 2014, 11:50:27 am »
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.

I have a couple of ceramic resonators here, a 8Mhz and a 20Mhz, they should do?
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6616
Re: attiny burn mistake
« Reply #9 on: June 22, 2014, 11:58:53 am »
But you could use a direct programmer (if you have one), instead of ISP?

attiny85 got no parallel programming interface, so only ISP. (btw.. it's a DIP8 package ;) )
They do have a HVSP interface, which works completely independently of the CPU and so it doesn't need to be clocked.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: attiny burn mistake
« Reply #10 on: June 22, 2014, 12:46:58 pm »
But you could use a direct programmer (if you have one), instead of ISP?

attiny85 got no parallel programming interface, so only ISP. (btw.. it's a DIP8 package ;) )
They do have a HVSP interface, which works completely independently of the CPU and so it doesn't need to be clocked.

wasn't aware of the HVSP interface of attiny  :palm: thanks 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.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 13397
  • Country: gb
  • 0999
Re: attiny burn mistake
« Reply #11 on: June 22, 2014, 04:07:52 pm »
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.
Does it even need to be a crystal oscillator?

 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: us
Re: attiny burn mistake
« Reply #12 on: June 22, 2014, 04:18:46 pm »

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.

I have a couple of ceramic resonators here, a 8Mhz and a 20Mhz, they should do?

Yup. 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).
Software by day, hardware by night; blueAcro.com
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: attiny burn mistake
« Reply #13 on: June 22, 2014, 04:39:40 pm »
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.
Does it even need to be a crystal oscillator?

RC 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 ;) )
 

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #14 on: June 28, 2014, 10:54:33 pm »
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....
 

Offline XOIIO

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: ca
Re: attiny burn mistake
« Reply #15 on: June 28, 2014, 10:57:22 pm »

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.

I have a couple of ceramic resonators here, a 8Mhz and a 20Mhz, they should do?

Yup. 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).

Yeah, just do it by hand XD

These 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.

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: attiny burn mistake
« Reply #16 on: June 28, 2014, 10:58:54 pm »
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....

most 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.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6004
  • Country: us
Re: attiny burn mistake
« Reply #17 on: June 28, 2014, 11:00:34 pm »
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....

For the ICSP to work, the oscillator frequency needs to be at least 4x of the ICSP bit rate.
Drain the swamp.
 

Offline Delillusions

  • Contributor
  • Posts: 22
  • Country: 00
Re: attiny burn mistake
« Reply #18 on: June 29, 2014, 04:00:31 pm »
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.
 

Offline nsayer

  • Regular Contributor
  • *
  • Posts: 133
  • Country: us
    • Geppetto Elecronics
Re: attiny burn mistake
« Reply #19 on: June 29, 2014, 05:15:10 pm »
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.
Buy my stuff!! It's not at all terrible!! http://tindie.geppettoelectronics.com/
 

Offline XOIIO

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: ca
Re: attiny burn mistake
« Reply #20 on: June 29, 2014, 05:29:51 pm »
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.


I'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.

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #21 on: June 30, 2014, 06:53:02 am »
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.
 

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #22 on: July 23, 2014, 07:36:46 pm »
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 references

Hal.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6616
Re: attiny burn mistake
« Reply #23 on: July 23, 2014, 08:01:13 pm »
now, how does the reset pin work on the attiny? I keep finding different information about it.
The correct information will almost certainly be in the datasheet. See section 1.1.4. 20.6-20.7, and 21.1.
 

Offline Halford

  • Contributor
  • Posts: 29
Re: attiny burn mistake
« Reply #24 on: July 23, 2014, 08:29:51 pm »
now, how does the reset pin work on the attiny? I keep finding different information about it.
The correct information will almost certainly be in the datasheet. See section 1.1.4. 20.6-20.7, and 21.1.
thanks.... that was so obvious, getting tired today ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf