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

Synco Reynders synco.reynders at gmail.com
Fri Jul 22 06:07:43 BST 2011


Thanks Cass,
   I think I've thought of a possible solution already... (came just after
posing the question to the group as usual) My solution, is to increase the
timer size from (10bit to 16bit). It only works since I know the pulse isn't
longer than 1 period of the timer, otherwise I'm still puzzled how you'd do
it.
Will think of another question so someone can try and claim the chocolate
fish...
/s

On 22 July 2011 16:56, Cass Jones <jones.cass at gmail.com> wrote:

> Does the other interrupt need to be an interrupt?
> Could you just have it in the main loop and check for whatever it is
> that triggers the
> interrupt?
>
> Conversely if it has to happen as an interrupt then during the
> interrupt could you check for a
> change in the voltage level of  your pulse width signal and then alter
> the rise / fall detector
> and reset the counter appropriately?
>
> The first option I suspect would be more reliable.
>
> -Cass
>
> On Fri, Jul 22, 2011 at 4:24 PM, Synco Reynders
> <synco.reynders at gmail.com> wrote:
> > 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.
> >
> >
> > _______________________________________________
> > 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/c10f5485/attachment-0001.htm 


More information about the Chchrobotics mailing list