My slave (16f876pic board) runs a 24volt air valve. The Master (16f877) runs 6 of these slaves. The Master activates slave by signaling a LOW signal that was held high. This signal is working as each valve will turn on and off with the test program run. The Slave tells Master that it has finished (or end limit was reached) by sending a HIGH signal from its port C to the Masters port B. Signal is low when slave is busy and high when it is finished. I checked with digital probe and signals are correct. The signal to the slave is correct and signal back from slave is correct. So it must be how the Master sees this busy/finished signal from the slave. It seems simple what I am trying to do "Turn on slave and wait till slave is done, then continue". None of the signals timing or speed is real critical. Sometimes when the master activates the slave, the slave may already be in that position and the _done line will already show high (finished), never showing (low)busy. Here is a piece of the code that the Master uses to talk to slave. Does this piece of code require that it sees the "low" first then exits when it goes "high"? Main = 0 'Master signals Slave to turn OFF While Main_done = 0 'Wait till Slave signals that its done with a high signal Wend 'Then continue Is there a better way of doing this with PBP? ----- Original Message ----- From: "Bob Barr" To: Sent: Sunday, August 19, 2001 10:47 AM Subject: Re: [PIC]: ===== >B to C > Raymond Choat wrote: > > > >Ok I am sending an on/off signal from a 16f876 Port C.2 to a 16f877 Port > >B.2 and my master program does not see it. The slave pic boards have been > >tested and work. Here is program I am using in MASTER Pic. What is to > >happen > >is Master signals Slave to run and Slave then signals Master when its done. > >Then Master goes to next section of code to run next Slave but not before > >last slave signals done. > > > >This program will cycle through everypart turning everything on and off but > >never waits for slave pics to signal its done. It just continues and runs > >all six sections. So for some reason it looks like the Master is not seeing > >the slave saying when its done. Where did I go wrong? > >Could something in my Epic programmer be set wrong? My wiring is like so. > > > > Depending on what your slaves are doing, I have to wonder what their > 'finish' state is and how quickly they can respond to the next 'go' command. > You may need a simple handshake between your main and slaves to ensure that > each slave starts and *then* gives a valid 'done' response. > > If you issue the 'go', wait for 'not done', and then wait for the 'done' > response, main will be able to check that each slave actually runs its > process. Your main code may be proceeding on invalid 'done' signals. > > Regards, Bob > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu