Looking at the question as inputting a signal with a 50% duty cycle and outputting a signal 130% greater with a 50% duty cycle, here is my solution. Requires 4 routines, count input pulse width see if input changed decrement output count see if time to change output COUNT INPUT PULSE WIDTH In order to get the increase in frequency, the input count must be reduced before it becomes the count for the output. This is done by not counting the input pulse every forth time. The 'fourth input counter' will add a count to the input count to 'tweak it from 125% to 130% every 13th time it is called. The 52 (4*13) input timings results in 39 (3*13) input counts, and if 1 input count is added at this time, the percentage of 40 counts to 52 timings is 130%. SEE IF INPUT CHANGES When the input state changes, the input count is moved to the 'last pulse count' and the input pulse count is cleared. It may be a good idea to average the last pulse count and input pulse instead of just moving it. This is easily done by adding the two and right shifting the results. This averaging will encourage a 50% duty cycle for the output pulses. DECREMENT OUTPUT COUNT Just subtract one from output count. SEE IF TIME TO CHANGE OUTPUT if output count is zero, toggle output pulse and move 'last pulse count' to output count So there would be three series of count input pulse width see if input changed decrement output count see if time to change output And a fourth series with the 'count input pulse width' modified to only counting every 13th time. One main concept is that the input pulse and output pulse have no relationship in time except the 'last pulse count', and that count can change any time with the output routine using it when it toggles the output pulse and starts a new pulse. Bill ----- Original Message ----- From: "Gary Neal" To: Sent: Wednesday, April 23, 2003 6:08 PM Subject: [PIC]: Frequency multiplier? > Hi, > > I've got a variable frequency signal (200hz to 4khz) whose frequency I want > to increase by 30% (5v signal). IE if the input frequency is 1000hz, I > want to output 1300hz. Is there an easy method of doing this? I've heard > of PLL, but don't have a clue how to build them, so if there's an easier > option that would be great. > > Thanks, > > Gary > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics