Re: 40kHz Infrared Serial Modulation?
- From: David <webreply@xxxxxxxxxxxxx>
- Date: Mon, 16 Jan 2006 23:37:54 GMT
If you are using a UART on a micro controller, you can use software Manchester encoding of the packet to ensure no long runs of "1" occur.
I used the PWM output to produce a square wave (38kHz) sent continuously
to a 4066 input. The TX data then enabled the switch each time a "1" occurred.
To ensure you receiving UART locks on to the signal send a header that ensures synchronization. Some preamble (0x55, 0x55 ...) followed by a sequence that ensures UART sync (0x33,0xcc,0x33,0xcc,0x33) then your data and checksum. (data and checksum are in Manchester format).
If you check out the 0x33,0xcc combination, you will find that the Uart will always be in synch before the last byte .
Your receiver algorithm then waits for either 33 or CC to be received. It then waits for a none CC or 33 to be received (this is first byte of data).
You send each byte a nibble at a time by taking each bit in your data word and transforming it to a "10: if the original bit was a "1" and a "01" if it was a "0". The maximum length of "1" or "0" you can now have is 2 bit periods.
--
Kind Regards
David Huisman General Manager ----------------------------------------------------------------------- ORBIT COMMUNICATIONS Pty Ltd - Wireless Solutions that Work (Telemetry, Control, Monitoring, Security, HVAC ...) A.C.N. 107 441 869
Website : http://www.orbitcoms.com PO Box 4474 Lakehaven NSW 2263, AUSTRALIA Phone: 61-2-4393-3627 Fax : 61-2-4393-3685 Mobile: 61-413-715-986
Rich Grise wrote:
On Tue, 17 Jan 2006 11:21:09 +1300, Terry Given wrote:
Rich Grise wrote:
On Thu, 12 Jan 2006 16:41:49 -0800, redbrickhat wrote:
In the Vishay TSOP32138 data*** the Data Formats are for IR remote controls. Do you think that such an IR receiver could also handle RS-232 data?
For example, in the link below, the TX pin of a PIC's UART is NANDed directly to a 38kHz signal:
http://www.rentron.com/Infrared_Communication.htm
Wouldn't there be some problems with timing if the RS-232 data had a
long line of "1" bits?
"RS-232 data" can't have "a long line of '1' bits". An asynchronous data stream has start bits and stop bits, which if the thing isn't terribly out of tolerance, will resynchronize on every character.
And, technically, "RS-232" defines signal levels and connectors, and doesn't say much, if anything, IIRC, about the data format.
Here's a lucky google hit: http://www.anotherurl.com/library/rs232.htm
Hope This Helps! Rich
wot Rich said.
Hi Rich.
Cheers Terry
Hi!
How was your holiday? Mine was wonderful - I sat at home and didn't have to talk to any relatives. ;-P
Cheers! Rich
.
- References:
- 40kHz Infrared Serial Modulation?
- From: redbrickhat
- Re: 40kHz Infrared Serial Modulation?
- From: Terry Given
- Re: 40kHz Infrared Serial Modulation?
- From: redbrickhat
- Re: 40kHz Infrared Serial Modulation?
- From: Rich Grise
- Re: 40kHz Infrared Serial Modulation?
- From: Terry Given
- Re: 40kHz Infrared Serial Modulation?
- From: Rich Grise
- 40kHz Infrared Serial Modulation?
- Prev by Date: Re: 40kHz Infrared Serial Modulation?
- Next by Date: Re: OT: Joke: Women-only parking lot!
- Previous by thread: Re: 40kHz Infrared Serial Modulation?
- Next by thread: Re: 40kHz Infrared Serial Modulation?
- Index(es):