|
|
|
Custom Installers' Lounge Forum - View Post
|
|
|
|
|
|
|
The following page was printed from RemoteCentral.com:
converting binary data to hex
| |
|
Topic: | converting binary data to hex This thread has 4 replies. Displaying all posts. |
|
Post 1 made on Friday January 28, 2005 at 01:43 |
malcolm81230 Lurking Member |
Joined: Posts: | October 2003 8 |
|
|
I am trying to convert binary data from a Antex Triple play sirius piece into hex codes to use on a Sonance K2 keypad, if you can help it would be greatly appreciated.
IR command Binary Data(D0, the LS bit shown to the left and sent first)
Zone 1 = XM1 000100
Zone 2 = XM2 100100
Zone 3 = XM3 010100
1 000010
2 100010
3 010010
4 110010
5 001010
6 101010
7 011010
8 111010
9 000110
0 100110
PRESET 111100
SELECT 110001
UP ARROW 101110
DOWN ARROW 011110
LEFT ARROW 100001
RIGHT ARROW 010001
POWER TOGGLE 001110
POWER ON 011100 (not supported yet supported on SRX-3)
POWER OFF 011000 (not supported yet supported on SRX-3)
|
|
Post 2 made on Friday January 28, 2005 at 12:55 |
Jeff Wagner Founding Member |
Joined: Posts: | January 2002 368 |
|
|
converting decimal to hex is pretty easy - you can use a number of online conversion calculators like the one below: [Link: ronshardwebapps.com]But I don't know if that is what you need - I don't work with Sonance at all so I don't know how their software can create IR commands from a simple hex code. RC5 would need an address number - I can't say whether you'll have enough data here to make this work. Maybe Eric Johnson will chime in and lend his Oracle-like insight. Jeff
|
|
OP | Post 3 made on Monday January 31, 2005 at 10:33 |
malcolm81230 Lurking Member |
Joined: Posts: | October 2003 8 |
|
|
Thanks Jeff, What a cool resource, it did'nt give me a hex code that would work, but thanks again. Maybe Eric will see this and respond, Pease Eric, Oh great one.
|
|
Post 4 made on Thursday February 3, 2005 at 03:35 |
davehk Long Time Member |
Joined: Posts: | March 2003 123 |
|
|
You may already know this (in which case sorry to state the obvious) but...
One of the problems might be the bit ordering - let's take the select command 110001:
First of all, to convert to 2 hex digits we need 8 bits. So we pad the MS end with zeros: 11000100
Now, if you just put that into a binary-hex converter you will get 0xC4 since the converter will assume the left hand end is the most significant. So you need to enter it backwards: 00100011 = 0x23
With some software you need to swap the nibbles:
110001 pad to give 11000100 reverse to get MSB on LHS 00100011 then swap nibbles 00110010 =0x32
|
|
Post 5 made on Thursday February 3, 2005 at 14:49 |
Westie Founding Member |
Joined: Posts: | August 2001 106 |
|
|
On 01/28/05 12:55 ET, Jeff Wagner said...
converting decimal to hex is pretty easy - you can use a number of online conversion calculators like the one below: [Link: ronshardwebapps.com]the calculator included with Windows will aslo do all of these conversions.
|
|
|
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.
|
|
|
|