I thought the internal clock was 8MHz, but I wasn't sure. I changed the sim setting around until it seemed to blink at the same speed as on the chip, to check what speed it was running at. It turned out to be running at 31.25KHz, quite near to 20Hz. I now fixed this - I didn't know to change OSCCON all working now On 5/2/05, Olin Lathrop wrote: > Dave Turner wrote: > > I have set the osc to INTRC-CLKOUT, which should be about 8MHz, but > > with the MPLAB SIM, I have to set the processor speed to about 20Khz > > to get near to the speed I'm using. > > Huh? I don't have a clue what you are doing or trying to say here. If the > internal oscillator is running at 8MHz, then how is 20KHz nearer to the > speed you are using? > > You should tell the simulator the correct clock speed. It doesn't effect > performance one way or the other, but it does allow the stopwatch display to > be correct. That's a useful way to check your blinking LED code to make > sure it is blinking at the expected speed. > > > ***************************************************************** > Embed Inc, embedded system specialists in Littleton Massachusetts > (978) 742-9014, http://www.embedinc.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist