[chbot] !!!Choc fish challenge!!!!

Synco Reynders synco.reynders at gmail.com
Fri Jul 22 05:24:21 BST 2011


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 brushless DC motor
controller... (hence the procrastinating).
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), glitch-free!! :
This is roughly what I got:

#define TIMERWRAP     1024

ISR(ExternalInterrupt)  // highest priority
{
    if (triggered on +ve edge) {
       set to trigger on -ve edge;
       count = TIMERWRAP - Timer;
    }
    else {
        set to trigger on +ve edge;
        count += Timer;
        // Now Count should be the pulse length... but it has glitches see
below
    }
}

ISR(TimerOverflow)   // overflows at TIMERWRAP ticks
{
    count += TIMERWRAP;
    ....
}

ISR(other)
{
   ...
}

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 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 the frequency of
glitches but as-long as there is any time between reading the flags register
and the timer I get glitches.
Is this one of those impossible micro-processor problems?



On 22 July 2011 14:55, Charles Manning <manningc2 at actrix.gen.nz> wrote:

> On Friday 22 July 2011 14:46:43 Synco Reynders wrote:
> > HP-12C is a finacial calculator.
>
> Synco wins the prize!
>
> Yes folks, the HP-12C has been in continuous production  for over 30 years
> and
> is still the preferred choice of accountants and auditors the world over.
>
> There have been some slight internal changes to adjust to changes in
> manufacturing processes, but the 12C looks the same and does the same thing
> as it has always done.
>
> As with most "real" HP calculators, it's RPN which makes it faster to use
> than
> those damn "arithmetic" calculators. Anyone who can't use RPN doesn't know
> what they're missing!
>
> -- Charles
>
>
>
> > /s
> >
> > On 22 July 2011 14:42, Cass Jones <jones.cass at gmail.com> wrote:
> > > The F91w still looks the same as far as I know, wikipedia reckons they
> > > have only been around since 1991
> > >
> > > On Fri, Jul 22, 2011 at 2:40 PM, Charles Manning
> > >
> > > <manningc2 at actrix.gen.nz> wrote:
> > > > On Friday 22 July 2011 14:33:35 Synco Reynders wrote:
> > > >> Digital watch?
> > > >
> > > > I don't want a category of item. I want a Make/Model that is the same
> > > > as
> > >
> > > it
> > >
> > > > was years ago with no cosmetic changes.
> > > >
> > > > While Casio G-Shocks have been around for well over 20 years they are
> > > > not
> > >
> > > the
> > >
> > > > same model as the original ones and don't look the same.
> > > >
> > > > Hints so far:
> > > > It takes batteries
> > > > It has an LCD
> > > > If you have one you probably wear a tie.
> > > >
> > > > No more hints yet to give others a chance...
> > > >
> > > >> /s
> > > >>
> > > >> On 22 July 2011 14:31, Charles Manning <manningc2 at actrix.gen.nz>
> wrote:
> > > >> > On Friday 22 July 2011 14:24:23 Cass Jones wrote:
> > > >> > > Oh a pocket calculator the fx-82 I presume
> > > >> >
> > > >> > Getting closer.
> > > >> >
> > > >> > The FX-82 is not a single model. It is a family of models with
> > >
> > > different
> > >
> > > >> > capabilities and different look and feel.
> > > >> >
> > > >> > What I am looking for is a gizzmo that looks identical over the
> last
> > >
> > > many
> > >
> > > >> > decades (except for different "Made In xxx" etc).
> > > >> >
> > > >> > One manufacturer. One model. Looks exactly the same.
> > > >> >
> > > >> > Hint3: If you have one you probably wear a tie.
> > > >> >
> > > >> > > On Fri, Jul 22, 2011 at 2:23 PM, Charles Manning
> > > >> > >
> > > >> > > <manningc2 at actrix.gen.nz> wrote:
> > > >> > > > These are not the same gadget. They are different models made
> by
> > > >> > > > different manufacturers.
> > > >> > > >
> > > >> > > > The answer I want is a fully functional gizzmo made by the
> same
> > > >> > > > manufacturer under the same model number for decades.
> > > >> > > >
> > > >> > > > Hint 2: It has an LCD.
> > > >> > > >
> > > >> > > > On Friday 22 July 2011 14:20:11 Synco Reynders wrote:
> > > >> > > >> Light-bulb? Fuse? Spark-plugs? Torch? Door-bell? ...
> > > >> > > >> Hoping to get atleast 1 chocolate fish ;-)
> > > >> > > >> /s
> > > >> > > >>
> > > >> > > >> On 22 July 2011 14:08, Charles Manning
> > > >> > > >> <manningc2 at actrix.gen.nz>
> > > >> >
> > > >> > wrote:
> > > >> > > >> > I hereby off a choc fish to the first correct answer to
> this
> > > >> > > >> > question...
> > > >> > > >> >
> > > >> > > >> > In this crazy world we live in, electronic gadgets change
> all
> > >
> > > the
> > >
> > > >> > > >> > time. Try to
> > > >> > > >> > find something you bought last and you will find it has
> been
> > > >> >
> > > >> > replaced
> > > >> >
> > > >> > > >> > by a different model.
> > > >> > > >> >
> > > >> > > >> > There is, however, one electronic gadget that has been in
> > > >> > > >> > production for a few
> > > >> > > >> > decades. Same model. Same function. Still in production.
> > > >> > > >> >
> > > >> > > >> > What is it?
> > > >> > > >> >
> > > >> > > >> > Charles
> > > >> > > >> >
> > > >> > > >> > _______________________________________________
> > > >> > > >> > 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.
> > > >> > > >
> > > >> > > > _______________________________________________
> > > >> > > > 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.
> > >
> > > >> > > _______________________________________________
> > > >> > > 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.
> > > >> >
> > > >> > _______________________________________________
> > > >> > 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.
> > > >
> > > > _______________________________________________
> > > > 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.
> > >
> > > _______________________________________________
> > > 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.
>
>
>
> _______________________________________________
> 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/20110722/46068382/attachment-0001.htm 


More information about the Chchrobotics mailing list