PIC and pulse trains

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Hello,

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 ?




Re: PIC and pulse trains


Quoted text here. Click to load it

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


Re: PIC and pulse trains


opined:

Quoted text here. Click to load it

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.
--
   W          
 . | ,. w ,   "Some people are alive only because
We've slightly trimmed the long signature. Click to see the full one.
Re: PIC and pulse trains


Quoted text here. Click to load it

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


Re: PIC and pulse trains



Quoted text here. Click to load it
Good old English, eh?

Does he want to check every 500nS to see if a pulse of some length is
present or does he want to check for a pulse which repeats every
500nS?

Depends on how you read the original question.

Alan
--
Sell your surplus electronic components at
http://ozcomponents.com
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline