Attiny on 32KHz clock did I brick it with CLK/8 fuse ? - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: April 20, 2014, 04:57:59 pm
content: Well most of it is in the title. I wrote a program for an ATTiny25 AVR running off a 32.768 KHz clock crystal. I set the clock / 8 fuse and then I could no longer "talk" to it. I am guessing this was because the SPI clk needs to be system clk/4 and the lowest is just over 2 KHz but my system clock became 4 KHz

author: zapta
author_rank: Super Contributor
timestamp: April 20, 2014, 05:00:33 pm
content: Can you connect a faster crystal to unbrick it?Edit: or a signal generator, connected to the oscillator's input, with a series resistor.

author: Simon
author_rank: Unknown
timestamp: April 20, 2014, 05:02:25 pm
content: Well assuming that is what I have done I probably could, there are specific register settings for low speed crystals but i suppose that would include anything up to 128 KHz

author: senso
author_rank: Frequent Contributor
timestamp: April 20, 2014, 05:03:08 pm
content: using a usbAsp or similar I think you can run the programming clock lower than 2khz.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2014, 05:17:45 pm
content: avrdude has the -B option that will let you set the bit clock period to any arbitrary value, in microseconds. I don't know if that option will work with your particular programmer, however.

author: Simon
author_rank: Unknown
timestamp: April 20, 2014, 05:31:34 pm
content: I'm using the AVRISP2 programmer. I'm not hugely fussed just wanted to confirm that was my mistake.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2014, 05:34:16 pm
content: You might also try Atmel'satprogramfrom the command line. It has a-cloption that should let you use an arbitrary programming frequency.

author: Simon
author_rank: Unknown
timestamp: April 20, 2014, 05:45:10 pm
content: is this something I already have with AS6 ?

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2014, 06:01:00 pm
content: Quote from: Simon on April 20, 2014, 05:45:10 pmI think it is new with version 6.1. It's installed at:C:\Program Files (x86)\Atmel\Atmel Studio 6.0\avrdbgon my system.

author: Simon
author_rank: Unknown
timestamp: April 20, 2014, 06:02:37 pm
content: so what do I do with it ? does the command line prompt me along ?

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2014, 06:18:41 pm
content: I haven't used it myself but it looks like you might try something like the following, just to see if it can read the fuses:atprogram -t avrispmk2 -d attiny25 -cl 1000 read -fs -s 2Hopefully, that will get you both the high and low fuse values. I'm not sure what order they will be in. If that works then you will have to figure out what the fuse values need to be and then use thewritecommand to update them.You might be able to find a GUI front-end for the utility. Too bad Atmel Studio only lets you go to a minimum of 2kHz.

author: paulie
author_rank: Frequent Contributor
timestamp: April 20, 2014, 09:46:47 pm
content: before i learned that high clock speed with sleep actually draws less power than slow speed i accumulated a big box of bricked t85. i never found a way to revive them, even with 100hz programming settings, so would love to hear of an actual method that works. a tested procedure, not something somebody thinks or feels "might" work.

author: dannyf
author_rank: Super Contributor
timestamp: April 21, 2014, 01:26:18 am
content: Quotegoogle high voltage serial programming. Or look at the datasheet.I wrote a piece of code on PIC16F684 / 1936 to do that.

author: amyk
author_rank: Super Contributor
timestamp: April 21, 2014, 11:58:46 am
content: Don't forget to reset the fuse settings to defaults after doing a chip erase - and the default fuse settings arenotall FF on the '85. In particular, the SPI programming enable bit needs to be 0 (enabled).

author: Psi
author_rank: Super Contributor
timestamp: April 21, 2014, 12:06:00 pm
content: You might be able to talk to it using AVRdude with a direct Printer Port connection.You can slow down avrdude printer port coms with -i <number>Something like...avrdude -i 100 -c bsd -p t25 -E noreset -P lpt1 -e -U hfuse:w:0xXX:mavrdude -i 100 -c bsd -p t25 -E noreset -P lpt1 -e -U lfuse:w:0xXX:mavrdude -i 100 -c bsd -p t25 -E noreset -P lpt1 -e -U efuse:w:0xXX:mWhere XX is the fuse byte hex value to writeIf using linux change -P lpt1 to -P /dev/parport0(I dont think any 64bit windows will work because it doesnt provide avrdude with hardware access to the printer port, 32bit XP and older should work fine and that is likely what will be on any PC old enough to have a printer port.)The DB25 connections for BSD printer port programmer arereset = 7sck = 8mosi = 9miso = 10You have to supply your own 5V/GND source which is ground common with the PC

