Is it impossible to program all 08M I/O ports as input? Idea is to make a simpple IR-sender with four buttons. BUT it always and only accepts button press signal from only three I/O ports. Those are 1,2,3.
Program follows...
__________________________________
input 1
input 2
input 4
alku:
if pin1=1 then ir1
if pin2=1 then ir2
if pin3=1 then ir3
if pin4=1 then ir4
goto alku
ir1:
for b1 = 1 to 10
infraout 1,1
pause 45
next b1
goto alku
ir2:
for b1 = 1 to 10
infraout 1,2
pause 45
next b1
goto alku
ir3:
for b1 = 1 to 10
infraout 1,3
pause 45
next b1
goto alku
ir4:
for b1 = 1 to 10
infraout 1,4
pause 45
next b1
goto alku
Program follows...
__________________________________
input 1
input 2
input 4
alku:
if pin1=1 then ir1
if pin2=1 then ir2
if pin3=1 then ir3
if pin4=1 then ir4
goto alku
ir1:
for b1 = 1 to 10
infraout 1,1
pause 45
next b1
goto alku
ir2:
for b1 = 1 to 10
infraout 1,2
pause 45
next b1
goto alku
ir3:
for b1 = 1 to 10
infraout 1,3
pause 45
next b1
goto alku
ir4:
for b1 = 1 to 10
infraout 1,4
pause 45
next b1
goto alku