CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

IR serial Link ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nurquhar



Joined: 05 Aug 2006
Posts: 149
Location: Redditch, UK

View user's profile Send private message Visit poster's website

IR serial Link ?
PostPosted: Sun Dec 28, 2008 8:06 am     Reply with quote

Is it possible to get a bidirectional IR serial link between two PIC systems Question

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 Idea

Has anyone done this before ? Is this the way to do it Question

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

View user's profile Send private message

PostPosted: Sun Dec 28, 2008 9:42 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Mon Dec 29, 2008 4:53 am     Reply with quote

It looks like IrDA is the way to go. I found this reference project which uses two PIC to send messages to an LCD over a IR serial link.

http://avtanski.net/projects/lcd_serial/#DATA
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Dec 29, 2008 5:27 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Mon Dec 29, 2008 5:33 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group