Ok this one is a tad bit harder :) I followed the MIDIBOX SID code to generate a fake clock from the PWM unit. The current SID's main.asm code generates a 1 Mhz clock out of a 10 Mhz Fosc. I want to do 3.5 Mhz out of a 10 Mhz Fosc (yes i could live with 4.0 or 3.3333). Now i know that the resolution might be too crapy to be usefull. after scratching my head for a while i think i managed to get the clock running at 2 Mhz, but the PIC manual is either very poorly writen, or i just dont get it (again). the basic calculations are something like this; unsigned char pr2 = 0x09; // PWM period unsigned int fosc = 10000000; // Oscillator frequency unsigned char tmr2 = 1; // TMR2 prescaler unsigned int duty_cycle =19; // PWM duty cycle double pwm_period; // PWM period double pwm_freq; // PWM frequency double duty_cycle_t; // PWM dutcy cycle time double duty_cycle_f; // PWM dutcy cycle frequency float resulation_bits; // PWM resolation bits // Necessary calculations pwm_period = (pr2 + 1) * 4 * (1.0 / fosc) * tmr2; pwm_freq = 1.0 / pwm_period; duty_cycle_t = duty_cycle * (1.0 / fosc) * tmr2; duty_cycle_f = 1.0 / duty_cycle_t; resulation_bits = log10 ((double)fosc / pwm_freq) / log10 (2.0); calulating pwm_freq from this code (and the settings given by TK in main.asm of SID gives 250000.00000000 and not 1 Mhz ... But theres a 1:10 "postscaler" setup in T2CON as well... im confused. In theory, using 10 Mhz Fosc, we could derive a 5 Mhz clock with 50/50 duty cycle right 1,0,1,0,(...),1,0,1? (theres prolly overhead and other factors i dont know about) Heres my current code: PR2 = 0x04; //was 0x09 T2CON = 0x24; CCP1CON = 0x0f; //11xx = PWM mode CCPR1L = 0x04; This seems to run at 2 MHz now (im not exactly sure, i can only trust the +1 octave change i get in the outputs of the sound chip i use) (sorry if this seems unclear, ive been programming all day at work, and i try to make this HW synth work at home in the evenings, where the brain is not 100% working .... yeah maybe i should try and relax instead) More later.... if you dont mind,