Your Universal Remote Control Center
RemoteCentral.com
Custom Installers' Lounge Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
converting binary to an IR code
This thread has 7 replies. Displaying all posts.
Post 1 made on Tuesday January 6, 2004 at 02:24
brucese
Long Time Member
Joined:
Posts:
January 2004
35
Thule products use RC5 code, with 38kHz transmission rate and 950nm IR receiver. I have system address bits of 10100 and command address bits of 101101. How do I convert this data to an IR command? Is there more I need to know / supply?

Thanks,
Post 2 made on Thursday January 8, 2004 at 01:02
jarmstrong
Founding Member
Joined:
Posts:
March 2002
1,780
Most all Pronto's understand the RC5 database command format. In this case ithe command is:

5000 0000 0000 0001 0014 002D

10100 binary = 20 decimal = 14 hex => 0014

101101 binary = 45 decimal = 2D hex => 002D

You can use Microsoft Calculator View|Scientific to make those conversions.

Post 3 made on Thursday January 8, 2004 at 16:51
grengrad
Long Time Member
Joined:
Posts:
December 2003
52
Single Character at a time conversion is
Binary = Hex = Decimal
0000 = 0 = 0
0001 = 1 = 1
0010 = 2 = 2
0011 = 3 = 3
0100 = 4 = 4
0101 = 5 = 5
0110 = 6 = 6
0111 = 7 = 7
1000 = 8 = 8
1001 = 9 = 9
1010 = A = 10
1011 = B = 11
1100 = C = 12
1101 = D = 13
1110 = E = 14
1111 = F = 15
---^ This slot represents its value times 2 to the 0th power (1*2^0) or (0*2^0)
--^- This slot represents its value times 2 to the 1st power (1*2^1) or (0*2^1)
-^-- This slot represents its value times 2 to the 2nd power (1*2^2) or (0*2^2)
^--- This slot represents its value times 2 to the 3rd power (1*2^3) or (0*2^3)
ETC....
So in the case of 1101 you have 2^3+2^2+0+2^0 Which solves for 8+4+0+1=13 IN DECIMAL OR D IN HEX

0101 0000 0000 0000 0000 0000 0001 0100 0000 0000 0010 1101 = 5000 0014 002D
Also, as said above... if you have a partial block of binary code like 101101 that really means 0000 0000 0010 1101 Which converts the same way
0000>0 0000>0 0010>2 1101>D for 002D.

This message was edited by grengrad on 01/08/04 17:23.
Post 4 made on Thursday January 8, 2004 at 22:49
tikiguy
Lurking Member
Joined:
Posts:
December 2003
5
Please keep me posted if you come up with a solution for your problem. I have a tsu 700 and a thule PR250B that I can not get to work correctly.

Thanks,

Guy
OP | Post 5 made on Friday January 9, 2004 at 00:01
brucese
Long Time Member
Joined:
Posts:
January 2004
35
I'll keep you up to date.

On 01/08/04 22:49, tikiguy said...
Please keep me posted if you come up with a solution
for your problem. I have a tsu 700 and a thule
PR250B that I can not get to work correctly.

Thanks,

Guy
OP | Post 6 made on Friday January 9, 2004 at 11:19
brucese
Long Time Member
Joined:
Posts:
January 2004
35
Everything works fine using a Pronto TSU3000. However, when I use these same strings with an RTI T2, I receive a message stating "Unknown code type detected". Is there a way to change this string into something that an RTI will understand (without manual learning them from the Pronto)? Tikiguy, I sent you an email with the Thule link and also some codes for source selection on the PR250.
Post 7 made on Friday January 9, 2004 at 18:37
jarmstrong
Founding Member
Joined:
Posts:
March 2002
1,780
The RTI TT does not convert database format commands only the learned format. In addition to an extra step, that means that RTI TT can't do a toggle bit without using some workaround.

The toggle bit (in RC5,RC6 and a number of European IR protocols) is usually one bit that changes polarity each time you press and release a button. This is a problem if you want to program the SAME succesive key in a macro. Programming Channel 222 will require 2(T=0),2(T=1), 2(T=0). If the commands are different it dosn't matter what the toggle state is.

To generate RC5 commands in the "learned format" or Pronto codes starting in 0000 or 0100, use John Fine's MakeHex [Link: remotecentral.com]

Unzip everything into one directory. Rename the file RC5.irp to RC5-old.irp and add this this one:

'*********************************************
Device=0
Function=0..127

Protocol=RC5
Frequency=36000
Time Base=889 '888.89 = 32 cycles at 36Khz
Message Time=113778 '128 times TimeBase of 888.89
Zero=1,-1
One=-1,1
First Bit=MSB
Form=;1:1,~C:1,T:1,D:5,E:6

Define=C as F(6..6)
Define=E as F(0..5)
Define=T as 0 'For the Zero toggle state, 1 for the One toggle state

'this has been modified to do all 128 commands
'*********************************************

Copy everything between but not including the asterisks and paste into Notepad. save AS , All Files,
RC5.irp in the directory where everything else was unzipped.

To use it read the readme, but there are only three statements to be modified all in DECIMAL:

Device=20
Function=0..127
Define=T as 0

will produce all 128 commands (with T=0) or you could change to:

Function=45..45

To create only the command above 5000 0000 0000 0001 0014 002D but in “learned” format.

If you need the same command (s) in two different toggle states, then change T=1 and re-run.

-Jon







This message was edited by jarmstrong on 01/09/04 20:49.
OP | Post 8 made on Sunday January 11, 2004 at 02:34
brucese
Long Time Member
Joined:
Posts:
January 2004
35
Everything is working great. thanks all.


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