brusque@HotPOP.com wrote: > Hello, > > I'm doing some R&D about learning remote controls and I'm > intrigued with how do they *learn*. > > 1) They recognize the IR protocol used (RC5, Hitachi, Sony etc) > and put the kind/address/command (for each programmed key) values on a > table? > Rarely. > 2) Or do they record the pulses/spaces duration and just replay it > when the "learned" key is pressed? > yep. > The first method uses very little (flash/ram) memory but it's hard > to implement. Also, it does have the disavantage of on't working when > one uses a remote control that uses a protocol different from the ones > implemented. > The product would be quickly useless, as new codes came out. > The second method is simple to implement, but would use a lot of > memory for recording all the learned codes. No it doesn't. The algorithm is to simply count how long it was HIGH, then count how LONG it was low, and store those values, not the actual code. This compresses the data about 80%. I designed one, sampling at 50uS. Almost every RC5 code could be stored in 30 bytes/code. Good luck! --Bob > > > Best regards, > > Brusque -- Note: To protect our network, attachments must be sent to attach@engineer.cotse.net . 1-866-263-5745 USA/Canada http://beam.to/azengineer -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist