<div>Hey,</div>Thought it may be good to give a bit of an explanation to what I'm doing....<div>I've got some brushless DC motor controllers (the DealExtreme Mystery brand)) which I noticed have an AVR on-board... and I've be wanting a motor controller that can do:</div>
<div> * Forward and Reverse!!</div><div> * Doesn't refuse to start when instructed to... and continues to try if it does fail.</div><div> * is easily controlled by a master micro so:</div><div> * doesn't do funny things when the battery gets low</div>
<div> * doesn't have user options/menus etc</div><div> so I decided to reverse engineer the circuit and write the controller software.</div><div>Progress so-far: have simple RC servo interface working and have the motor turning but only in open-loop operation.</div>
<div>Hopefully tomorrow it snows and I get some more done.</div><div>Cheers,</div><div>Synco</div><div><br><br><div class="gmail_quote">On 24 July 2011 00:33, Helmut Walle <span dir="ltr"><<a href="mailto:helmut.walle@gmail.com">helmut.walle@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi Synco,<br>
<br>
Someone may have suggested this already, but I'm not sure. Does your micro have input capture capabiltiy on a timer channel? If it has then that would be the preferred way of getting precision timing measurements on external events, because it's independent of variable latencies due to other interrupts going off etc. But you probably already knew that... and maybe your micro doesn't have input capture?<br>
<br>
Kind regards,<br>
<br>
Helmut.<br><font color="#888888">
<br>
-- <br>
+------------------------+<br>
| Helmut Walle |<br>
| <a href="mailto:Helmut.Walle@gmail.com" target="_blank">Helmut.Walle@gmail.com</a> |<br>
| +64-3-388 39 54 |<br>
+------------------------+</font><div><div></div><div class="h5"><br>
<br>
On Fri, 22 Jul 2011, Synco Reynders wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Well, I feel honored for winning the chocolate fish, and sorry for anyone who hasn't got a mute function on this email thread.I've had a frustrating day trying to code up a<br>
brushless DC motor controller... (hence the procrastinating).<br>
Anyway I'd like to put this winning chocolate fish up for grabs again to the first person that tells me how to measure a pulse-width (connected to an external interrupt),<br>
glitch-free!! :<br>
This is roughly what I got:<br>
<br>
#define TIMERWRAP 1024<br>
<br>
ISR(ExternalInterrupt) // highest priority<br>
{<br>
if (triggered on +ve edge) {<br>
set to trigger on -ve edge;<br>
count = TIMERWRAP - Timer;<br>
}<br>
else {<br>
set to trigger on +ve edge;<br>
count += Timer;<br>
// Now Count should be the pulse length... but it has glitches see below<br>
}<br>
}<br>
<br>
ISR(TimerOverflow) // overflows at TIMERWRAP ticks<br>
{<br>
count += TIMERWRAP;<br>
....<br>
}<br>
<br>
ISR(other)<br>
{<br>
...<br>
}<br>
<br>
Now the problem occurs (very infrequent) when both the TimerOverflow and External interrupt occur while another (non-nesting) ISR is being processed. The Ext Interrupt will be<br>
processed first therefore missing out on the extra TIMERWRAP. I've tried compensating by reading the interrupt flag register when processing the external interrupt, it reduces<br>
the frequency of glitches but as-long as there is any time between reading the flags register and the timer I get glitches.<br>
Is this one of those impossible micro-processor problems?<br>
<br>
<br>
<br>
On 22 July 2011 14:55, Charles Manning <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>> wrote:<br>
On Friday 22 July 2011 14:46:43 Synco Reynders wrote:<br>
> HP-12C is a finacial calculator.<br>
<br>
Synco wins the prize!<br>
<br>
Yes folks, the HP-12C has been in continuous production for over 30 years and<br>
is still the preferred choice of accountants and auditors the world over.<br>
<br>
There have been some slight internal changes to adjust to changes in<br>
manufacturing processes, but the 12C looks the same and does the same thing<br>
as it has always done.<br>
<br>
As with most "real" HP calculators, it's RPN which makes it faster to use than<br>
those damn "arithmetic" calculators. Anyone who can't use RPN doesn't know<br>
what they're missing!<br>
<br>
-- Charles<br>
<br>
<br>
<br>
> /s<br>
><br>
> On 22 July 2011 14:42, Cass Jones <<a href="mailto:jones.cass@gmail.com" target="_blank">jones.cass@gmail.com</a>> wrote:<br>
> > The F91w still looks the same as far as I know, wikipedia reckons they<br>
> > have only been around since 1991<br>
> ><br>
> > On Fri, Jul 22, 2011 at 2:40 PM, Charles Manning<br>
> ><br>
> > <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>> wrote:<br>
> > > On Friday 22 July 2011 14:33:35 Synco Reynders wrote:<br>
> > >> Digital watch?<br>
> > ><br>
> > > I don't want a category of item. I want a Make/Model that is the same<br>
> > > as<br>
> ><br>
> > it<br>
> ><br>
> > > was years ago with no cosmetic changes.<br>
> > ><br>
> > > While Casio G-Shocks have been around for well over 20 years they are<br>
> > > not<br>
> ><br>
> > the<br>
> ><br>
> > > same model as the original ones and don't look the same.<br>
> > ><br>
> > > Hints so far:<br>
> > > It takes batteries<br>
> > > It has an LCD<br>
> > > If you have one you probably wear a tie.<br>
> > ><br>
> > > No more hints yet to give others a chance...<br>
> > ><br>
> > >> /s<br>
> > >><br>
> > >> On 22 July 2011 14:31, Charles Manning <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>> wrote:<br>
> > >> > On Friday 22 July 2011 14:24:23 Cass Jones wrote:<br>
> > >> > > Oh a pocket calculator the fx-82 I presume<br>
> > >> ><br>
> > >> > Getting closer.<br>
> > >> ><br>
> > >> > The FX-82 is not a single model. It is a family of models with<br>
> ><br>
> > different<br>
> ><br>
> > >> > capabilities and different look and feel.<br>
> > >> ><br>
> > >> > What I am looking for is a gizzmo that looks identical over the last<br>
> ><br>
> > many<br>
> ><br>
> > >> > decades (except for different "Made In xxx" etc).<br>
> > >> ><br>
> > >> > One manufacturer. One model. Looks exactly the same.<br>
> > >> ><br>
> > >> > Hint3: If you have one you probably wear a tie.<br>
> > >> ><br>
> > >> > > On Fri, Jul 22, 2011 at 2:23 PM, Charles Manning<br>
> > >> > ><br>
> > >> > > <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>> wrote:<br>
> > >> > > > These are not the same gadget. They are different models made by<br>
> > >> > > > different manufacturers.<br>
> > >> > > ><br>
> > >> > > > The answer I want is a fully functional gizzmo made by the same<br>
> > >> > > > manufacturer under the same model number for decades.<br>
> > >> > > ><br>
> > >> > > > Hint 2: It has an LCD.<br>
> > >> > > ><br>
> > >> > > > On Friday 22 July 2011 14:20:11 Synco Reynders wrote:<br>
> > >> > > >> Light-bulb? Fuse? Spark-plugs? Torch? Door-bell? ...<br>
> > >> > > >> Hoping to get atleast 1 chocolate fish ;-)<br>
> > >> > > >> /s<br>
> > >> > > >><br>
> > >> > > >> On 22 July 2011 14:08, Charles Manning<br>
> > >> > > >> <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>><br>
> > >> ><br>
> > >> > wrote:<br>
> > >> > > >> > I hereby off a choc fish to the first correct answer to this<br>
> > >> > > >> > question...<br>
> > >> > > >> ><br>
> > >> > > >> > In this crazy world we live in, electronic gadgets change all<br>
> ><br>
> > the<br>
> ><br>
> > >> > > >> > time. Try to<br>
> > >> > > >> > find something you bought last and you will find it has been<br>
> > >> ><br>
> > >> > replaced<br>
> > >> ><br>
> > >> > > >> > by a different model.<br>
> > >> > > >> ><br>
> > >> > > >> > There is, however, one electronic gadget that has been in<br>
> > >> > > >> > production for a few<br>
> > >> > > >> > decades. Same model. Same function. Still in production.<br>
> > >> > > >> ><br>
> > >> > > >> > What is it?<br>
> > >> > > >> ><br>
> > >> > > >> > Charles<br>
> > >> > > >> ><br>
> > >> > > >> > ______________________________<u></u>_________________<br>
> > >> > > >> > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > >> > > >> > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > >> > > >> > Mail Archives:<br>
> ><br>
> > <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>pipermail/chchrobotics/</a><br>
> ><br>
> > >> > > >> > Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
> > >> > > >> > Meeting Time and Location uncertain while Science Alive is<br>
> > >> > > >> > out<br>
> ><br>
> > of<br>
> ><br>
> > >> > > >> > action.<br>
> > >> > > >> ><br>
> > >> > > >> > When replying, please edit your Subject line to reflect new<br>
> > >> > > >> > content.<br>
> > >> > > ><br>
> > >> > > > ______________________________<u></u>_________________<br>
> > >> > > > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > >> > > > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > >> > > > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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<br>
> > >> > > > of<br>
> > >> ><br>
> > >> > action.<br>
> > >> ><br>
> > >> > > > When replying, please edit your Subject line to reflect new<br>
> ><br>
> > content.<br>
> ><br>
> > >> > > ______________________________<u></u>_________________<br>
> > >> > > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > >> > > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > >> > > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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<br>
> > >> > > action.<br>
> > >> > ><br>
> > >> > > When replying, please edit your Subject line to reflect new<br>
> > >> > > content.<br>
> > >> ><br>
> > >> > ______________________________<u></u>_________________<br>
> > >> > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > >> > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > >> > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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<br>
> ><br>
> > action.<br>
> ><br>
> > >> > When replying, please edit your Subject line to reflect new content.<br>
> > ><br>
> > > ______________________________<u></u>_________________<br>
> > > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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<br>
> > > action.<br>
> > ><br>
> > > When replying, please edit your Subject line to reflect new content.<br>
> ><br>
> > ______________________________<u></u>_________________<br>
> > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
> > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
> > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.<u></u>co.nz</a><br>
<a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/<u></u>mailman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/<u></u>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>
<br>
<br>
<br>
</blockquote>
</div></div><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></blockquote></div><br></div>