IR remote control

Hello,
I am trying to read some remote control I have(TV remote).
I am tried to use code from this topic :
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1176098434/0 (the second code exactly)

I have several problems:
First of all its working only with one of the 3 remotes I tried(the oldest one) and the results wasn't constant. Secondly one time I got 10 and after that 2 (on the same button).

I don't have oscilloscope but I think its connected to the size of the data package I get from the remote (8bit,32 bit etc.) I think that because after I press a button from the oldest remote and then on one of the newest remotes I get a value.

Any one can help me here?

Thank you and sorry about the English mistakes.

The following may help...

You don't have to have either a nuelectronics board or a TSOP1838... the things in the tutorial will apply to other environments.

Thank you, it was very help full.
Still several problems.

when I press 2 for example its show me 802 or 2 randomly(3 or 803 , 4 or 804 etc.).

And still one of the remotes(the newest) doesn't work(the one I really need).

Thank you for your time.

Have you tried this app to measure the pulses?

I know I've seen a posting in the "Exhibition" or "interfacing" section of the forum from someone who did a similar application. It might be the same one, though.

when I press 2 for example its show me 802 or 2 randomly(3 or 803 , 4 or 804 etc.).

Could it be that the remote sends one code when you press a button, and that code + 800 when you release it?

when I press 2 for example its show me 802 or 2 randomly

Annoying... and my solution takes away the pleasure of having done something "properly"... but if one or the other is a rare interpretation, couldn't you just ignore the mis-read (or is it mis-send?) events? You might, in software, want to implement an "only act if you see the signal twice" guard- against- false- reads anyway.

Some problems are more trouble to solve than they are worth, if there's a way around them.

As for the remote that doesn't work: Forgive a "silly" question, but it IS sending something, isn't it? Does it work with anything, e.g. whatever appliance it came with? (Look at it with a cheap webcam... they can often "see" IR. (Try one of your "known working" remotes with the webcam you have to hand)

There are other modulation schemes... and I'm not talking the encoding. Even mildly "fancy" IR detectors meant for remote controls only "see" IR light if it is "buzzing" at a particular frequency. (This to make them "blind" to miscellaneous sources of IR). Your sender maybe "tuned" to a different "buzz".

I'm familiar with the 2, 802 thing. It alternates every time between two numbers so that the TV knows that you are pressing the button again and not just holding down the button. If you want to do something every time you press 2 then say if (input == 2 || input == 802){

Here is a link to an interfacing project
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1279084882

It uses an infrared library that is good for decoding different remotes. It might work with your other two remotes.
You can download the IR library here: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
The library will automatically decode most remotes.

If it doesn't automatically decode the remote and you want to deal with the raw data coming in you can also use that library. There is an example on doing that on 'step 3' of this page:

If you want to also send IR signals this project uses the same library:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277840151