<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Atmel ATmega not programming over DAPA</title>
	<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA/</link>
	<description>Comments on Ask MetaFilter post Atmel ATmega not programming over DAPA</description>
	<pubDate>Sun, 25 Feb 2007 14:57:00 -0800</pubDate>
	<lastBuildDate>Sun, 25 Feb 2007 14:57:00 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Atmel ATmega not programming over DAPA</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA</link>	
		<description>AVR Programming Hell:

I&apos;ve built my own Atmel programmer for my ATmega32 and it doesn&apos;t work a lick.  &lt;br /&gt;&lt;br /&gt; I built the following circuit to the letter and tested it over and over:&lt;br&gt;
http://www.captain.at/electronics/atmel-programmer/&lt;br&gt;
&lt;br&gt;
But nothing happens when I try to program it using UISP (in Debian Linux). I have modprobed my LPT port but it always fails after 32 tries to program the chip. &lt;br&gt;
&lt;br&gt;
Does anyone know if this is a good schematic for DAPA programming for the Atmel?&lt;br&gt;
&lt;br&gt;
I&apos;m trying to verify that my LPT port works but am not sure how to via Linux.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.57649</guid>
		<pubDate>Sun, 25 Feb 2007 13:26:32 -0800</pubDate>
		<dc:creator>Napierzaza</dc:creator>
		
			<category>linux</category>
		
			<category>debian</category>
		
			<category>atmel</category>
		
			<category>programmer</category>
		
			<category>microcontroller</category>
		
			<category>atmega32</category>
		
	</item> <item>
		<title>By: flabdablet</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA#866697</link>	
		<description>What results do you get from the set.c and reset.c code that the page you linked to links to?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.57649-866697</guid>
		<pubDate>Sun, 25 Feb 2007 14:57:00 -0800</pubDate>
		<dc:creator>flabdablet</dc:creator>
	</item><item>
		<title>By: nickerbocker</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA#866721</link>	
		<description>The forums on &lt;a href=&quot;http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.avrfreaks.net%2F&amp;ei=LxviRZLnLZaYhQPbhajdBw&amp;usg=__8CGw-x7SPj-Zw_QCW1sIZlBIr2U=&amp;sig2=EpPqXFOf_iKHLjDAsfTxhA&quot;&gt;AVRFreaks.net&lt;/a&gt;  will likely be more useful then this forum.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.57649-866721</guid>
		<pubDate>Sun, 25 Feb 2007 15:27:25 -0800</pubDate>
		<dc:creator>nickerbocker</dc:creator>
	</item><item>
		<title>By: Napierzaza</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA#866797</link>	
		<description>I can&apos;t get it to compile because of it not finding stdio.h, though I have gcc installed.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.57649-866797</guid>
		<pubDate>Sun, 25 Feb 2007 17:21:23 -0800</pubDate>
		<dc:creator>Napierzaza</dc:creator>
	</item><item>
		<title>By: polyglot</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA#866950</link>	
		<description>if it can&apos;t see stdio.h, something is very wrong with your gcc.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.57649-866950</guid>
		<pubDate>Sun, 25 Feb 2007 21:19:21 -0800</pubDate>
		<dc:creator>polyglot</dc:creator>
	</item><item>
		<title>By: JackFlash</title>
		<link>http://ask.metafilter.com/57649/Atmel-ATmega-not-programming-over-DAPA#866996</link>	
		<description>You can buy a programmer from Atmel for about $30 and the complete software IDE with editor, C compiler, linker and programmer is free for download.  Requires Windows however.  For that little bit of money I wouldn&apos;t bother messing with gcc and home grown hardware especially if you don&apos;t have the tools or skills for debugging it.&lt;br&gt;
&lt;br&gt;
But if you insist, you must first get set.c and reset.c working and verify that the port pins toggle.  If not, there is something wrong with your port device driver.  &lt;br&gt;
&lt;br&gt;
Make sure that you have power and ground attached to the AVR chip and the parallel port and verify with a voltmeter.&lt;br&gt;
&lt;br&gt;
Beyond that there are any number of problems that could arise.  For example the AVR defaults to using the internal oscillator at 1 MHz.  The SPI clock must be less than 1/4 of the AVR frequency.  That means SPI clock must toggle at no more than 250 KHz.  I don&apos;t know if the programming software has any kind of timing built into it to make sure you don&apos;t exceed this frequency.&lt;br&gt;
&lt;br&gt;
Reset must be asserted to the chip before programming and you must wait about 100 ms for the internal reset delay to time out before attempting programming.  Both reset and SCK must be low before starting programming.&lt;br&gt;
&lt;br&gt;
The first command sent to the device must be program enable command 0xAC530000.  The device must echo back the byte 0x53.  If not, then you have done something wrong and there is no point in looking farther.  You should be able to step through the programmer application code to see if this is correct.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.57649-866996</guid>
		<pubDate>Sun, 25 Feb 2007 23:35:31 -0800</pubDate>
		<dc:creator>JackFlash</dc:creator>
	</item>
	</channel>
</rss>
