PDA

View Full Version : PIC to PIC, How Many IO Connections Required?



CocaColaKid
- 1st September 2005, 14:50
I'm going to be connecting two PIC together and require bi-direction operation. How many IO lines should I plan on having to use?

CocaColaKid
- 1st September 2005, 14:57
The project actually consists of 3 PICs with PIC_1 talking to PIC_2 and PIC_2 talking to PIC_3 but PIC_1 and PIC_3 don't know about each other.

Dwayne
- 1st September 2005, 17:44
Hello CocaCola,

One line is all that is necessary...

Using Serin and "Flags" to signify the different "chips"

Like the wait flag in Serin2...Thus, the Receive will not be implimented until a certain flag is triggered.



Dwayne

CocaColaKid
- 1st September 2005, 17:47
I was actually thinking 3 lines. One transmission, one to tell the other to get ready to receive and one for replying to the request to start sending.

Dwayne
- 1st September 2005, 18:16
Hello CocaCola,

Yes, 3 wires will work too...

So will 4... It is really all up to you, and how you want to handle it.

with the "Wait" command, you can signify the "Wait" characters to be specific to each chip.

SERIN 1,N2400,[“A”],B0

Instead of using "A", you can use a non-printable value like $FA or whatever you want..

$FA = chip1
$FB = chip2
$FC = chip3

Assign them letters that are not used ...zza zzb zzc.

Thus, only THAT chip that is looking for zza will recognize the transmitting data.

Or, like you say... 3 wires will work just fine...One per chip...

Dwayne