I wrote this program to light the LED when the switch moves, but it did not work in the protues.The program does not detect the input.Could you please tell why is that?
Code:
#include <p18F4520.inc>
CONFIG OSC=HS , WDT=OFF , LVP=OFF
porta equ 0xf80 ;port and tris adress
trisa equ 0xf92
portb equ 0xf81
trisb equ 0xf93
portc equ 0xf82
trisc equ 0xf94
trisd equ 0xf95
portd equ 0xf83
org 0h
bsf trisb,3
bcf trisd,0
h: btfsc portb,3
BCF PORTD,0
goto h
bsf portd,0
goto h
end