PIC to PIC communication

Thread Starter

LittleEars

Joined Dec 27, 2008
1
Hi,

I want to get 2 PICs communicating with each other using RS232. Anyone know how I could do this using no more than 2 pins per chip?

I have tried googling what the commands/method of communication needs to be to achieve this but I can't find anything that seems to be right.

Any link would be appreciated!

Cheers
G
:)
 

beenthere

Joined Apr 20, 2004
15,819
RS-232 is a communications protocol. You could always look up the spec sheet for a MAX232 to see some of what is involved.

Using two pins only will require a different methodology entirely. You can always look into 2 wire protocols, or see what I/O interfaces are already built into the PIC's you are using.

Limiting comms to 2 pins is a bit difficult. The use of two more pins to do handshaking makes life easier. Still, radios manage - you can just arrange to send messages back and forth, with some fixed schedule.
 

Alberto

Joined Nov 7, 2008
169
Use two pics with uart on board. Then you can use interupts on received byte and jump to a listening routine without loosing any bytes transmitted. this naturally apply for both chips.

Alberto
 

AlexR

Joined Jan 16, 2008
732
Unless you have some overwhelming reason we don't know about for using RS232 I would go for SPI to communicate between chips. Its much faster and more efficient than RS232 and many PIC chips SPI support built in making it simple to use.
 

John P

Joined Oct 14, 2008
2,026
Well, yeah. It's trivial, assuming you have processors with built-in UARTs. Connect RX of one chip to TX of the other, and vice versa, and you're all done, as far as the hardware is concerned. But that's not "RS232". It's a "serial link"; it would have to be communicating at the official RS232 voltage levels to be an official port, and there's no reason to do that (and good reasons not to) if you don't need it.

The SPI or I2C options are usable too, though that would make the processors inherently unequal, with one chip needing to be "master". You might or might not think that was a good idea.
 
Top