<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/8300" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-02-23T20:43:25+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/8300</id>

		<entry>
		<author><name><![CDATA[barney]]></name></author>
		<updated>2013-02-23T20:41:23+02:00</updated>

		<published>2013-02-23T20:41:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24800#p24800</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24800#p24800"/>
		<title type="html"><![CDATA[Re: &quot;Burning up&quot; attiny85 chips]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24800#p24800"><![CDATA[
Thanks for the reply but I am not using a crystal in the circuit.  After burning up a few more chips I figured out that I needed to changed the fuse setting.  <br /><br />The notes in the Makefile say this (see below), but for the ATTiny85 apparently you need to make the low fuse 0xe1  <span style="color: #FF0040">NOT 0xef</span> as the excerpt shown below says to make it.  I do now see that even thought the header says ATTiny25/45/85, inside the note it says ATMega*5 FUSE_L.  I guess that this should be brought to the attention of the author so he can fix it in the next release.<br /><br />############################## ATTiny25/45/85 ###############################<br /># ATMega*5 FUSE_L (Fuse low byte):<br /># 0xef = 1 1 1 0   1 1 1 1<br />#        ^ ^ \+/   \--+--/<br />#        | |  |       +------- CKSEL 3..0 (clock selection -&gt; crystal @ 12 MHz)<br />#        | |  +--------------- SUT 1..0 (BOD enabled, fast rising power)<br />#        | +------------------ CKOUT (clock output on CKOUT pin -&gt; disabled)<br />#        +-------------------- CKDIV8 (divide clock by 8 -&gt; don't divide)<br /># ATMega*5 FUSE_H (Fuse high byte):<br /># 0xdd = 1 1 0 1   1 1 0 1<br />#        ^ ^ ^ ^   ^ \-+-/ <br />#        | | | |   |   +------ BODLEVEL 2..0 (brownout trigger level -&gt; 2.7V)<br />#        | | | |   +---------- EESAVE (preserve EEPROM on Chip Erase -&gt; not preserved)<br />#        | | | +-------------- WDTON (watchdog timer always on -&gt; disable)<br />#        | | +---------------- SPIEN (enable serial programming -&gt; enabled)<br />#        | +------------------ DWEN (debug wire enable)<br />#        +-------------------- RSTDISBL (disable external reset -&gt; enabled)<br />#<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19551">barney</a> — Sat Feb 23, 2013 8:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[amx]]></name></author>
		<updated>2013-02-22T14:38:45+02:00</updated>

		<published>2013-02-22T14:38:45+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24793#p24793</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24793#p24793"/>
		<title type="html"><![CDATA[Re: &quot;Burning up&quot; attiny85 chips]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24793#p24793"><![CDATA[
Hi, I never used an attiny but other avrs and my guess would be that you dont connect a crystal while programming the chip. It works the first time because the avr ships with fuses set such that he internal rc oscillator is used. If you change the fuses (again, I havent looked up the attiny fuse bits) to ext. 16.5MHz oscillator you must connect such an oscillator even when programming the chip. Seems like the programmer breaks out all pins so you can still add an external crystal circuit to it.<br /><br />Good luck!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19423">amx</a> — Fri Feb 22, 2013 2:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[barney]]></name></author>
		<updated>2013-02-23T20:43:25+02:00 </updated>

		<published>2013-02-21T04:22:20+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24786#p24786</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24786#p24786"/>
		<title type="html"><![CDATA[&quot;Burning up&quot; attiny85 chips [SOLVED BUT...]]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8300&amp;p=24786#p24786"><![CDATA[
I am using the latest 2012-12 stock hid-data example.  Since I am using a attiny85 chip I changed these settings in the usbconfig.h file:<br /><br />#define USB_CFG_IOPORTNAME      B // was D<br />#define USB_CFG_DMINUS_BIT      1 // was 4<br />#define USB_CFG_DPLUS_BIT       2  <br /><br />In the Makefile I changed these lines:<br />DEVICE  = attiny85<br />F_CPU   = 16500000# in Hz <br />FUSE_L  = 0xef  <span style="color: #FF0000">// should be 0xe1 but documented Makefile says 0xef</span><br />FUSE_H  = 0xdd<br /><br />AVRDUDE = avrdude -c usbtiny -p $(DEVICE) # edit this line for your programmer<br /><br />I am using a usbtiny purchased from SparkFun <a href="https://www.sparkfun.com/products/11460?" class="postlink">https://www.sparkfun.com/products/11460?</a>, the kind where you just plug in the chip. <br /><br />If you look at the Terminal output below you see all works fine but when I try to re-program the chip I get the error below and I believe the chip is dead as I can't seem to do anything with it after that.  I'm down 5 chips at this point and don't know what my next step would be.  Note this happens even if I don't put the chip in the circuit.  It never leaves the programmer.<br /><br />Please HELP!!<br /><br />avrdude: initialization failed, rc=-1<br />         Double check connections and try again, or use -F to override<br />         this check.<br /> <br /><br /><br /><div class="codebox"><p>Code: </p><pre><code>Georges-MacBook-Pro:firmware gbarnabic$ make clean<br />rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.elf *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s<br />Georges-MacBook-Pro:firmware gbarnabic$ make hex<br />avr-gcc -Wall -Os -DF_CPU=16500000    -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny85 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o<br />avr-gcc -Wall -Os -DF_CPU=16500000    -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny85 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o<br />avr-gcc -Wall -Os -DF_CPU=16500000    -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny85 -c usbdrv/oddebug.c -o usbdrv/oddebug.o<br />avr-gcc -Wall -Os -DF_CPU=16500000    -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny85 -c main.c -o main.o<br />avr-gcc -Wall -Os -DF_CPU=16500000    -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny85 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o<br />rm -f main.hex main.eep.hex<br />avr-objcopy -j .text -j .data -O ihex main.elf main.hex<br />avr-size main.hex<br />   text      data       bss       dec       hex   filename<br />      0      1958         0      1958       7a6   main.hex<br />Georges-MacBook-Pro:firmware gbarnabic$ make program<br />avrdude -c usbtiny -p attiny85  -U flash:w:main.hex:i<br /><br />avrdude: AVR device initialized and ready to accept instructions<br /><br />Reading | ################################################## | 100% 0.00s<br /><br />avrdude: Device signature = 0x1e930b<br />avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed<br />         To disable this feature, specify the -D option.<br />avrdude: erasing chip<br />avrdude: reading input file &quot;main.hex&quot;<br />avrdude: writing flash (1958 bytes):<br /><br />Writing | ################################################## | 100% 2.73s<br /><br /><br /><br />avrdude: 1958 bytes of flash written<br />avrdude: verifying flash memory against main.hex:<br />avrdude: load data flash data from input file main.hex:<br />avrdude: input file main.hex contains 1958 bytes<br />avrdude: reading on-chip flash data:<br /><br />Reading | ################################################## | 100% 2.85s<br /><br /><br /><br />avrdude: verifying ...<br />avrdude: 1958 bytes of flash verified<br /><br />avrdude: safemode: Fuses OK<br /><br />avrdude done.  Thank you.<br /><br />avrdude -c usbtiny -p attiny85  -U hfuse:w:0xdd:m -U lfuse:w:0xef:m<br /><br />avrdude: AVR device initialized and ready to accept instructions<br /><br />Reading | ################################################## | 100% 0.00s<br /><br />avrdude: Device signature = 0x1e930b<br />avrdude: reading input file &quot;0xdd&quot;<br />avrdude: writing hfuse (1 bytes):<br /><br />Writing | ################################################## | 100% 0.01s<br /><br />avrdude: 1 bytes of hfuse written<br />avrdude: verifying hfuse memory against 0xdd:<br />avrdude: load data hfuse data from input file 0xdd:<br />avrdude: input file 0xdd contains 1 bytes<br />avrdude: reading on-chip hfuse data:<br /><br />Reading | ################################################## | 100% 0.00s<br /><br />avrdude: verifying ...<br />avrdude: 1 bytes of hfuse verified<br />avrdude: reading input file &quot;0xef&quot;<br />avrdude: writing lfuse (1 bytes):<br /><br />Writing | ################################################## | 100% 0.01s<br /><br />avrdude: 1 bytes of lfuse written<br />avrdude: verifying lfuse memory against 0xef:<br />avrdude: load data lfuse data from input file 0xef:<br />avrdude: input file 0xef contains 1 bytes<br />avrdude: reading on-chip lfuse data:<br /><br />Reading | ################################################## | 100% 0.00s<br /><br />avrdude: verifying ...<br />avrdude: 1 bytes of lfuse verified<br /><br />avrdude: safemode: Fuses OK<br /><br />avrdude done.  Thank you.<br /><br />Georges-MacBook-Pro:firmware gbarnabic$ make program<br />avrdude -c usbtiny -p attiny85  -U flash:w:main.hex:i<br /><br />avrdude: initialization failed, rc=-1<br />         Double check connections and try again, or use -F to override<br />         this check.<br /><br /><br />avrdude done.  Thank you.<br /><br />make: *** &#91;flash&#93; Error 1<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19551">barney</a> — Thu Feb 21, 2013 4:22 am</p><hr />
]]></content>
	</entry>
	</feed>
