[chbot] Synco's reentrant chocolate fish

Synco Reynders synco.reynders at gmail.com
Sat Jul 23 02:23:21 BST 2011


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).
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.
Cheers,
Synco

On 23 July 2011 13:09, Volker Kuhlmann <list0570 at paradise.net.nz> wrote:

> On Sat 23 Jul 2011 12:37:42 NZST +1200, Col wrote:
>
> > Also my tutors taught me it was bad practice to put loops in ISR's.
>
> Those loops aren't really looping (compare loop variable and setting
> thereof in loop body). They iterate once 255/256 of times, and twice for
> that 1/256 case (assuming 8bit variables). Clever concise coding.
>
> Volker
>
> --
> Volker Kuhlmann
> http://volker.dnsalias.net/     Please do not CC list postings to me.
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/chchrobotics
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> Web site: http://kiwibots.org
> Meeting Time and Location uncertain while Science Alive is out of action.
>
> When replying, please edit your Subject line to reflect new content.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ourshack.com/pipermail/chchrobotics/attachments/20110723/bdff6df6/attachment.htm 


More information about the Chchrobotics mailing list