Sending IR Hex code over a wire without carrier frequency

Does anyone know of a way to send a NEC IR hex codec without the carrier frequency?

I want to couple a digital picture frame type module to the Arduino. The Arduino will send the request to play videos based on the input of the user and programming. The problem I am having is that the video module gets confused by the frequency within the signal.

Any help would be greatly appreciated.

I don't know of any IR remote that doesn't use a carrier. Are you saying that you have such a device or are you trying to bypass the IR receiver on the device to feed the demodulated signal directly to the electronics?

You have not clearly explained the problem or your set up.

Please provide more details...code..circuit etc model numbers etc.

If you want the raw, unmodulated pulses you can borrow code from the IRremote library:

// pulse parameters in usec
#define NEC_HDR_MARK	9000
#define NEC_HDR_SPACE	4500
#define NEC_BIT_MARK	560
#define NEC_ONE_SPACE	1600
#define NEC_ZERO_SPACE	560
#define NEC_RPT_SPACE	2250

#define TOPBIT 0x80000000

const int OutputPin = 11;

void sendNEC(unsigned long data, int nbits) {
  mark(NEC_HDR_MARK);
  space(NEC_HDR_SPACE);

  for (int i = 0; i < nbits; i++) {
    if (data & TOPBIT) {
      mark(NEC_BIT_MARK);
      space(NEC_ONE_SPACE);
    } 
    else {
      mark(NEC_BIT_MARK);
      space(NEC_ZERO_SPACE);
    }
    data <<= 1;
  }
  mark(NEC_BIT_MARK);
  space(0);
}

void mark(int time) {
  digitalWrite(OutputPin, HIGH);
  delayMicroseconds(time);
}

void space(int time) {
  digitalWrite(OutputPin, HIGH);
  delayMicroseconds(time);
}

Thanks John! When I get a chance I will try this.
Yes, I am bypassing the IR LED and receiver all together. I just want to output the 32-bit hex code on a pin which goes directly (by wire) to the IR connection where a IR receiver would be connected.

Thanks again!

To get this to work, you need to : - change the IR remote library mark & space functions - insert digitalWrites instead of PWM - Take care to invert the logic (IR receivers use inverted logic outputs, so a mark is actually LOW etc at the receiving end) - in the mark function set the pin to LOW & in the space function set the pin to HIGH and leave HIGH when idle. - Ensure that the circuit you are connecting into can take the signal(voltage level) you are injecting.

alternatively, you could just forget IRremote & toggle the output pin directly to match the signal timings - inverted!.

Thanks John! This worked beautifully in a test program and observing the output using Logic. In your program listing you had HIGH for both the MARK and SPACE so I changed the MARK to LOW. Now this should work without an inverter circuit.

This was exactly what I was looking for...a way to toggle the output pin with a hex code rather than with binary. I did not know there was a way to cipher the hex into individual bits.

Thanks again!

Hey, a little late to this post... I´m too trying to bypass the IR receiver and connect a wire directly to the electronic (in this case an RGB led).

I´ve decoded some stuff and it works great when sending thru the IR led.

So let´s say, I´ve decoded that the color red is 0xFF906F (32 bits, I guess thats the 906F...).

The raw code that I´m getting is: "Raw (68): -15634 8900 -4450 550 -550 600 -500 600 -550 550 -550 600 -500 600 -550 550 -550 550 -550 600 -1650 550 -1650 600 -1600 650 -1600 600 -1650 550 -1650 600 -1650 550 -1650 600 -1650 600 -500 550 -550 600 -1650 550 -550 600 -500 600 -550 550 -550 550 -550 600 -1650 550 -1650 550 -600 550 -1650 550 -1650 600 -1650 550 -1650 600"

Please help!!! I would greatly appreciate it...

Ps, I tried the code above but maybe I´m too amateur for this...

I tried the following code and changed the Mark to Low per Cog´s post… the pin 11 of my arduino goes direclty to the third pin connection of the IR receiver… Am I doing this ok?

#include <IRremote.h>

// pulse parameters in usec
#define NEC_HDR_MARK 9000
#define NEC_HDR_SPACE 4500
#define NEC_BIT_MARK 560
#define NEC_ONE_SPACE 1600
#define NEC_ZERO_SPACE 560
#define NEC_RPT_SPACE 2250

#define TOPBIT 0x80000000

const int OutputPin = 11;

IRsend irsend;

void setup(){
}

void loop(){
irsend.sendNEC(0xFF906F, 32);
}

void sendNEC(unsigned long data, int nbits) {
mark(NEC_HDR_MARK);
space(NEC_HDR_SPACE);

for (int i = 0; i < nbits; i++) {
if (data & TOPBIT) {
mark(NEC_BIT_MARK);
space(NEC_ONE_SPACE);
}
else {
mark(NEC_BIT_MARK);
space(NEC_ZERO_SPACE);
}
data <<= 1;
}
mark(NEC_BIT_MARK);
space(0);
}

void mark(int time) {
digitalWrite(OutputPin, LOW);
delayMicroseconds(time);
}

void space(int time) {
digitalWrite(OutputPin, HIGH);
delayMicroseconds(time);
}

I have managed to use the IRremote library to read the NEC RCU code from a 38kHz receiver (TL1838).

The codes for 5 different buttons of a RCU are in the below pattern. Are they meaningful at all?

9CF4FD24 6F2EBE4B 50C04828 C6F964 4347A520

How should I interpret the code? Do I need to convert them back to 32bit NEC code?