[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Rabbit 2000
- Subject: Re: Rabbit 2000
- From: "patrick_o_matic" <patrick@xxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 12:22:58 -0000
--- In ukha_d@xxxxxxx, "Paul Smith" <ukha@...> wrote:
>
> >
> > Pretty unlikely I think - much more likely to be caused by
dirty/noisy
> > power rails. Try decoupling the power rails around your pulse
counting
> > circuitry using 100nF caps. If you have access to a scope you
make
> > also want to look at the shape of the conditioned pulses that you
are
> > counting - you may need to add a schmidt trigger or similar to
prevent
> > false triggers if the leading or trailing edge is rising slowly
(and
> > you should be edge triggering, not level triggering, in this kind
of
> > application).
Looks a bit better!
If I was you, I would use an interrupt driven input rather than
polling. Polling can be made to work, but you must sample at at least
twice the frequency of the pulse you are looking to measure, and it
can all get a bit messy if your mark-space ratio is not even (which is
pretty likely in a measuring meter led pulse scenario).
For details on setting up an edge triggered interrupt, see here:
http://www.rabbitsemiconductor.com/documentation/docs/manuals/Rabbit2000/UsersManual/index.htm
section 7.9.1 is the relevant bit
If I remember correctly, the rabbit sample code that comes with the
compiler also includes some examples of how to do this too (or
something pretty close to it)?
PPS. Do publish the finished design, quite fancy one of these myself :-)
Cheers
Patrick
UKHA_D Main Index |
UKHA_D Thread Index |
UKHA_D Home |
Archives Home
|