Jon, Sounds like you are having too much fun. It also sounds like you are getting the problem better defined. Could it be that the handshake line or data line(s) are floatting and the basic stamp is picking up noise on the second series of transfers? Also, you might put in a little delay between the time the pic is ready to send and when it starts sending. Maybe the basic stamp can't turnaround as fast as the pic. Bill C. bill@cornutt.com ---------- > Hello everyone > > My latest problem- I just can't get the PIC serin and serout to work together. > I am try to use the handshake line to first receive a signal from the BS2 > that it is ready to receive. The PIC starts serout and when 5 bytes have been > sent it jumps to the PIC serin routine, switches handshake to output and > signals the BS2 it is ready to receive. When finished receiving 8 channels it > makes the handshake an input and waits until the BS2 is ready to receive by > monotoring the handshake line. When the handshake line is low the program goes > into a pulse measurement routine, which measures an RPM pulse. > > The program only works properly the first loop. If I download (ALT R) > different channel commands from the BS2 to the PIC, the leds indicate a > signal is received. I can leave the PIC running and each time a new channel > command is sent the leds respond, and one serin routine is received from the > PIC and displayed on the lcd. After that a BS2 serin "timeout" occurs > indicating no data received . The BS2 loops between serin, serout and LCD. The > LCD displays the results of the bytes received from the PIC. The initial serin > received from the PIC is correct. Both the PIC serin and serout programs work > properly if they are run independently. To test this I direct the PCL to loop > the chosen routine and comment directions to jump to the other. > > I've been wondering if my problem is in my simple BS2 test program. I am using > the Fpin to control data flow. Or a synchronization problem. Maybe BS2 making > handshake an output high (BS2 ready to receive) at the same time the PIC is > making handshake an output high (PIC ready to receive). See if this makes > sense. Pardon the text wrap. > > THANKS IN ADVANCE > > JON > > 'FPIN IS THE HANDSHAKE PIN > ' MAIN CODE BEGINS HERE-------------------------------------- > MAIN: > SERIN SER_IN\FPIN, 16468, 1000, TM_OUT, [PULSIN_L, PULSIN_H, > MSEC_COUNT_L, MSEC_COUNT_H, _22MIN_COUNT] > > GOSUB LCD > > SEROUT1: > SEROUT SER_OUT\FPIN, 16468, 500, TM_OUT,["A",DEC 128,CR, "B",DEC > 200,CR, "D",DEC test,CR, "E",DEC 5,CR,"F",DEC > 10,CR] > GOSUB LCD > GOTO MAIN 'MAIN LOOP > > TM_OUT: > SEROUT LCD_OUT,$4054,[254,1] 'CLEAR DISPLAY > SEROUT LCD_OUT,$4054,[254,"TIMEOUT "] > 'goto main > PAUSE 500 > GOTO SEROUT1 > > LCD: > SEROUT LCD_OUT,$4054,[254,1] 'CLEAR DISPLAY > SEROUT LCD_OUT,$4054,[254,"RPM ",DEC5 RPM," SEC ",DEC5 > MSEC_COUNT] > SEROUT LCD_OUT,$4054,[254,"22MIN ",DEC3 _22MIN_COUNT] > RETURN >