Hi Jason,<br><br>Regarding timing, the version of blink_atom.c below does not contain this, but my later versions used the hardware timers to control the blink rate.<br><br>One can setup the interrupt vector for a hardware timer to call your outermost atom function at whatever resolution you want. As long as the timer allows enough time between expirations for any of the task groups to finish, it will run in hard real time.<br>
<br>Hope this helps.<br><br>John Van Enk<br><br><div class="gmail_quote">On Thu, Dec 31, 2009 at 10:43 PM, Jason Dusek <span dir="ltr">&lt;<a href="mailto:jason.dusek@gmail.com">jason.dusek@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">  I&#39;m working with Atom to program an ATtiny25. I am curious<br>
  about how consistent the timings actually are.<br>
<br>
  Consider John Van Enk&#39; example of blinking a LED on an<br>
  Arduino:<br>
<br>
    <a href="http://code.sw17ch.com/blog/atom/blink_atom.c" target="_blank">http://code.sw17ch.com/blog/atom/blink_atom.c</a><br>
<br>
  We see that sometimes `setLED&#39; is executed and sometimes not.<br>
  When `__clock&#39; is incremented, it will be incremented<br>
  sometimes sooner, sometimes later.<br>
<br>
  Also, I am a little puzzled by the `__coverage` variable. What<br>
  does it do?<br>
<br>
  As for my project/motivation -- I&#39;m just trying to blink a<br>
  little LED on much less robust/rich kit -- the Trippy RGB<br>
  Waves kit from Lady Ada. I am (gratuitously) exploring ways to<br>
  program it with Haskell.<br>
<font color="#888888"><br>
--<br>
Jason Dusek<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</font></blockquote></div><br>