newbie111
Member level 2
Hi,
I am learning how to use the xorfw instruction from this site
https://www.hobbyprojects.com/pic_tutorials/tutorial7.html
everything was ok until i came to tutorial7
i complied the following codes from this lesson but
hmmmm my portC,1 LED stayed on no blinking at all
I wonder why
Would anyone kindly tell me what's wrong?
lol Gosh I have been trying this for 3 hours so far.
Thanks a lot[/code]
I am learning how to use the xorfw instruction from this site
https://www.hobbyprojects.com/pic_tutorials/tutorial7.html
everything was ok until i came to tutorial7
i complied the following codes from this lesson but
hmmmm my portC,1 LED stayed on no blinking at all
I wonder why
Code:
#include <p16F690.inc>
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BOR_OFF & _IESO_OFF & _FCMEN_OFF)
cblock 0x20
COUNT1 ; Define two file registers for the
COUNT2
; delay loops
endc
org 0
bsf STATUS,RP0 ;Switch to Bank 1
movlw 0x00 ;Set the Port c pins
movwf TRISC ;to output.
bcf STATUS,RP0 ;Switch back to Bank 0
movlw 0x02
Start xorwf PORTC,1
call Delay
;255 to zero, 255 times
goto Start
Delay
Loop1 decfsz COUNT1,1 ;This second loop keeps the LED
goto Loop1 ;turned off long enough for us to
decfsz COUNT2,1 ;see it turned off
goto Loop1 ;
return
end
Would anyone kindly tell me what's wrong?
lol Gosh I have been trying this for 3 hours so far.
Thanks a lot[/code]