I'm really just getting my feet wet when it comes to IR protocols and IR codes in general, so my knowledge and understanding may be a bit shaky here.

I am a programmer and am trying to create a tool to convert Pronto Hex codes to RAW IR pulses. To do this I'm trying to understand the process manually. I'm testing this with an IR blaster app on a specific device.

What I have so far is the result of lots of searching, playing around with tools and piecing things together.

Considering the following HEX code:

0000 006E 0011 0006 0012 0052 0014 0051 0014
0051 0014 0051 0013 0052 0013 0052 0024 0051
0014 0031 0014 0052 0023 0052 0034 0051 0014
0051 0014 0052 0013 0052 0013 0052 0014 0051
0014 0632 0154 0051 0014 0CE5 0154 0051 0014
0CE5 0154 0051 0014 0CE5

Here is pseudocode of what I have

I know the first set, "0000", indicates it's raw oscillated code. I believe the second set "006E" indicates the frequency for the code and can be converted to khz via:

freq = 1000000 / (toDecimal("006E") * .241246)

I know that the third and fourth sets of codes have to do with the sequence lengths.

I know the rest of the sets can be converted to pulses in microseconds with the following, using "0012" as an example

microSeconds = 1000000 * toDecimal("0012") / freq

So "0012" would be (rounded) 478. So, applying the above to the full code and separated with commas I end up with:


When I test this out with an IR blaster I don't see the device I am trying to control respond. However if I prepend the opening pulses for NEC protocol 9000,4500 I get a response from my device.

My questions are - Could someone tell me if I am on the right track here? How would I discern from the HEX code that I needed to use the 9000 on 4500 as the opening pulses? Any input/advice would be really appreciated, as I've said I'm just getting my feet wet here. Thanks much!


1 Answer 1


I just recently picked up on IR also, and am trying to control my device with the IR blaster on my phone and not it's remote. All I have is an ir sensor and output of time between pulses. ( I decoded all for a 32 bit code, but that doesn't start at Header)

I guess really to answer your question is that it is not the actual pulse of infrared being measured. The distance between each pulse is what is important. Every pulse is 560u except the first one is 9x longer. This is why it always starts with 0000. A binary 1 comes from a longer "wait time". 560u pulse the time until the next pulse (total 2.25ms) and 0 from a shorter (1.125, half of a long pulse) http://www.hifi-remote.com/infrared/IR-PWM.shtml and most helpful http://www.remotecentral.com/features/irdisp3.htm

also from further research I realize pronto hex is not the same as NEC sorry but I think your problem lies in your third and fourth word 0011 0006 are saying how long bursts 1 and 2 will be. Their decimal value is how long bursts 1 and 2 are, and yours adds up to 23. But I didn't count your code.(I keep editing) Your code adds up to 21, as it should. Change your 0011 0006 to 0000 0015

Also working on bits 5,6


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.