Pulses in PIC

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.

--
Luhan Monat (luhanis \'at\' yahoo \'dot\' com)
"The future is not what it used to be..."
http://members.cox.net/berniekm
Reply to
Luhan Monat
Loading thread data ...

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.

--
Regards,
  Bob Monsen
Reply to
Bob Monsen

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

Reply to
Fernando

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

Thanks Fernando

"Bob M> > I don't know if this is the right forum. If it doesn't go, please, find

out

this.

Reply to
Fernando

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'.

--
Luhan Monat (luhanis \'at\' yahoo \'dot\' com)
"The future is not what it used to be..."
http://members.cox.net/berniekm
Reply to
Luhan Monat

try

formatting link
and the comp arch.embedded newsgroup

martin

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

Reply to
martin griffith

Luhan Monat while reading the NewsGroups, decided to share his knowledge in news:rAuge.14856$tQ.14761@fed1read06:

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.

Reply to
Parmin

Here you go:

formatting link

Reply to
Bob Monsen

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

"Luhan M> > I don't know if this is the right forum. If it doesn't go, please, find

out

Reply to
Fernando

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.