Hi, im working on a time fountain and im starting to write the pic code, i just started learning assembler through some tutorials.
i tried to write a program that when RA1 is high then led on rb3 goes high,
i connected the circuit like in the picture and wrote this program.
i know forsure that all connection are good since i burnt the pic with a led blinking file and it worked. as for the switches i soldered them well and they should work but i haven't seen them work yet.
list p=16F84
radix hex
;-------------------------------------------
STATUS equ 03h
TRISA equ 85h
TRISB equ 86h
PORTA equ 05h
PORTB equ 06h
;-------------------------------------------
bsf STATUS,5 ;Switch to Bank 1
movlw b'11111'
movwf TRISA ;Set the Port A pins to input
movlw b'00000000'
movwf TRISB
bcf STATUS,5 ;Switch to Bank 0
Start BTFSS PORTA,1
goto LedOff
movlw b'11111111' ;Turn the LED ON
movwf PORTB
goto Start
LedOff movlw b'00000000' ;Turn the LED OFF
movwf PORTB
goto Start
end
can any1 help?
i tried to write a program that when RA1 is high then led on rb3 goes high,
i connected the circuit like in the picture and wrote this program.
i know forsure that all connection are good since i burnt the pic with a led blinking file and it worked. as for the switches i soldered them well and they should work but i haven't seen them work yet.
list p=16F84
radix hex
;-------------------------------------------
STATUS equ 03h
TRISA equ 85h
TRISB equ 86h
PORTA equ 05h
PORTB equ 06h
;-------------------------------------------
bsf STATUS,5 ;Switch to Bank 1
movlw b'11111'
movwf TRISA ;Set the Port A pins to input
movlw b'00000000'
movwf TRISB
bcf STATUS,5 ;Switch to Bank 0
Start BTFSS PORTA,1
goto LedOff
movlw b'11111111' ;Turn the LED ON
movwf PORTB
goto Start
LedOff movlw b'00000000' ;Turn the LED OFF
movwf PORTB
goto Start
end
can any1 help?