Let's Make Robots!

Decoding IR without INFRAIN

hi guys!

i need some help from you guys. I have found this page, and it has really helped me a lot: http://www.world-educational-services.net/PICAXE%20Infra-Red%20Interfacing.htm

 what i wanna talk about today is the "Decoding without INFRAIN or INFRAIN2", where the author of the page is trying to decode the IR signal coming from his sony remote. Above this is an explanation of how the Sony protocol works.

 But i really don't get a few things about the decoding he's doing.

let's start from the bruteforceinfrain2 sub. First thing he does is check if the start is long enough. And that's ok.

-1- But then he pauses for some 20ms, which i don't understand why. If you go check in the protocol, it says that the pause between the "start" byte and the command is 0.6ms, then why does he pause for so long?


At the end he does this strange thing: b0 = b0 / 80, bit1= b1 / 80 etc....

-2- what i thought was: he's actually trying to make those pulse lenghts become 1s or 0s, so if the pulsin value was bigger than 80 it was a 1, if smaller then it would be a 0. But why 80?....

thanks for helping :) 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I could be wrong on that first part about it waiting for a repeat...

Another thought, b0 is there twice. where the first one is the start pulse, replaced by the actual bit value that you are expecting for the second b0...(puls)

that would seem to make sense....

i have tried transmission between two microcontrollers and it works fine, with my own protocol though. I have tried that code but i don't get clean results, but no wonder, i am not using SONY protocol :) 

As for the signal to be repeated, you actually mean that he ignores the first signal that the source is sending? Wierd, why would he want to do that?

I was actually going to be doing some experimentng on this code, if I find anything out, I'll post the info and code I used.

 1. he might be waiting for the signal to be repeated.

2. might just be an arbitrary number. The value you get is pretty clean 1.5 or 0.75 so 1/0 works.

Have you tried anything with the code yet?