28830 Parallax Inc, 28830 Datasheet - Page 5
![Interface Modules & Development Tools Propeller Servo Controller](/photos/15/89/158948/28830-l_sml.jpg)
28830
Manufacturer Part Number
28830
Description
Interface Modules & Development Tools Propeller Servo Controller
Manufacturer
Parallax Inc
Datasheet
1.28830.pdf
(12 pages)
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
VER? – Identify Firmware Version Number
Syntax: “!SCVER?” <CR>
Reply: “x.x”
The VER? Command causes the PSC to reply with its firmware version number. A carriage return ($0D)
must follow the command. The version number returned is the version number of the firmware installed
on the PSCU. The following code can be used to find and identify your PSCU using a BASIC Stamp 2.
' {$STAMP BS2}
' {$PBASIC 2.5}
Sdat PIN 15
Baud CON 396
buff VAR Byte(3)
FindPSC:
Within the Debug Terminal you will see the message, “Finding PSC”, followed by, “PSC ver:” and the
firmware version (for example 1.0). If the message “Finding PSC” appears more than 3 or 4 times
without a reply you should check to make sure all connections are correct and verify your power source.
If the PSCU still fails to respond you may press the reset button momentarily. If the PSCU still fails to
respond you may contact our Technical Support Department. Contact information is listed toward the
end of this documentation.
SBR – Set the Baud Rate (to either 2400 or 38.4k Baud)
Syntax: “!SCSBR” <mode> <CR>
Reply: “BR” <mode>
After establishing communication with the PSCU you may wish to increase the baud rate to 38.4 kbps.
The command for achieving this is shown above. You must first send “!SCSBR” followed by a byte value
for the mode where 0 is for 2400 bps and 1 is for 38.4 kbps. Finally a carriage return ($0D) completes
the command. The following code can be used to set the baud rate to 38.4 kbps using a BASIC Stamp 2.
' {$STAMP BS2}
' {$PBASIC 2.5}
Sdat PIN 15
Baud CON 396
buff VAR Byte(3)
SetBaud:
Note that the SERIN command has a value of 6 for 38.4 kbps on the BASIC Stamp 2. This is because the
PSCU will reply at the new baud rate to confirm that the command has been executed. If you would like
to set the baud rate back to 2400 bps you must send a new SBR command at 38.4 kbps. This time the
reply will be at 2400 bps so the SERIN will need to change as well. You can also reset the baud rate
back to 2400 bps by pressing the reset button on the PSCU.
Copyright © Parallax Inc.
DEBUG "Finding PSC", CR
SEROUT Sdat, Baud+$8000, ["!SCVER?",CR]
SERIN Sdat, Baud, 500, FindPSC, [STR buff\3]
DEBUG "PSC ver: ", buff(0), buff(1), buff(2), CR
DEBUG "Setting Baudrate", CR
SEROUT Sdat, Baud+$8000, ["!SCSBR",1,CR]
SERIN Sdat, 6,500, SetBaud, [STR buff\3]
DEBUG "Baud reply: ", buff(0), buff(1), DEC1 buff(2), CR
STOP
Propeller Servo Controller USB (#28830)
' Serial Data I/O pin
' Constant for 2400 baud
' temporary variable
' Serial Data I/O pin
' Constant for 2400 baud
' temporary variable
' Find and get the version
' number of the PSC.
v1.0 8/24/2009 Page 5 of 12