IRDA Stack

Hi guys, i am implementing the IRDA stacks... i have downloaded documentation from and i have started implementing irPHY layer... the only physical layer that arduino can handle without any other IC is the IrSIR (substantially an UART with very short impulses).

I make some test, and i can send out from any pin the correct sequence of pulses at the correct timing, and this train is correctly detected from a standard irda port on my laptop. I have attached only an IR LED and a resistor to the output pin of my arduino.

On the receiving side, i have connected an IR Transistor, with an NPN transistor that squares the receiving signal... i am trying to detect the incoming pulses but it seems to be too fast... i need your opinion to evaluate if continue with the project or if it is not feasible.

The incoming train, is an asynchronous frame, very similar to an RS232 frame: one start bit (0), 8 bit of data, no parity, 1 stop bit (1);

So if the byte of data is for example 11001100, the train look like this:

    0   1    1    0   0    1    1   0   0    1
    ^                                       ^
    |                                       |
   start bit                               stop bit

IR Beam
   IR            ***                           ***       ***                           ***       ***
 NO-IR        ***   *** ********* ********* ***   *** ***   *** ********* ********* ***   *** ***   *** *********

The 1's bit is not transmitted at all, the 0's is transmitted as a single pulse of 3/16*baudrate duration. Just for clarify, if the baudrate is 9600, the pulse width is 19,53us.

I am using for digital pin 2 for receiving, so i use external interrupt to correctly handle incoming train; i make several test with different alghoritm, but i can't receive correctly the train... i have tried with pulseIn, i have tried directly polling the pin, i have tried to receive every bit with interrupt, but nothing. Any ideas?

Thank you in advance for any help or ideas...

Hey looking for this exact library for a project of mine, any luck with it? Sounds like you were close as of this post.

Is IrDA making a comeback? Is it still relevant to a certain industry? I had almost forgotten about it.

Well I would go for the interrupt method. Why did yours fail? You wern't trying to do too much in it like do a print were you?