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

Helmut Walle helmut.walle at gmail.com
Sat Jul 23 13:33:09 BST 2011


Hi Synco,

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?

Kind regards,

Helmut.

-- 
+------------------------+
| Helmut Walle           |
| Helmut.Walle at gmail.com |
| +64-3-388 39 54        |
+------------------------+

On Fri, 22 Jul 2011, Synco Reynders 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.
> 
> 
> 
>


More information about the Chchrobotics mailing list