Isn't this getting too complicated? Perhaps it's simply because there is a good amount of words I don't know the meaning of. How do I make it so that the receiver measures the length of the pulse? Is there and easier way?Not sure, because of the lack of the use of a ucontroller. In IR controls, the "length of the pulse" determines if it is interpreted as a 1 or a zero. The length is, I thin, the length of time the carrier is on.
From there, the better protocols use a carrier burst as a start bit so the receiver (TSSOP) module can adjust it's gain. Then you have the protocol definition. Lots of commands/devices can be controlled this way
Using the wrong magnitude of the units as an illustration: 1 sec burst toggles device A, x, a 2 second burst toggles device b... a 10 sec burst toggles device 10.
or, a frequency of 500 Hz, 750 Hz, 1000 Hz does the same sort of thing.
The carrier (38 kHz) is being turned on and off in a predictable manor.
Here http://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol is a little example of what makes up the NEC IR protocol.