Inter-BS2 serin/serout communication timing
Taisho
Posts: 34
After doing some research here I have not found this answer so I'm hoping you all can help.
I am building an autonomous that will have two BS2 controllers communicating with each other. One is the basic BS2 that comes with the Boe-Bot and the second is a BS2PX24.
First: will there be any problem with these two communicating since the PX24 is faster?
Second: If the primary controller does a serout command can the second controller miss it if it does not do a serin at the right moment or is there a type of interrupt that will ensure the secondary controller does not miss anything from the primary? I hope my wording makes sense. I am new to this whole subject.
I am building an autonomous that will have two BS2 controllers communicating with each other. One is the basic BS2 that comes with the Boe-Bot and the second is a BS2PX24.
First: will there be any problem with these two communicating since the PX24 is faster?
Second: If the primary controller does a serout command can the second controller miss it if it does not do a serin at the right moment or is there a type of interrupt that will ensure the secondary controller does not miss anything from the primary? I hope my wording makes sense. I am new to this whole subject.
Comments
2) Yes, the second controller may miss the command if it's busy at the time the command is sent. The SERIN and SEROUT statements have options you can use like the "flow control" pin on SERIN. This goes low while the secondary controller is executing the SERIN and expecting some input. (See page 397 of the Stamp Manual V3.1) The primary controller can also use "flow control" in its SEROUT statements. (See page 413 of the Stamp Manual). You can have timeouts on both SERIN and SEROUT to allow recovery if there's a synchronization problem (by resending if it's the primary or trying again to do a SERIN if it's the secondary).
I see the version 2.1 of the Stamp manual but not 3.1. The pages match in the 2.1 so it has my info but is there actually a 3.1?
Post Edited (Taisho) : 7/20/2006 9:11:50 PM GMT
Depending on the exact application you may also want to look into using the WAIT parameter which will be found near the end of the PBASIC Help File SERIN Section. This would permit the secondary Stamp to wait until a particular character or set of characters is/are sent.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->