On 01-Feb-02 Sean Alcorn - Avion Sydney wrote: > Hi guys, > > I am a newbie, but am starting to have some reasonable success. > > To me, this code looks right, but it's just not working for me. Instead of > getting 6 loops of my code, I get heaps of them! Sean, The code you posted should work, but without details of the "do some stuff" and the delay routine it is impossible to tell if there is something in there that is corrupting the value in the loop counter. I would guess that something is changing the value in COUNTER. Maybe a bank switching problem, or maybe another variable asigned to the same register file. How do you asign variables to registers ? Peter. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads