View previous topic :: View next topic |
Author |
Message |
nurquhar
Joined: 05 Aug 2006 Posts: 149 Location: Redditch, UK
|
IR serial Link ? |
Posted: Sun Dec 28, 2008 8:06 am |
|
|
Is it possible to get a bidirectional IR serial link between two PIC systems
Is it as simple as hooking up an IR Reciever and Emiiter to the TX and RX pins of the PIC's ?
I looked at a Vishay TSOP 36kHz (TSOP1236) Reciever photodiode and it looks to have a simple binary output from its internal amplifier and band pass filter. I guess to make the emitter diode work I would need to modulate the TX signal at 36kHz also. Hopfully feeding the PIC's timer output along with the TX pin into an AND gate would do it
Has anyone done this before ? Is this the way to do it
I was hoping to get it to work at 1200 baud. I guess some CRC type of data packet check would be essential to detect data failures. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Dec 28, 2008 9:42 am |
|
|
Reading the IR receiver dataheets thoroughly, you'll notice, that it isn't suited for the intended operation:
Quote: | After each burst of length 10 to 70 cycles a minimum gap time is required of 10 cycles
For bursts greater than 70 cycles a minimum gap time in the data stream is needed of > 4 x burst length |
It necessary to use a different kind of modulation with the binary datastream. |
|
|
nurquhar
Joined: 05 Aug 2006 Posts: 149 Location: Redditch, UK
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Dec 29, 2008 5:27 am |
|
|
The advantage of IrDA is in using a standardized protocol. Unfortunately it's not directly supported by 8-Bit PICs, so you have to use a software encoder/decoder as in the present project. Encoding of a datastream for transmission/reception by 36 or 38 kHz remote control equipment would involve a similar effort, I think, but may possibly achieve larger distances.
A PIC24F UART is supporting IrDA directly, by the way. |
|
|
nurquhar
Joined: 05 Aug 2006 Posts: 149 Location: Redditch, UK
|
|
Posted: Mon Dec 29, 2008 5:33 am |
|
|
I found this encoder/decoder chip which looks like it simplifies the operation. It looks like one could just hookup the PIC's serial port directly to the chip and an IrDA part and get quite a fast IR serial link, ie upto 115.2 kBaud.
http://www.farnell.com/datasheets/71907.pdf |
|
|
|