' {$STAMP BS2p} ' {$PBASIC 2.5} Sdat PIN 15 ' Serial Data I/O pin Baud CON 396 ' Constant for 2400 baud buff VAR Byte(3) ' temporary variable FindPSC: ' Find and get the version DEBUG "Finding PSC", CR ' number of the PSC. SEROUT Sdat, Baud+$8000, ["!SCVER?",CR] DEBUG "Step 1 done",CR SERIN Sdat, Baud, 3000, FindPSC, [STR buff\3] DEBUG "Step 2 done",CR DEBUG "PSC ver: ", buff(0), buff(1), buff(2), CR STOP