<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for brownsofa.org</title>
	<atom:link href="http://brownsofa.org/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://brownsofa.org/blog</link>
	<description>treading a well-worn path to somewhere different</description>
	<lastBuildDate>Sat, 21 Apr 2012 11:40:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on The Compleat ATtiny13 LED Flasher: Part 3 &#8211; Low Power Mode by Mat S</title>
		<link>http://brownsofa.org/blog/archives/261/comment-page-1#comment-653</link>
		<dc:creator>Mat S</dc:creator>
		<pubDate>Sat, 21 Apr 2012 11:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://brownsofa.org/blog/?p=261#comment-653</guid>
		<description>Great tutorial. I&#039;m coming from an arduino background and wanted to use their serial library to output timings and get accuracy into my timing. Posting here in the hope it gets indexed for others.

You can use the programs in the post here in arduino with an attiny85 but the millis() returns 0. It seems that this is because the arduino sw wants a void setup() and void loop() definitions. The program below works.

/*

  From http://brownsofa.org/blog/archives/261
  Led current on on, ~0mA off.
  Not 1 second. Needs more accuracy for cameratimer.

*/

#include 
#include 
#include 
    SoftwareSerial mySerial(1,3);

ISR(WDT_vect) {
  // Toggle Port B pin 4 output state
  digitalWrite(4,!(digitalRead(4)));
}

void setup(){
  // set serial out on pb3
  mySerial.begin(9600);
  
  // Set up Port B pin 4 mode to output
  pinMode(4, OUTPUT);
  pinMode(3, OUTPUT);  

  // temporarily prescale timer to 1s so we can measure current
  WDTCR &#124;= (1&lt;&lt;WDP1) &#124; (1&lt;&lt;WDP2); // (1&lt;&lt;WDP2) &#124; (1&lt;&lt;WDP0);

  // Enable watchdog timer interrupts
  WDTCR &#124;= (1&lt;&lt;WDIE);

  sei(); // Enable global interrupts 

  // Use the Power Down sleep mode
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);

  mySerial.print(&quot;Starting...&quot;);
}

void loop(){
 
    mySerial.println(millis());
    sleep_mode();   // go to sleep and wait for interrupt...
}</description>
		<content:encoded><![CDATA[<p>Great tutorial. I&#8217;m coming from an arduino background and wanted to use their serial library to output timings and get accuracy into my timing. Posting here in the hope it gets indexed for others.</p>
<p>You can use the programs in the post here in arduino with an attiny85 but the millis() returns 0. It seems that this is because the arduino sw wants a void setup() and void loop() definitions. The program below works.</p>
<p>/*</p>
<p>  From <a href="http://brownsofa.org/blog/archives/261" rel="nofollow">http://brownsofa.org/blog/archives/261</a><br />
  Led current on on, ~0mA off.<br />
  Not 1 second. Needs more accuracy for cameratimer.</p>
<p>*/</p>
<p>#include<br />
#include<br />
#include<br />
    SoftwareSerial mySerial(1,3);</p>
<p>ISR(WDT_vect) {<br />
  // Toggle Port B pin 4 output state<br />
  digitalWrite(4,!(digitalRead(4)));<br />
}</p>
<p>void setup(){<br />
  // set serial out on pb3<br />
  mySerial.begin(9600);</p>
<p>  // Set up Port B pin 4 mode to output<br />
  pinMode(4, OUTPUT);<br />
  pinMode(3, OUTPUT);  </p>
<p>  // temporarily prescale timer to 1s so we can measure current<br />
  WDTCR |= (1&lt;&lt;WDP1) | (1&lt;&lt;WDP2); // (1&lt;&lt;WDP2) | (1&lt;&lt;WDP0);</p>
<p>  // Enable watchdog timer interrupts<br />
  WDTCR |= (1&lt;&lt;WDIE);</p>
<p>  sei(); // Enable global interrupts </p>
<p>  // Use the Power Down sleep mode<br />
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);</p>
<p>  mySerial.print(&quot;Starting&#8230;&quot;);<br />
}</p>
<p>void loop(){</p>
<p>    mySerial.println(millis());<br />
    sleep_mode();   // go to sleep and wait for interrupt&#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Compleat ATtiny13 LED Flasher: Part 2 &#8211; Using Timer Interrupts by J</title>
		<link>http://brownsofa.org/blog/archives/215/comment-page-1#comment-651</link>
		<dc:creator>J</dc:creator>
		<pubDate>Sat, 03 Mar 2012 16:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://brownsofa.org/blog/?p=215#comment-651</guid>
		<description>This was a great tutorial indeed!</description>
		<content:encoded><![CDATA[<p>This was a great tutorial indeed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Compleat ATtiny13 LED Flasher: Part 2 &#8211; Using Timer Interrupts by Fernando</title>
		<link>http://brownsofa.org/blog/archives/215/comment-page-1#comment-650</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Mon, 27 Feb 2012 14:24:12 +0000</pubDate>
		<guid isPermaLink="false">http://brownsofa.org/blog/?p=215#comment-650</guid>
		<description>Very nice guide. I&#039;m doing some experiments with internal counter/overflow interruptions but in assembler (AVR GCC), well, I guess I should check the AVR source code anyway :) Thanks!.</description>
		<content:encoded><![CDATA[<p>Very nice guide. I&#8217;m doing some experiments with internal counter/overflow interruptions but in assembler (AVR GCC), well, I guess I should check the AVR source code anyway <img src='http://brownsofa.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks!.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building NodeJS on OS X 10.5.8 by johlrogge</title>
		<link>http://brownsofa.org/blog/archives/334/comment-page-1#comment-645</link>
		<dc:creator>johlrogge</dc:creator>
		<pubDate>Thu, 12 Jan 2012 20:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://brownsofa.org/blog/?p=334#comment-645</guid>
		<description>Thanks for posting this.

I searched like a maniac to resolve this issue on my Leopard installation. So far I have had reason to use these instructions twice and they put an end to hours of trial and error. Just thought I&#039;d take the time to let you know that this post really helped me and I really appreciate that you took the time to write it.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this.</p>
<p>I searched like a maniac to resolve this issue on my Leopard installation. So far I have had reason to use these instructions twice and they put an end to hours of trial and error. Just thought I&#8217;d take the time to let you know that this post really helped me and I really appreciate that you took the time to write it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Compleat ATtiny13 LED Flasher: Part 2 &#8211; Using Timer Interrupts by Travis</title>
		<link>http://brownsofa.org/blog/archives/215/comment-page-1#comment-641</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Thu, 05 Jan 2012 19:35:26 +0000</pubDate>
		<guid isPermaLink="false">http://brownsofa.org/blog/?p=215#comment-641</guid>
		<description>Wow. What a great tutorial! I&#039;ve done a lot with Arduino but I&#039;m just now getting to the bare metal of the AVRs. Thanks for explaining everything so clearly. I especially appreciate the intermediate steps with pseudocode, because that&#039;s how I tend to rough out my ideas and it really shows the function of every step.

Thanks!</description>
		<content:encoded><![CDATA[<p>Wow. What a great tutorial! I&#8217;ve done a lot with Arduino but I&#8217;m just now getting to the bare metal of the AVRs. Thanks for explaining everything so clearly. I especially appreciate the intermediate steps with pseudocode, because that&#8217;s how I tend to rough out my ideas and it really shows the function of every step.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

