>just say the sender is sending 100 pulses >i require this to send out in the same time span. i believe you all understand what i mean inherently, any solution is going to have some jitter in it, or have some lag, but you just want to change the instantaneous average rate. what you need is a reverted loop n = (256 * number pulses needed) / (per number in) accum = 0 npulse = n / 256; n = n % 256; for(;;) { waitforinputpulse(); for (i = 0 ; i < npulse ; i++) output pulse; accum += n; if (accum >= 256) { accum -= 256; output pulse; } } You may be able to eliminate the for(i=... loop and only test the 0 and 1 conditions if your ratio never exceeds 2.