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?
Printable View
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?
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.
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
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.
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