Jacky, Look in the OPTION REGISTER and change the Pre scaler rate from 256 or whatever it is to a smaller value. This will speed up the frequency of the interrupt. You may have to change the value of the RTCC (TMR0) too. Regards, Jim On Mon, 22 January 2001, Jacky Joulin wrote: > > Hello , > > Please can anyone help me to modify this basic program ! > at the present time, the frequence portB.5 output is ~30 Hz > > How I can modify for a output = ~ 1000 Hz > > Pic = 16F84 Xt = 4.00 MHz > > > > ' Set TMR0 to interrupt every 16,384 milliseconds > OPTION_REG = $d5 ' Set TMR0 configuration > INTCON = $a0 ' Enable TMR0 interrupts > > On interrupt Goto INTCARRE > > MainLoop: > ' > ' > Goto MainLoop > > Disable ' Disable interrupt during > interrupt handler > INTCARRE: > TOGGLE PORTB.5 ' change state of pin portB.5 > INTCON.2 = 0 ' Reset timer interrupt flag > resume > > > > Weslay@Aol.com > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads jim@jpes.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads