' SENDER ' ' SERIN_SEROUT1.BS2 ' Using two BS2-IC's, connect the circuit shown in the SERIN command ' description and run this program on the BASIC Stamp designated as the ' Sender. This program demonstrates the use of Flow Control (FPin). ' Without flow control, the sender would transmit the whole word "Hello!" ' in about 1.5 ms. The receiver would catch the first byte at most; by the ' time it got back from the first 1-second PAUSE, the rest of the data ' would be long gone. With flow control, communication is flawless since ' the sender waits for the receiver to catch up. ' Circuit ' Send.P0 - 1k - Receive.P0 ' Send.P1 - PointA - Receive.P1 ' Send.Vss - PointB - Receive.Vss ' PointA - 10k - PointB ' {$STAMP BS2} ' {$PBASIC 2.5} ' Baudrate = 115200 SO PIN 0 ' serial output FC PIN 1 ' flow control pin Main: DO SEROUT SO\FC, 1, ["Hello!", CR] ' send the greeting FREQOUT 4,300,3000 PAUSE 2500 ' wait 2.5 seconds LOOP ' repeat forever END