program BLINK
dim LEDRED as sbit at LATE1_bit
dim switch1 as sbit at RD1_bit
main:
TRISD.1 = 1
TRISE.1=0
while TRUE
if (switch1 and 1)=0 then ‘pull up required in this pin
LEDRED=1
else
LEDRED=0
end if
wend
end.
program BLINK
dim LEDRED as sbit at LATE1_bit
dim switch1 as sbit at RD1_bit
main:
TRISD.1 = 1
TRISE.1=0
while TRUE
if (switch1 and 1)=0 then ‘pull up required in this pin
LEDRED=1
else
LEDRED=0
end if
wend
end.