Pages: [1]   Go Down
Author Topic: IRDA Stack  (Read 958 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys, i am implementing the IRDA stacks... i have downloaded documentation from www.irda.org 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:
Code:
DATA
    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...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Show Your Work
Offline Offline
Edison Member
*
Karma: 14
Posts: 1072
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I have only come here seeking knowledge. Things they would not teach me of in college.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 603
Posts: 33387
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: