' www.crustcrawler.com ' Copyright 2006 CrustCrawler Inc. ' '------- [ TestPscchannel.BS2 ] ---------------------------------------------- ' {$STAMP BS2px} ' {$PBASIC 2.5} ' ' Use this program to test PSC channels ' -----[ I/O Definitions ]------------------------------------------------ PSC PIN 15 ' PSC module #SELECT $STAMP #CASE BS2SX, BS2P Baud CON 1021 + $8000 #CASE BS2PX Baud CON 1646 + $8000 #CASE #ELSE Baud CON 396 + $8000 #ENDSELECT '---- [Walking Variables] ------------------------------------------------ servoPosition VAR Word ' Servo Position servoAddr VAR Byte ' Servo addresses ramp VAR Byte ' Ramp used in SEROUT '------------------------------------------------------------------------- ramp = 8 'Rotation speed servoAddr = 0 'PSC channel servoPosition = 850 'Position Write_PSC: SEROUT PSC,Baud,["!SC",servoAddr, ramp,servoPosition.LOWBYTE, servoPosition.HIGHBYTE, CR] END RETURN