Connect with us

Pulses in PIC

Discussion in 'Electronic Design' started by Fernando, May 11, 2005.

Scroll to continue with content
  1. Fernando

    Fernando Guest

    I don't know if this is the right forum. If it doesn't go, please, find out
    the correct
    for my questions.

    I am developing system to measure frequencies with PIC and I am with
    difficulty in programming the capture of the information (pulses) and to
    record in a variable.
    If somebody can help myself, I thank.
    TIA

    Fernando
     
  2. try
    http://piclist.com/techref/piclist/index.htm
    and the comp arch.embedded newsgroup



    martin

    After the first death, there is no other.
    (Dylan Thomas)
     
  3. Luhan Monat

    Luhan Monat Guest

    Check my website below. The first project listed is called 'Super
    Probe' it does 16 functions including frequency counting, and event
    counting. The full source listing is included.

    By the way, are you looking for frequency or pulse width? Pulse width
    is much easier to handle.
     
  4. Bob Monsen

    Bob Monsen Guest

    You can use Timer0 as a free-running, async clock on many of the PICs.
    The claim is that you can measure up to 50MHz with it. Start a different
    clock, clear the timer register, and then start Timer0. When it
    overflows, you have 256 ticks, so the clock >> 8 is the period. If it's
    too fast, count some number of overflow interrupts. Use a crystal, since
    the RC clock is pretty inaccurate.

    There are fixed point routines available for divides, which will allow
    you to output a frequency.

    There is also a tech note on the microchip site that describes all of this.
     
  5. Fernando

    Fernando Guest

    If you can send me a small example, it would help me a lot.

    Thanks
    Fernando
     
  6. Parmin

    Parmin Guest

    Luhan Monat <> while reading the NewsGroups, decided to share
    his knowledge in
    Thanks Luhan

    Thats a great project.

    I have not yet see the source code but,
    anyway I could port this model to run an LCD?
    Or is the metering code really intertwined to the display code?

    Par.
     
  7. Luhan Monat

    Luhan Monat Guest

    Hi,

    Near the bottom of the are text links to source and object codes.

    An LCD would be easier, the LED's I have need to run constantly.

    If you have questions on the code, you can email me directly - just be
    sure to put something specific in the subject line so you wont 'get
    thrown out with the spam'.
     
  8. Fernando

    Fernando Guest

    I thank for you to be interested in helping me.
    If I do Timer1 to begin in the ascent of a pulse present square in the pin
    RA2 (for example) and in the descent of this same pulse, to stop Timer1 I
    have the half of the period of this square wave. Am I right?
    Tks
    Fernando
     
  9. Bob Monsen

    Bob Monsen Guest

    Here you go:

    http://tinyurl.com/cd4ay
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-