Closed GoogleCodeExporter closed 9 years ago
This bug seems to be sitting a long time without being accepted.
The bug was pretty well defined.
And a 12 line code fix was even offered.
(although I think it would be better to use the ATOMIC macros to
guarantee the gcc optimizer doesn't re-order the status register manipulation)
This issue is showing how the routines in wiring_digital.c do not work properly
because the method of programming i/o pins does not work (isn't atomic)
on RISC processors without masking interrupts.
Not fixing this bug, means that sketches that have interrupt routines that use
the
digital i/o functions will have hard to track down flakiness.
For example sketches that use the servo library will potentially stomp on the
servo
libraries i/o pins when programing their other i/o pins that are unrelated to
the
servo library's i/o pins.
Original comment by bperry...@gmail.com
on 2 Feb 2010 at 2:12
It seems to me that this is an example of the issue in the wild and an example
of how
hard to track down the problem will always be:
http://forums.adafruit.com/viewtopic.php?f=31&t=7594
Original comment by johnrain...@gmail.com
on 7 Mar 2010 at 2:49
[deleted comment]
Another example of this bug:
http://code.google.com/p/arduino/issues/detail?id=170&sort=-id
Once understood, this bug is not difficult to work around, but it's damn
difficult to
track down in the first place.
Original comment by delsqua...@gmail.com
on 22 Mar 2010 at 7:42
Original comment by dmel...@gmail.com
on 6 May 2010 at 6:04
I have noticed this as well in my (fairly) simple Pan-Tilt application. I am
using
the liquidcrystal library as well as the servo library to control and display
the
pan/tilt position of the servos...
If I uncomment the LCD update code, the servo is rock solid. When I run the
update
code, the servo will jerk (both axis) every couple of seconds. I am using if
(micros() % 10 == 0) to time the updates and the longer the delay, the less
often the
jerking occurs (every 1-3 seconds when no delay is present).
Attached is my current code. I thought I was going crazy, and re-designed my
circuit
from scratch (including a secondary 5v regulator circuit), and for a relative
beginner, it has been a tough couple days ;)
Original comment by nic...@gmail.com
on 23 May 2010 at 7:31
Attachments:
I made the changes Paul suggested. If you've been having problems with this,
can you try the latest SVN revision and see if it helps?
Original comment by dmel...@gmail.com
on 12 Jun 2010 at 8:33
Took me a while to get the build process completed, but after testing it on my
pan-tilt servo appliction, and letting it sit for about 10 minutes, I didn't
notice a single hiccup in the servos whatsoever. Thanks so much for taking
care of this long-standing bug!
Original comment by nic...@gmail.com
on 13 Jun 2010 at 7:20
Thanks for testing and sorry for the delay in getting this fixed.
Original comment by dmel...@gmail.com
on 13 Jun 2010 at 7:22
Hi, I am a noob. Do I have to recompile Arduino from the svn source in order to
implement this servo jitter fix? Or is there a compiled version somewhere.
Thanks (sensev at hotmail com)
Original comment by R.Seveel...@gmail.com
on 21 Jun 2010 at 2:03
Issue 170 has been merged into this issue.
Original comment by c.mag...@arduino.cc
on 3 Jul 2015 at 1:33
Original issue reported on code.google.com by
paul.sto...@gmail.com
on 23 Nov 2009 at 10:55