Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] IR Protocol

2006-11-15 by Ned Konz

Kathy Quinlan wrote:
> Hi all,
> 
> I have a few questions regarding IR remotes for TV / VCR etc.
> 
> I have a product that has IR interface but no Serial port, so I am 
> trying to design an adapter from RS 232 - IR, but my problem is I have 
> never played with IR.
> 
> I know the carrier is 38KHz, I have some hardware working for Rx with my 
> PC and some spare remotes to play with, but I am not sure if this is RC5 
> or not (how do I tell ? (I am playing with WinLIRC, but it does not say 
> what the protocol is, just that it is a 64 button remote))
> 
> Any pointers to get me started would be great :)
> 

Typical IR controls send different codes for each button. If you can 
receive raw bitstreams you might just try coming up with an encoding 
that can encode all the bitstreams corresponding to the buttons you need 
to have pressed.

I would tie the output of the IR receiver to your DSO input and just 
record the various button codes. Then analyze them on the PC.

I've even used straight phototransistors (with a collector resistor) and 
a bit of black tubing to analyze IR transmitters.

As far as the protocol, you can sometimes tell by the number of bit 
periods, the number of start bits, etc.

However, if you have a single product to do this on you might just be 
better off recording the bitstreams, expressing them as numbers (perhaps 
numbers of cycles of 38Khz) and then putting them into a lookup table in 
flash. This might well be faster than understanding the protocol and 
coding it.

Factor out the common prefix/suffix, of course (there's always a burst 
of start bits, for instance).

One button might be encoded as something like:

{20, 10, 40, 38, 23, 0}

where the first number is number of "1" pulses to send, the second is 
number of pulses to pause, etc. and 0 marks the end.

As I recall, Dr. Dobbs (or was it Embedded Systems?) some years ago had 
a good article on an encoding scheme for infrared codes (for a universal 
remote); this had some good background info.

Also see:
http://pd.pennnet.com/display_article/247261/21/ARTCL/none/CONS/Design_of_universal_IR_controllers/
http://www.innotechsystems.com/primer1.pdf

-- 
Ned Konz
ned@bike-nomad.com
http://bike-nomad.com

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.