Thanks for your comments. The problem was not due to re-enterance, since the interrupts are disabled in the ISR, (and the pulse-width was longer).<div>I have solved it by using the full 16bit timer and bashing the PWM (which was also using the timer) by moving the output compare value. I'll hopefully bring along the motor controller / explain to anyone interested at the next meeting.</div>
<div>Cheers,</div><div>Synco<br><div><br><div class="gmail_quote">On 23 July 2011 13:09, Volker Kuhlmann <span dir="ltr"><<a href="mailto:list0570@paradise.net.nz">list0570@paradise.net.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat 23 Jul 2011 12:37:42 NZST +1200, Col wrote:<br>
<br>
> Also my tutors taught me it was bad practice to put loops in ISR's.<br>
<br>
</div>Those loops aren't really looping (compare loop variable and setting<br>
thereof in loop body). They iterate once 255/256 of times, and twice for<br>
that 1/256 case (assuming 8bit variables). Clever concise coding.<br>
<br>
Volker<br>
<font color="#888888"><br>
--<br>
Volker Kuhlmann<br>
<a href="http://volker.dnsalias.net/" target="_blank">http://volker.dnsalias.net/</a> Please do not CC list postings to me.<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz">Chchrobotics@lists.linuxnut.co.nz</a><br>
<a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
Meeting Time and Location uncertain while Science Alive is out of action.<br>
<br>
When replying, please edit your Subject line to reflect new content.<br>
</div></div></blockquote></div><br></div></div>