[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Serial IR receiver problem



andrew@xxxxxxxxxxxxxxxxxxxx (Andrew Gabriel) wrote:

>In article <1180473056.654760.271510@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
>	Erk <mrman_man@xxxxxxx> writes:
>>> That makes it much worse -- there's no FIFO on the modem signals.
>>> If the application monitors DCD by spinning, then it's not likely
>>> to work with anything else running on the system.
>>> What sort of bit rate is the IR signal?
>>
>> The speed is normally set to 115200 in Winlirc, but I have tried
>> different settings with no luck.
>
>That's the UART's data rate, but this interface isn't using the
>data part of the UART so that's irrelevant. I was wondering what
>the IR data rate is. If it's picking up the IR clock, which is
>commonly ~38kHz, it's going to need to sample at 76kHz, which
>is a sample every 13µs. If it's just being fed a presence or
>absence of IR clock (i.e. the IR data rate), then it's going to
>need to sample something like every 200µs. However, whichever one
>it uses, this just isn't going to work on a non-realtime system
>which is running other applications -- such use of a serial port
>just isn't what they are designed for and a more appropriate
>hardware interface would be required. Feeding it into a sound
>card might work better but would require significant changes to
>the associated software to retrieve the data pattern from the
>sound card.

I wonder why "it has worked very well for many years now."

The TSOP1738 IR receiver module used in the WinLirc device demodulates the
IR and outputs the baseband data. The PC merely needs to measure the
durations of the pulses and spaces in the baseband data (by responding to
interrupts when DCD changes). The data bits usually have periods on the
order of 1-2mS.



comp.home.automation Main Index | comp.home.automation Thread Index | comp.home.automation Home | Archives Home