Steve Hardy wrote > 2. Compare module >the high end resolution would be about 1500Hz, which is not as good as what you >want. In order to achieve this, your software will need to increase >the update rate of TMR1 at the appropriate point, and compensate the >value in CCPR1H/L. E.g., at the 100Hz point, increase the TMR1 update >rate by a factor of 16, and multiply CCPR1H/L by the same (shift left 4). >This would improve the resolution at 10KHz to better than 100Hz. sorry for this late response. I think I will forget the 505s pulse width, this I can solve with a monostable multivibrator. It will cost me some more hardware but it will take a load of the software complexity. I don't understand why the compare is needed together with the Timer1 to generate the wanted signal. I now use the timer register without the compare and I see some problems when trying to load the timer registers. When I load the registers, by sending via I2C another value to the timer registers for example with 0xFF,0x9B I can generate a signale with a frequency of exact 10.000 hz. Sometimes when I try to change this value, the generated signal starts acting strange, sometimes the generated signal disappears for some time etc.. when I keep transmitting the same values over and over again via I2C somethimes the signal get stable again. I suppose it has something to do with the intterupts that I use. Besides the TMR1 and the I2C I will also be needing TMR0 interrupt and maybe an ADC interrupt. Is there something I should take care of. greetings Frank Temmerman