Hi all.
I'm having some difficulty reading a button press on input 7 of an 08X2.
This pin also serves as the serial in for programming, is there a command to reconfigure this pin?
Thanks.
I'm having some difficulty reading a button press on input 7 of an 08X2.
This pin also serves as the serial in for programming, is there a command to reconfigure this pin?
Thanks.
Code:
main:
' This is the program for the 08M2 that transmits IR codes.
'dirs =%00000000 All pins inputs.
'dirs =%11111111 All pins outputs.
let dirs = %00000001
#picaxe 08M2
#no_data
SYMBOL Delay = 100
start:
if pinb.1 = 1 then 'Reads b.1 pin 6
for b0 = 1 to 5
irout 0,1,10 ' Sends the IR output to C.0 pin 7.
next b0
end if
if pinc.2 = 1 then 'Reads b.2 pin 5
for b0 = 1 to 5
irout 0,1,20
next b0
end if
if pinc.3 = 1 then 'Reads b.3 pin 4
for b0 = 1 to 5
irout 0,1,30
next b0
end if
if pinc.4 = 1 then 'Reads b.4 pin 3
for b0 = 1 to 5
irout 0,1,40
next b0
end if
if pinc.5 = 1 then 'Reads b.1 pin 2
for b0 = 1 to 5
irout 0,1,50
next b0
end if
goto start
Last edited by a moderator: