I'm in the process of trying this as well. I'm trying to send values in the range 0 to 127 with a PicAxe transmitting a code and another micro receiving it.
my transmit code is:
Code:
test:
for b0 = 0 to 127
call sendOctal
next b0
goto test
sendOctal:
for b1 = 0 to 3
irout IrPin, 1, b0
pause 45
next b1
return
and the receive code is:
Code:
main:
call readIr
goto main
readIr:
infrain
sertxd(",",#infra)
return
This gives data of:
,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,2,9,9,9,9,11,11,11,11,0,0,0,0,0,0,0,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,13,13,13,13,12,12,12,12,15,15,15,16,16,16,16,17,17,17,17,0,0,0,0,0,0,0,10,10,10,10,13,13,13,13,12,12,0,12,15,15,15,15,16,16,16,16,17,0,17,17,16,0,0,0,0,0,0,0,1,1,1,1,2,2,2,3,3,3,3,4,4,4,5,5,5,6,5,6,6,7,7,7,7,8,8,8,9,9,9,9,11,11,11,11,0,0,0,0,0,0,0,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,13,13,13,13,12,12,12,12,15,15,15,16,16,16,16,17,17,17,17,0,0,16,0,0,17,0,0,10,10,10,13,13,13,12,12,0,10,15,15,15,15,16,16,16,16,17,17,17,17,0,16,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,1,5,6,6,6,6,7,7,5,7,8,8,8,8,9,9,1,9,11,11,11,11,0,0,0,0,0,0,0,0,14,14,9,14,0,0,0,0,0,0,7,0,0,0,0,0,10,10,10,10,13,13,13,13,12,12,12,12,15,15,15,15,16,16,16,17,17,17,17,0,0,0,0,0,0,15,10,10,10,10,13,13,13,12,0,15,15,15,15,16,16,16,17,17,17,17,0,0,0,0,0,17,0,0,1,1,1,1,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,11,11,11,11,0,0,0,3,0,11,11,0,14,14,14,5,11,0,0,0,0,0,0,0,0,0,0,0,10,10,10,13,13,13,12,12,12,12,15,15,15,15,16,16,16,17,17,17,17,0,0,0,0,0,0,0
There's nothing over 17 and values above about 9 don't seem correct. Using a Sony TV remote shows the same thing, nothing above 17 and lots of duplicates.
It's difficult to see where this could be a code problem, could it be hardware? I'm low on capacitors in both the transmit and receive circuits.
Could it be the transmit sending the wrong code or the receive misinterpreting what it's sent? I'm hoping it's the receive because the plan is to use a different micro for the receive.
Incidentally the overall plan is to use an 08M2 with an electronic compass module and an IR transmitter to work out the position of an astronomical telescope dome and send it to the controller. The compass seems to be working, now I need to get the IR transmitter going.
And this could be my first post. I seem to have been an inactive member for years but recently discovered the new PicAxes, they look really nice for rapid development.
Chris Rowland