Connect with us

PIC and pulse trains

Discussion in 'Hobby Electronics' started by Andrew Rich, Nov 8, 2006.

Scroll to continue with content
  1. Andrew Rich

    Andrew Rich Guest


    I have been playing with a 16F877 in the past.

    Is it possible to use a 16F877 or any other PIC, to check for a pulse every
    half us ?

    Is that asking too much from a PIC ?
  2. Maybe.
    Depends on what you want to do.
    You can detect a 500ns pulse with an interrupt, but a 100ns instruction
    cycle PIC will only give you a couple of instructions to do anything
    useful before the next pulse comes along.
    If you want to count the pulse with one of the timers then that should
    be OK.

    Dave :)
  3. Lionel

    Lionel Guest

    The answer to both your questions is that it depends on the length of
    your pulse(1 second? 10ms? 10uS? 1ns?), how clean (noise? voltage
    levels? ringing?) it is, & the method you use to detect it. For
    example; if your pulse is from a push button, with a minimum of 10ms,
    connecting it straight to an I/O pin on your PIC via a resistor &
    debouncing it in software would probably be very reliable. If you're
    trying to count sync signals from a composite video signal, it'll be a
    lot harder.

    The Microchip website has a ton of really good information on this
    topic (complete with circuits & sample code) in the design guides &
    application notes sections.
  4. He already said it's a pulse every 500ns, so the pulse width has to be
    under 500ns I would think ;-)

    If he wants to count the pulses the PIC can do that, but if he wants to
    detect the pulse and then do some processing the PIC won't be able to
    do that.

    Dave :)
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