IR 08M problem

blauer

Member
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
 

Technical

Technical Support
Staff member
Program looks perfect so check your hardware on input4 - this pin can be an input so sounds like a hardware issue

or

the receiver program at the other end is wrong!

Try looking at the infra-red LED through a mobile phone camera when button 4 is pushed, you will be able to see it working.

Edited by - Technical on 1/23/2006 9:50:44 PM
 

blauer

Member
Yes... I found the problem at last.

It is clearly written in PICAXE manual. I was using the infraout/infrain command. Before i used infraout/infrain2. Read manual first million times...

When i Program 08M to send IR code 1. The reseiving 18x interprets it as code 2. code 2 is interpreted as code 3 in 18x and so fort. Code 4 was interpreted as code 5 and that line was missing of course from the reseiving project board. In 08m to 08m when you use infrain2 the numbers are same.
 
Top