John Payson wrote >I'd suggest using something like an interleaved 3-of-6 code: > >Every six on/off cycles encodes a byte (or if you want to push things, >one of 400 states). Three of the on pulses are longer than the other >three pulses, and three of the gaps are longer than the other three >gaps. To receive the data, store the lengths of the received pulses >and gaps, and look for the longest three of each. i was going to write for some details but i figured it out. the nice thing is, as pointed out, that precise pulse lengths are not so critical. identify the numbers of the 2 longest "on" pulses. there are 20 different combinations of the 2 items selected out of the 6 pulses. fastest decodong would be a table lookup i am betting. same thing goes for the gaps. so 20 different "on" decodes and 20 different "off" decodes represents 400 different states. but... unless the bytes are coming steadily, there are really only 5 gaps... and picking 2 or 3 longest can only identify 10 different combinations, giving only 200 codes. not quite a bit short. and if the bytes are coming packed in time, how do we tell where one starts and the other ends? so maybe for IR data transfer use interleaved 3-of-7? -- rob