| ??? 01/09/01 21:01 Read: times |
#8044 - RE: for Daxx teryn |
Daxx,
To keep things simpler, I really recomment you to connect the IR-receiver DIRECTLY to an I/O pin of the microcontroller, NOT via 8255 !!!! Things are difficult enough to not do it via the 8255. And, at first, try to do a project with only remotes of a certain kind, for example the previous mentionend RC-5. I did some routines on that and it is not THAT simple. In RC-5 (Philips) coded remotes, bits are represented as biphase modulated. (I think many IR systems are...) You can use the timer method to determine the bit time, and than you can sample the incoming pulses at a quarter of the bit time. When a quarter of the bit time is done, read the I/O-pin. Store the value. After 3/4 of the bit time, read the I/O-pin again. The value has to be the opposite of the previous value read. If not, you are out of sync, reset your routine and try again. If o.k., read the next bit. Using this method, you can read all RC-5 bits AND you are sure they are VALID (two reads per bit, the two reads have to be each others complement). Really, you don't have to do RC-5, but I strongly reccomment to experiment with ONE kind of remote first before you do universal decoding. If you are experienced a bit, you can try the universal thing :) Success, Henk |



