Hi, Could you send me your DELAY500 code. The problem could be there. Thanks Dinho -----Mensagem original----- De: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] Em nome de Sean Alcorn - Avion Sydney Enviada em: sexta-feira, 1 de fevereiro de 2002 09:17 Para: PICLIST@MITVMA.MIT.EDU Assunto: [PIC]: What have I done wrong? 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! RADIX DEC ;etc MOVLW 6 ;We want to do this thing 6 times MOVWF COUNTER LOOP ; Do some stuff CALL DELAY500; Delay 500ms ; Do some more stuff CALL DELAY500; Delay 500ms DECFSZ COUNTER, F GOTO LOOP I eventually leave this loop, but after significantly more than 6 cycles. What have I done wrong? It's like I have the wrong figure in the MOVLW 6 statement. TYIA Sean Alcorn -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads