irin with SIRC15

looking

New Member
Hello,

I have a remote control that sends Sony SIRC15 protocol. PICAXE command irin expects SIRC12.

As far as I understand, SIRC15 has 3 bits more in the device code (or address) at the end.

With my example code shown below, the received IR code changes between 3 values:
24 (00011000)
76 (01001100)
102 (01100110)

24 is the correct code.

Can you please explain, how irin command works internally?
Is the startbit checked for correct timing of 2.4 ms? Then I would suppose that the 3 extra bits at the end should not care and simply could be ignored by irin. But that is not the case.

Thanks.

Code:
#picaxe 14m2

main:   
   gosub check_IR
    goto main

check_IR:
   irin [1000,check_IR_end],C.0,b0    ; wait for new signal
   sertxd("IR: ", #b0,cr,lf)
check_IR_end:
return
 

hippy

Technical Support
Staff member
I don't know what the internal algorithm is but would have expected it to wait for that 2.4ms header before simply clocking bits in, would also have expected the final three bits to simply be lost.

That it is not giving consistent results for the same input suggests something else may be going on. It could be an unreliable signal or perhaps the signal is inverted ? What IR receiver chip are you using ?

It is possible to read SIRC, 12, 15 or 20-bit, using PULSIN so it might be worth trying that, seeing what results that delivers.
 

AllyCat

Senior Member
Hi,

Although the PICaxe IROUT command transmits 12 bits, the IRIN command only decodes 7 bits (AFAIK of the "TV" mode). To overcome this, I recently devised a "bit-banging" receiver code which decodes all 12 bits in THIS CODE SNIPPET. It probably could be expanded to 15 bits, but no further, because that would exceed the capacity of a single Word variable. There are also threads on the "NEC" IR format, which uses around 32 bits, that makes it significantly more complex to receive.

Cheers, Alan.
 
Top