author: paulie
author_rank: Frequent Contributor
timestamp: April 21, 2014, 12:15:17 pm
content: Quote from: dannyf on April 21, 2014, 01:26:18 amlpt wires are my #1 method of isp but nowhere near as powerful as 12v programmers. even my dragon and stk failed here.in my case clkpr was changed in CODE (temporary) so it wasnt a fuse issue. the chips died a mysterious death. sorta like killing them by overclocking with osccal as ive done a few times. it would be nice to hear from somebody who had the same problem and succeeded in bringing them back.

author: amyk
author_rank: Super Contributor
timestamp: April 21, 2014, 12:55:48 pm
content: Quote from: paulie on April 21, 2014, 12:15:17 pmYou can do HVSP with a direct parallel port connection, you just need to put +12V on the reset pin (the PC's own PSU can supply 12V, preferably through a current-limiting resistor - it needs <1mA) and drive the pins using slightly different commands.Quote from: paulie on April 21, 2014, 12:15:17 pmIf it's actually physically damaged hardware then no programmer will be able to fix that.

author: paulie
author_rank: Frequent Contributor
timestamp: April 21, 2014, 01:01:40 pm
content: yes, thats what i meant by "easier than 12v parallel". and true that if chips are really dead nothing will help. but are they? the real question is what killed them. i understand overclocking doing damage because of violation of minumum flash time but too slow dont make a lot of sense to me.

author: amyk
author_rank: Super Contributor
timestamp: April 22, 2014, 08:59:13 pm
content: It could be ESD, if you weren't careful.If you really want to try reviving them and have no software then follow datasheet and hook it up for HVSP with pushbuttons and LEDs on the clock/data lines, input basic commands like "read signature byte" manually and see if it responds.

author: paulie
author_rank: Frequent Contributor
timestamp: April 23, 2014, 12:17:36 am
content: esd is an urban myth. and as mentioned isp, hvsp, and hvpp do not work. for me its not so much restoring as figuring out why they failed in the first place. i suspect it has something to do with the fact that reset does not change clock during flashing even though it was done in code and not via fuses.

author: dannyf
author_rank: Super Contributor
timestamp: April 23, 2014, 12:34:28 am
content: QuoteI have been handling MOS devices since the 1980s and have had countless (thousands?) such devices through my bare hands. I have yet to see one of them get damaged from ESD.

author: Unknown
author_rank: Unknown
timestamp: April 23, 2014, 12:54:10 am
content: Quote from: dannyf on April 23, 2014, 12:34:28 amMaybe not straight away. If you do a real failure analysis over time, you'll see it's real enough.In one case we tracked a series of short-life failures (i.e. failures within 6 months) down to one guy not following proper (or, indeed, any!) anti-static procedures when replacing cards. Stood out like dog's proverbials when you analysed the data...

author: notsob
author_rank: Frequent Contributor
timestamp: April 23, 2014, 12:57:32 am
content: I worked for a manufacturer of niche communication products that were supplied with extended warranties. After they put a total ESD system in place, mats floor coverings ankle grounding straps etc etc, they found that fault returns of equipment in the first 12 months dropped by approx 40%. You may not have noticed it but a small zap can and does lead to component failure not necessarily instantly but definitely in time.

author: paulie
author_rank: Frequent Contributor
timestamp: April 23, 2014, 11:23:14 pm
content: without specifying actual device and process its hard to make any sense of these anecdotes, pro or con. so what i should have said was "regarding common modern digital ics". logic and mcu devices virtually w/o exception have both parasitic and designed in clamping diodes which will sustain enormous abuse. im particularly fond of a demo carried on some years back involving atmel chips, van degraff generator (BIG one), and 8" sparks.that said i do have some general instrument p-mos devices circa 1978 that have been shown on curve tracer to be void of protection zeners. needless to say i do not even think of removing any of these valuable antiques from their conductive foam.