Your Universal Remote Control Center
RemoteCentral.com
Discrete Code Hunter Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
convert 'long hex' from makehex to short hex code (like LIRC)
This thread has 5 replies. Displaying all posts.
Post 1 made on Monday August 30, 2010 at 15:15
thebeast
Lurking Member
Joined:
Posts:
August 2010
4
I feel that this topic will make people groan because i get the impression it comes up a bit but I really have tried to sort this out and I can't find the answer. The problem is this:
I've got a long hex code (pasted below) that I know from others' posts is the discrete code for 'ext 1' for my Samsung TV. Trouble is that the system I use (an arduino chip programmed to control an IR led) needs to know the 'short' hex code - like the ones used by LIRC. (For example the 'toggle power' is E0E040BF). Can anyone help me with how to convert from the long code below to a short code like that?

Thanks,
Ben

Code:
0000 006D 0000 0022 00AC 00AB 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0016 0015 0689
Post 2 made on Monday August 30, 2010 at 18:29
3FG
Select Member
Joined:
Posts:
August 2009
1,861
Here's one way: Download IRTool.exe , and paste the Pronto Hex format into it.  Click Decode Hex.

Power Toggle in Pronto Hex format is:
0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e
These numbers are mostly time durations of on and off.

IRTool decodes the numbers as Device =7.7  and OBC (function code) = 2.  Ignore the EFC number.  The IR protocol is NECx2.

Using the DecodeIR.html document in the IRTool distribution, we see that NECx2 is arranged as Device.device+Function code+ complement of the function code  (see the "D:8,D:8,F:8,~F8" in the IRP notation?).  The next thing to understand is that LIRC sends the bits in reversed order to the way device and function numbers are expressed in IRTool.

So device 7 is
0000 0111    0x07  (Hexadecimal notation)
1110 0000    0xE0  (bit order reversed)

Function 2 is
0000 0010    0x02
0100 0000    0x40 (bit order reversed)
1011 1111    0xBF (complemented)

So D:D:F:~F is
E0E040BF    (This is the converted code)

The LIRC executor will convert these device and function numbers into durations according to the first part of the IRP specification "38.4k,564}<1,-1|1,-3>".   Of course other IR protocols will require a different procedure.
OP | Post 3 made on Tuesday August 31, 2010 at 08:59
thebeast
Lurking Member
Joined:
Posts:
August 2010
4
Thank you very much, 3FG I shall give it a whirl. Ben
Post 4 made on Tuesday August 31, 2010 at 09:31
Duct Tape
Loyal Member
Joined:
Posts:
November 2008
5,295
 cool, that is a great explanation for dummies like me :)
[Link: facebook.com]
Post 5 made on Friday April 21, 2017 at 19:10
Lesalerno
Lurking Member
Joined:
Posts:
April 2017
2
Hi How are you?

Is there a software that make this?

Convert to short code.

And is there a short code database?
Post 6 made on Saturday April 22, 2017 at 11:20
mdavej
Active Member
Joined:
Posts:
December 2002
627
A lot has changed in the 7 years since the last post in this thread. Makehex is obsolete. IRScrutinizer will do all sorts of conversions. Start with that.

There is no short code database. Short codes are limited to just RC5/6 and NEC protocols, making it pretty useless IMO.

[Link: hifi-remote.com]


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse