16 bit count down - PIC16
From: Mauritz Geyser (mauritzg_at_iafrica.com)
Date: 07/10/04
- Next message: Wouter van Ooijen: "Re: Which PIC18 C Compiler?"
- Previous message: Master: "how to write a simulator for a processor"
- Next in thread: Gary Kato: "Re: 16 bit count down - PIC16"
- Reply: Gary Kato: "Re: 16 bit count down - PIC16"
- Reply: Sylvain Munaut: "Re: 16 bit count down - PIC16"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 10 Jul 2004 10:55:52 +0200
Hi
Can someone please help me with the asm code for a 16-bit count down loop
for a PIC16 processor.
The following code does not count down properly. It exits the loop when both
0Ch and 0Dh are 1.
movlw h'FF'
movwf 0Ch
movwf 0Dh
loop decfsz 0Ch
goto loop
decfsz 0Dh
goto loop
return
Thanks
Mauritz
- Next message: Wouter van Ooijen: "Re: Which PIC18 C Compiler?"
- Previous message: Master: "how to write a simulator for a processor"
- Next in thread: Gary Kato: "Re: 16 bit count down - PIC16"
- Reply: Gary Kato: "Re: 16 bit count down - PIC16"
- Reply: Sylvain Munaut: "Re: 16 bit count down - PIC16"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]