28830 Parallax Inc, 28830 Datasheet - Page 7

Interface Modules & Development Tools Propeller Servo Controller

28830

Manufacturer Part Number
28830
Description
Interface Modules & Development Tools Propeller Servo Controller
Manufacturer
Parallax Inc
Datasheet

Specifications of 28830

Interface Type
USB, Serial
Data Bus Width
8 bit
Operating Supply Voltage
5 V
Product
Interface Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PSS – Set Software Port (to range 0 – 15 or 16 – 31)
Syntax: “!SCPSS” <mode> <CR>
Reply: “PM” <mode>
The PSS command assigns the PSCU to act on commands sent to channels 0 – 15 or channels 16 – 31
depending on the mode selected. This is useful when networking two PSCU modules together for 32
channels using a microcontroller. The command format is “!SCPSS” followed by a byte value of 0 for Port
0 (channels 0 – 15) or 1 for Port 1 (channels 16 – 31) and a carriage return ($0D).
' {$STAMP BS2}
' {$PBASIC 2.5}
Sdat
Baud
buff
SetPort:
Note: you should be sure only the PSCU that you want to change port modes on is connected.
Networking the PSCU modules while using this command will cause all connected units to be set. The
PSCU must be reset after this command is sent or power must be cycled to activate the change.
PSD – Servo Disable
Syntax: “!SCPSD” <channel> <CR>
Reply: None
This command allows you to disable a servo channel. The command format is, “!SCPDS” followed by a
byte value of 0 – 31 for the channel and a carriage return ($0D). Disabling a channel will cause the
PSCU to stop sending pulses to that channel. This will cause any connected servo to become lax and not
try to hold its position. A disabled servo channel can be enabled again using the Servo Enable command
listed below. The following code for the BASIC Stamp 2 disables the servo on channel 0.
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$STAMP BS2}
' {$PBASIC 2.5}
Sdat
Baud
Disable:
Note: This command causes this to be the default state of this channel. Until the channel is enabled
using the Servo Enable command (below) this channel will no longer refresh even if the PSCU is reset or
power is cycled.
Copyright © Parallax Inc.
DEBUG "Setting Port Mode...", CR
SEROUT Sdat, Baud+$8000, ["!SCPSS", 1, CR] ' Set To 16-31
SERIN
DEBUG "Baud Reply:
DEBUG "Please reset PSCU or cycle power now."
STOP
DEBUG "Disabling Channel 0", CR
SEROUT Sdat, Baud+$8000, ["!SCPSD", 0, CR]
STOP
Sdat, Baud,500, SetPort, [STR buff\3]
PIN
CON
VAR
PIN
CON
", buff(0), buff(1), DEC1 buff(2), CR
15
396
Byte(3)
15
396
Propeller Servo Controller USB (#28830)
' Serial Data I/O Pin
' Constant For 2400 Baud
' Temporary Variable (Array)
' Serial Data I/O Pin
' Constant For 2400 Baud
v1.0 8/24/2009 Page 7 of 12

Related parts for 28830