on 2/2/02 2:01 AM, Peter Onion at ponion@SRD.BT.CO.UK wrote: Peter, > Take a hint Sean :-) Finding this sort of bug is exactly the sort of thing > that simulators were designed for ! Yes. I agree. But the particular MPLAB simulator is all but useless to me. > The reason it "It takes far too long!!!" in MPLAB is probably the same reason > it seems to go around the loop too many times on a real PIC. No. Not so. It takes minutes to complete a single 500mS delay! > Watch the value of COUNTER and see if it is being changed in unexpected places > in the code. See my code just posted in response to Jo (jinx). It's real simple. The LED on GP5 (Pin 6) is toggling perfectly. All I do is count them and I lose count! :-) A lot more than 6. Regards, Sean -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads