loading

How to convert IR hex codes to IR time codes for TV-B-Gone?

Hi,

I was trying to add an IR code to the TV-B-Gone library since it was not able to turn off one of my TVs, so I found the code I needed/wanted to test here (http://www.remotecentral.com/cgi-bin/mboard/rc-discrete/thread.cgi?6824) however the code formating is not the same as the formatting in the TV-B-Gone library.

For example, a power code on the site is in hex:

0000 006b 0022 0002 015b 00b1 0014 0018 0014 001a 0012 0019 0013 0018 0016 0017 0014 0018 0013 0044 0013 0018 0015 0042 0014 0043 0014 0043 0014 0043 0013 0043 0015 0042 0014 0018 0014 0043 0014 001a 0012 0043 0016 0042 0013 0043 0015 0042 0014 0043 0014 0043 0016 0016 0014 0042 0014 0019 0015 0017 0014 0018 0014 0018 0014 001a 0012 0018 0014 0043 0015 061a 015b 0059 0014 0e93

but a code in the TV-B-Gone library is not:

const struct powercode sonyCode PROGMEM = {
  freq_to_timerval(37470), // 37.47 KHz 
  {{245, 60},
   {123, 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {61 , 60},
   {61 , 60},
   {61 , 2759},
   {245, 60},
   {123, 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {61 , 60},
   {123, 60},
   {61 , 60},
   {61 , 60},
   {61 , 60},
   {61 , 0}// end of code

and I was wondering if there was a way to convert the hex codes into codes usable by the TV-B-Gone library?

Any help or tips would be appreciated, thanks.

g-one3 years ago
I fear it's not possible for your examples.
Not only that you have to convert the hex values but also each manufacturer has an own encoding (sometimes even different encodings for each of their device types).
Following your link I found the hex values are for Toshiba TV while the struct you quoted refers to a Sony device. I'm virtually certain that both codes are absolutely incompatible.
psp3601 (author)  g-one3 years ago
The codes I listed were just examples of the way the codes are stored, I realize that they are two different brands, I just put them up there to show what the structure was for the site and the TV-B-Gone.

I've posted the TV-B-Gone code library on pastebin if it helps. http://pastebin.com/26yrT3s1

Thanks for the reply!
g-one psp36013 years ago
My knowledge isn't good enough. I would need one of the structs of your lib together with an exactly corresponding hex code to figure out how it could be converted.
Although that link should give you an idea of how the data is structured.
http://www.hifi-remote.com/infrared/IR-PWM.shtml