On 01-Feb-02 Sean Alcorn - Avion Sydney wrote: > >> Have you tried running and monitoring it in MPLAB ? (with and >> without the delay500 enabled) > > No. I have never had any success running in MPLAB! It takes far too long!!! > Take a hint Sean :-) Finding this sort of bug is exactly the sort of thing that simulators were designed for ! 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. Watch the value of COUNTER and see if it is being changed in unexpected places in the code. Peter. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads