IRIN ignoring certain codes?

RonCzap

Member
I have an old SONY camcorder remote (RMT-811) that I am trying to use with a Panasonic PNA4601M IR receiver using the IRIN instruction.

All of the buttons work except four which, when tested using a Basic Stamp, returned values of 42,32,43 and 44.
The four buttons are enclosed in the "memory" framed area on the image below.

Does anyone have any ideas why this is happening?

Thanks,
Ron




RMT-811.jpg
 

inglewoodpete

Senior Member
The PICAXE IR decoder was designed around the Sony TV controller - as described in Manual 2. The firmware is expecting a limited number of code from the TV controller.

However, you are trying to use a camcorder remote. By chance, some of the codes match the TV codes - you've found them. You're lucky.

If you can get your hands on a Sony TV remote handpiece, the PICAXE will be able to detect most of those.

(I have a more modern Sony TV and all of the common functions are detected by the PICAXE. Some of the more modern features like the Wegagate button are not detected.)
 

erco

Senior Member
The SIRC protocol has both key codes and device codes. Parallax's standard Stamp routine completely overlooks the device code, and your results show that it reads your Sony camcorder remote just fine. Apparently the PicAxe is a bit more discriminating.
 

RonCzap

Member
Thanks for the information. I'm not well versed in the SIRC protocol but I figured that the IRIN instruction was only handling a limited set of codes.

I am grateful that most of the button codes are detectable since the remote is a compact size and should be useful.
 

crowland

Member
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
 

RonCzap

Member
crowland,
What IR dector are you using? I am using the Panasonic PNA4601M and using the circuit on page 125 of the picaxe_manual2 except I omitted the 4.7uF capacitor.

I get values ranging from 21 to 107



Code:
#picaxe 20m2
#no_data
#com 4
#terminal 4800
main:
  irin [1000,main],B.7,b0 ;wait for new signal
  sertxd (#b0,cr,lf)
  if b0 = 27 then swon1  ;switch on 1
  if b0 = 26 then swoff1 ;switch off 1
  goto main
swon1: high B.1
  goto main
swoff1: low B.1
  goto main
 

erco

Senior Member
Chris: What happens if you use the newer IRIN command instead of INFRAIN, and use variable B0 instead of "infra", as Ron's code did?
 

crowland

Member
It won't compile with irin, I'm using an old 28X PicAxe. I should have said, the transmitter is an 08M2, the receiver a 28X. I'll try with a second M2 for the receiver.

Chris
 
Top