Searching \ for 'SPAM: Re: [PIC]: Frequency multiplier?' in subject line. ()
Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Re: [PIC]: Frequency multiplier?'.

Truncated match.
'SPAM: Re: [PIC]: Frequency multiplier?'
2003\04\30@031901 by

Couple Q's...

- Does duty-cycle matter?
- What is the range of the input freq?
- Is the multiplier a fixed value?

Cheers,
-Neil.

On Wednesday 30 April 2003 01:00, Reinaldo Alvares scribbled:
{Quote hidden}

> {Original Message removed}
-No, the duty cycle doesn't matter as long as the outputed pulses are evenly
spaced.
-The range of the input frequency is from 0Hz(stop condition) to 1kHz(max
speed).
-Yes, the multiplier is always the same 10.
RA
{Original Message removed}
Okay, I'm confusing threads here, because I thought there was something about a 30% increase some days ago.   But let's work with 10x ...

Possible solution 1: (I can't see why this solution would cause you problems, but you will have jitter) -- monitor input, and on each rising edge, dump out 10 output pulses as fast as the circuitry connected to the output will handle it.  This needs to be at least 10 khz, so that at max frequency, the output is done before the next incoming edge.  That's it.

Possible solution 2:  Whatever you are doing now (where you're losing pulses during input acceleration), you should monitor the input and *queue* the output pulses so that none is lost.  With the first incoming pulse, put the number 10 in an output queue.  The output routine (cycle) will monitor this number and dump an output pulse when this number is greater than zero and then decrement this number.   If it only gets to output say 8 pulses before the next input pulse comes in (because the input rate increased), then just *add* the newest number of output pulses to what's already been scheduled.  IE: add 10 to the remaining 2.  Again, you will have all the output pulses, but with some jitter.  With some intelligent coding, you can accelerate the output a bit more than necessary to catch up to real-time.

Cheers,
-Neil.

On Wednesday 30 April 2003 02:50, Reinaldo Alvares scribbled:
> -No, the duty cycle doesn't matter as long as the outputed pulses are
> evenly spaced.
> -The range of the input frequency is from 0Hz(stop condition) to 1kHz(max
> speed).
> -Yes, the multiplier is always the same 10.