Hi Iuri,
If you have IRM2638, please note that its carrier is 36.7 KHz.
I hope you got its datasheet.
Its application circuit is very simple if interfaced with uC.
A simple RC filter for its supply pin Vcc and a pull-up resistor at its output pin.
When no signal is received, pin (Out) stays high.
If you can generate 36.7 KHz (as an experiment) using 555 for example (it doesn't matter if the duty cycle is not exactly 50%) and you let this signal drive an IR LED (with a limiting resistor in series), the RX Out pin will be low while it is receiving it (this can be checked by a voltmeter).
The fun starts when you will send your data (1's and 0's) the way you like. For example, during transmission you send a string of 36.7KHz pulses, say for 600us at different intervals. One interval could be 600us of silence (no IR output), another one might be 1200us. If the uC is interrupted at the falling edges, its timer will count 1200us for the first interval and 1800us for the second one. Usually it is better to start with a relatively long starting pulse to help the IR receiver to synchronize with the carrier and to inform the uC that a new package is being sent. This pulse could last for 9,400us for example followed by a 600us of silence. So between the first two falling edges the timer counter should be 10,000us (actually we allow some +/- 10% as a margin if not more). Then the following detected intervals will tell us if the data received ares 1's or 0's. For instance, it is better to set in advance the number of bits that will be sent after the starting long pulse so that the uC can end the receiving loop at time.
Obviously there are encoder/decoder pair ICs in the market. The encoder converts the press of a key to a specific stream of 1's and 0's. At the receiver, the data stream is read and checked, if valid the appropriate output is activated. In this case, one has to check (using an oscilloscope) that both ICs are biased to have the same time for the intervals. The time is usually set/adjusted by a resistor.
Kerim