go_away

Author Topic: Decoding IR  (Read 1200 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain_TunaTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Decoding IR
« on: September 10, 2008, 10:44:35 AM »
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 :)

Offline Superman

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: Decoding IR
« Reply #1 on: September 15, 2008, 06:55:03 PM »
I don't have one of these boards (or any microcontrollers yet, for that matter), but here's my guess...

I believe it is a mistake to believe that the "time" variables indicate milliseconds.  When he pauses for "20", I don't think that's 20 milliseconds.  It's 20 units of however long a "delay" is.  What you need to know is, "how long is a delay?"  Perhaps the documentation for that micro-controller can answer that.

Superman

Offline Captain_TunaTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: Decoding IR
« Reply #2 on: September 18, 2008, 12:43:22 PM »
the PAUSE command works with milliseconds, i'm 100% sure about that

 


Get Your Ad Here

data_list