PDA

View Full Version : PIC to PIC Serial Communications?



tjkelly
- 16th March 2011, 14:27
I am working on a joint project with another programmer in another area to communicate some data between our PIC processors.

We have chosen serial comm to do this. Can we simply connect the TTL levels together between PICs or must I use level converting chips?

He is writing to hardware with C code I believe and I am using PICBASIC PRO Serout/SerIn. Does any of this have any bearing as far as inverted signals etc. are concerned?

mackrackit
- 16th March 2011, 14:36
If you are going to generate the serial in software I would use SERIN2/SEROUT2.

If your friend is using the hardware port then the signal will be true and the same if you use the hardware port (HSERIN/HSEROUT).

With the software method you can choose inverted or true. So there is a combination to connect both PICs together directly..

But... how far apart will they be???

tjkelly
- 16th March 2011, 14:45
I'm not sure about the distance but am guessing about a foot apart.

mackrackit
- 16th March 2011, 14:54
That will not be a problem. 30 feet or so then you would probably need a MAX232 or equivalent to bring the signal up to RS232 levels.

J. Mark Wolf
- 16th March 2011, 16:31
I am working on a joint project with another programmer in another area to communicate some data between our PIC processors.

We have chosen serial comm to do this. Can we simply connect the TTL levels together between PICs or must I use level converting chips?

He is writing to hardware with C code I believe and I am using PICBASIC PRO Serout/SerIn. Does any of this have any bearing as far as inverted signals etc. are concerned?

Yes, this is commonly called SCI, and I've been doing it for years, on 15foot long cables through automotive environments.

See link below:

http://www.interfacebus.com/Design_Connector_SCI_Bus.html