Bill Boucher
Joined: 04 Feb 2005 Posts: 34 Location: Chatham,ON,CA
|
|
Posted: Fri Feb 04, 2005 2:51 pm |
|
|
Sure you can. Just use the "stream=somename" in the #use RS232( statement. Define a different streamname for each PIC in the system. If your master always talks first, the listens (meaning slaves do not talk until spoken to), then you can define tx & rx pins as the same pin, thereby using just one Master PIC pin for each slave PIC. Alternatively, you could connect just one Master tx pin to the rx pins of all slave PICs (thru 220ohm resistors) and all slave PIC tx pins to the master's rx pin (again thru resistors). Just keep the slave tx pins tristated when not talking. Then introduce an "address" byte in all messages sent to the slaves. Naturally, each slave would have to be programmed with a specific matching address. Keeping the lines separated eliminates the need for the addresses. |
|