skubaig
Newbie level 6
org 0x00 ; Processor reset address vector
nop
nop
call Initport
goto Start ; Goto the start of main program
;*********Main loop
Initport
bcf STATUS, RP0
clrf PORTA
movlw b'11101111' ; configure LED1 as output pin
movwf TRISA
movlw 0x06 ;Configure all pins
movwf ADCON1
movlw 0xCF
movwf TRISA
bsf STATUS, RP0
return
Start
bsf PORTA,Led1 ; turn on LED
nop
nop
RESET
nop
bcf PORTA,Led1 ; turn off LED
nop
nop
nop
nop
nop
nop
nop
bsf PORTA,Led1 ; turn on LED
nop
nop
nop
nop
nop
nop
nop
bcf PORTA,Led1 ; turn off LED
SLEEP
please check wheather this code is correct or something is wrong I just want to on led before resetting the pic and off LED then on & off LED before going to sleep.........
nop
nop
call Initport
goto Start ; Goto the start of main program
;*********Main loop
Initport
bcf STATUS, RP0
clrf PORTA
movlw b'11101111' ; configure LED1 as output pin
movwf TRISA
movlw 0x06 ;Configure all pins
movwf ADCON1
movlw 0xCF
movwf TRISA
bsf STATUS, RP0
return
Start
bsf PORTA,Led1 ; turn on LED
nop
nop
RESET
nop
bcf PORTA,Led1 ; turn off LED
nop
nop
nop
nop
nop
nop
nop
bsf PORTA,Led1 ; turn on LED
nop
nop
nop
nop
nop
nop
nop
bcf PORTA,Led1 ; turn off LED
SLEEP
please check wheather this code is correct or something is wrong I just want to on led before resetting the pic and off LED then on & off LED before going to sleep.........