A very simple way to use aync serial to get multiple slaves talking to a single master using ASYNC comms. First, this assumes all the PICs are on one board, or at least in one box sharing a power supply. If this assumption is incorrect then you could run into all kinds of trouble (which you could get around by adding in RS232 drivers and receivers as needed). 1: Connect the TX pin of the master PIC to the RX pins of all the slave PICs. 2: Connect a 20K resistor from the RX pin of the master PIC to Vdd. 3: Connect a diode from the TX pin of each slave PIC to the RX pin of the master PIC. The anode of the diode should be connected to the master PIC's RX pin and the cathode to the slave's TX pin. Now, all the slaves will see everything the master sends. Slaves can respond to the master. If multiple slaves attempt to talk at once the communcation will most likely be garbled, so the slaves should probably only respond to polls from the master. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "Russell Farnhill" To: Sent: Friday, May 04, 2001 10:22 AM Subject: Pic <--> Pic Comms > Hi all, > > I want to be able to control six F84's from a master > F84. I think my options are I2C, SPI or some serial link. > > It would also be nice if the slaves could send data back > to the master as well. > > Looking on the net I find lots of I2C routines, but they > all seem to be for the master and not for the slave. > > Does anyone know where I could get a simple set or routines > in 'C' for slave and master to get me going. > > SPI... Don't really know anything about this so I'll look > at this if I can't get anywhere with I2C or Serial. > > lastly Serial... > > I think this is my best chance of success because I've already > got one pic talking to another and probably just need to expand it. > > Would this serial set-up work ? > > Master pic Tx pin wired to all six slave Rx pins > Master Pic Rx pin wired to all six slave Tx pins > > So now master should be able to send cmd's to any slave and > any slave back to master. Also I thought of using six more pins > on the master as Select lines going to each slave. So slave can > grab attention of master and help on bus collisions. > > I'am a little unsure about all the slave Tx pins connected together > on the master Rx pin, if all Tx's are low and one goes high to send > data, will this cause a short and blow the pin ??, if so could I use > some series resistor or something ? > > > Any suggestions, help appreciated. > > Thanks, > > Russ. > > > -----EMAIL DISCLAIMER------------------------------------------------- > This email and any files transmitted with it are intended solely for > the addressee(s) and may be legally privileged and/or confidential. If > you have received this email in error please destroy it and notify the > sender. You must not use or disclose any part of this message if you > are not the intended recipient. Unauthorised use/disclosure may be > unlawful. Opinions expressed may be personal to the author and may not > necessarily reflect the opinions of Khaos Technologies or its > affiliates. We may monitor email communication passing through our > networks and we reserve the right to store all/part of any > communication. We take reasonable precautions to ensure our emails are > virus free, however, we cannot accept responsibility for any virus > transmitted and recommend that you implement your own virus checking > procedures. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.