Wiki source code of SSC-32 Manual

Last modified by Eric Nantel on 2023/01/24 10:49

Show last authors
1 {{html wiki="false" clean="true"}}
2 <table border="0">
3 <tbody><tr>
4 <td align="center"><span class="headmd">Table of Contents</span></td>
5 <td align="center"><span class="headmd">Links</span></td>
6 </tr>
7 <tr>
8 <td >
9 <ul class="toc">
10 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#ssc32lay">SSC-32</a>
11 <ul class="toc">
12 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#ssc32feat">SSC-32 Hardware Information</a></li>
13 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#aglance">Shorting Bar Jumpers and Connections</a></li>
14 </ul>
15 </li>
16 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#comform">Command Formatting for the SSC-32</a>
17 <ul class="toc">
18 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#comtype">Command Types and Groups</a></li>
19 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#srvmov">Servo Move or Group Move</a></li>
20 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#pulseo">Software Position Offset</a></li>
21 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#genout">General Output Info</a></li>
22 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#discout">Discrete Output</a></li>
23 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#byteout">Byte Output</a></li>
24 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#qmovest">Query Movement Status</a></li>
25 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#qpwidth">Query Pulse Width</a></li>
26 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#readdin">Read Digital Inputs</a></li>
27 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#readain">Read Analog Inputs</a></li>
28 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#hexseqcom">12 Servo Hexapod Sequencer Commands</a></li>
29 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#hexseqnote">Notes on Hexapod Sequencer</a></li>
30 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#qhexseq">Query Hex Sequencer State</a></li>
31 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#softver">Get Software Version</a></li>
32 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#firmupg">Firmware Upgrade</a></li>
33 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#transboot">Transfer to Boot</a></li>
34 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#sscemu">Mini SSC-II Emulation</a></li>
35 </ul>
36 </li>
37 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#ssc32reg">SSC-32 Registers</a>
38 <ul class="toc">
39 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#reggen">Registers General Info</a></li>
40 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#enregdef">Enable Register (R0) Bit Definitions</a></li>
41 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#regrw">Register Read/Write</a></li>
42 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#miscregcom">Miscellaneous Register Commands</a></li>
43 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#startstr">Startup Strings</a></li>
44 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#moreexamp">Additional Examples</a></li>
45 </ul>
46 </li>
47 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#tshoot">Troubleshooting Information</a>
48 <ul class="toc">
49 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#testcont">Testing the Controller</a></li>
50 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#trouble">General Troubleshooting</a></li>
51 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#usb2s">Communicating - USB to Serial Cables</a></li>
52 </ul>
53 </li>
54 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#baex">Basic Atom Programming Examples</a>
55 <ul class="toc">
56 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#ssc32ex">Atom / SSC-32 Test Example</a></li>
57 <li class="toc"><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#bipedex">Simple Biped Example</a></li>
58 </ul>
59 </li>
60 </ul>
61 </td>
62 <td valign="top">
63 <ul class="toc">
64 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/WebHome/ssc32sch.pdf" target="_blank">SSC-32 Schematic (pdf)</a></li>
65 <li><a href="http://www.lynxmotion.com/images/html/build137.htm" target="_blank">SSC-32 (v2) GP Sequencer Usage Manual</a></li>
66 <li><a href="http://www.lynxmotion.com/images/html/build177.htm" target="_blank">SSC-32 (v2) Binary Commands Usage Manual</a></li>
67 <li><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/ses-software/lynxterm/" target="_blank">LynxTerm Download</a></li>
68 </ul>
69 </td>
70 </tr>
71 </tbody></table>
72 <hr color="#808080" class="pb">
73 <p align="center"><span class="headmd"><a name="ssc32lay">SSC-32.</a></span></p>
74 <p><img border="0" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/WebHome/ssc32m01.gif" ></p>
75 <p><span class="headsm"><a name="ssc32feat">SSC-32 Hardware Information.</a></span></p>
76 <p>The image above illustrates the shorting bar jumpers (the black rectangles) as they are on the board as it is shipped. The jumpers are used to
77 set operating parameters for the board. It should not be assumed that they are correct for your project as changes are likely to be required. Please
78 consult the tutorial for your project for the proper shorting bar jumper positions.</p>
79 <p>The SSC-32 is 3.00" x 2.30" with 0.125" holes set in 0.15" from each edge.</p>
80 <ol>
81 <li>The Low Dropout regulator will provide 5vdc out with as little as 5.5vdc coming in. This is important when operating your robot from a
82 battery. It can accept a maximum of 9vdc in. The regulator is rated for 500mA, but we are de-rating it to 250mA to prevent the regulator from
83 getting too hot.</li>
84 <li>This terminal connects power to servo channels 16 through 31. Apply 4.8vdc to 6.0vdc for most analog or digital servos. This can be directly
85 from a 5-cell NiMH battery pack. 7.2vdc - 7.4vdc can be applied to HSR-5980 or HSR-5990 servos. This can be directly from a 6-cell NiMH battery
86 pack or a 2-cell LiPo battery pack.<br>
87 &nbsp;
88 <table border="1" bordercolor="#000000" >
89 <tbody><tr>
90 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Board</b></td>
91 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Input</b></td>
92 </tr>
93 <tr>
94 <td align="center" bordercolor="#C0C0C0" >VS2 +</td>
95 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >RED</td>
96 </tr>
97 <tr>
98 <td align="center" bordercolor="#C0C0C0" >VS2 -</td>
99 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >BLACK</td>
100 </tr>
101 </tbody></table>
102 </li>
103 <li>These jumpers are used to connect VS1 to VS2. Use this option when you are powering all servos from the same battery. Use both jumpers.
104 Alternately, if you want to use two separate battery packs, one on each side, then remove both of these jumpers.</li>
105 <li>This is the Logic Voltage, or VL. This input is normally used with a 9vdc battery connector to provide power to the ICs and anything connected
106 to the 5vdc lines on the board. The valid range for this terminal is 6vdc - 9vdc. This input is used to isolate the logic from the Servo Power
107 Input. It is necessary to remove the VS1=VL jumper when powering the servos separately from the logic VL. The SSC-32 should draw 35mA with
108 nothing connected to the 5vdc output.<br>
109 &nbsp;
110 <table border="1" bordercolor="#000000" >
111 <tbody><tr>
112 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Board</b></td>
113 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Input</b></td>
114 </tr>
115 <tr>
116 <td align="center" bordercolor="#C0C0C0" >VL +</td>
117 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >RED</td>
118 </tr>
119 <tr>
120 <td align="center" bordercolor="#C0C0C0" >VL -</td>
121 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >BLACK</td>
122 </tr>
123 </tbody></table>
124 </li>
125 <li>This jumper allows powering the microcontroller and support circuitry from the servo power supply. This requires at least 6vdc to operate
126 correctly. If the microcontroller resets when too many servos are moving at the same time, it may be necessary to power the microcontroller
127 separately using the VL input. A 9vdc works nicely for this. This jumper must be removed when powering the microcontroller separately!</li>
128 <li>This terminal connects power to servo channels 16 through 31. Apply 4.8vdc to 6.0vdc for most analog or digital servos. This can be directly
129 from a 5-cell NiMH battery pack. 7.2vdc - 7.4vdc can be applied to HSR-5980 or HSR-5990 servos. This can be directly from a 6-cell NiMH battery
130 pack or a 2-cell LiPo battery pack.<br>
131 &nbsp;
132 <table border="1" bordercolor="#000000" >
133 <tbody><tr>
134 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Board</b></td>
135 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Input</b></td>
136 </tr>
137 <tr>
138 <td align="center" bordercolor="#C0C0C0" >VS1 +</td>
139 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >RED</td>
140 </tr>
141 <tr>
142 <td align="center" bordercolor="#C0C0C0" >VS1 -</td>
143 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >BLACK</td>
144 </tr>
145 </tbody></table>
146 </li>
147 <li>This is where you connect the servos or other output devices. Use caution and remove power when connecting anything to the I/O
148 bus.
149 <p>For discrete outputs (Hi / Low), each output can sync or source up to
150 35mA. However there is a maximum limit of 70mA per 8 I/O pin group. I.e.
151 0-7, 8-15, 16-23, 24-31.<br>
152 &nbsp;
153 <table border="1" bordercolor="#000000" >
154 <tbody><tr>
155 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Board</b></td>
156 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Wire</b></td>
157 </tr>
158 <tr>
159 <td align="center" bordercolor="#C0C0C0" >Pulse</td>
160 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Yellow or White</td>
161 </tr>
162 <tr>
163 <td align="center" bordercolor="#C0C0C0" >VS</td>
164 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Red</td>
165 </tr>
166 <tr>
167 <td align="center" bordercolor="#C0C0C0" >Ground</td>
168 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Black or Brown</td>
169 </tr>
170 </tbody></table>
171 </p></li>
172 <li>This is where the Atmel IC chip goes. Be careful to insert it with Pin 1 in the upper right corner as pictured. Take care to not bend the
173 pins.</li>
174 <li>The two BAUD inputs allow configuring the baud rate. Please see the examples below.<br>
175 &nbsp;
176 <table border="1" bordercolor="#000000" >
177 <tbody><tr>
178 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Jumpers</b></td>
179 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Baud Rate</b></td>
180 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Usage</b></td>
181 </tr>
182 <tr>
183 <td align="center" bordercolor="#C0C0C0" >0 0</td>
184 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >2400</td>
185 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Slower Processors</td>
186 </tr>
187 <tr>
188 <td align="center" bordercolor="#C0C0C0" >0 1</td>
189 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >9600</td>
190 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Slower Processors</td>
191 </tr>
192 <tr>
193 <td align="center" bordercolor="#C0C0C0" >1 0</td>
194 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >38.4k</td>
195 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Atom/Stamp Communication</td>
196 </tr>
197 <tr>
198 <td align="center" bordercolor="#C0C0C0" >1 1</td>
199 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >115.2k</td>
200 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >PC Communication, Firmware Update</td>
201 </tr>
202 </tbody></table>
203 </li>
204 <li>The ABCD inputs have both static and latching support. The inputs have internal weak (50k) pullups that are used when a Read Digital Input command is used. A normally open switch connected from the input to ground will work fine. There are two pins that have 5vdc, two pins with ground, and four inputs labled A, B, C, and D.</li>
205 <li>This is the Processor Good LED. It will light steady when power is applied and will remain lit until the processor has received serial data. It will then go out and will blink whenever it is receiving serial data. Note, the LED will go out even if the data is the wrong baud rate, formatted wrong, or even complete giberish. But it is a useful tool to know if the SSC-32 is receiving data ir not. </li>
206 <li>Simply plug a straight-through M/F DB9 cable from this plug to a free 9-pin serial port con your PC for receiving servo positioning data.
207 Alternately a USB-to-serial adapter will work well. Please see the <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#usb2s">USB-to-serial section</a> for more information.</li>
208 <li>This is an 8-pin EEPROM socket. The EEPROM is supported by the 2.01GP firmware. It supports the 24LC256 which is a 32KB chip. The 24LC512 memory chips will work but the extra storage will not be available. </li>
209 <li>This is the TTL serial port or DB9 serial port enable. Install two jumpers as illustrated below to enable the DB9 port. Install wire
210 connectors to utilize TTL serial communication from a host microcontroller.</li>
211 </ol>
212 <hr color="#808080" class="pb">
213 <p><span class="headsm"><a name="aglance">Shorting Bar Jumpers and Connectors at a glance.</a></span></p>
214 <p><img border="0" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/WebHome/ssc32m02.gif"></p>
215 <p><a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/WebHome/ssc-32-bluetooth.jpg"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/WebHome/ssc-32-bluetooth.jpg" ></a></p>
216 <hr color="#808080">
217 <p align="center"><span class="headmd"><a name="comform">Command Formatting for the SSC-32.</a></span></p>
218 <p><span class="headsm"><a name="comtype">Command Types and Groups.</a></span></p>
219 <p>With the exception of MiniSSC-II mode, all SSC-32 commands must end with a carriage return character (ASCII 13). Multiple commands of the same
220 type can be issued simultaneously in a <i>Command Group</i>. All of the commands in a command group will be executed after the final carriage return
221 is received. Commands of different types cannot be mixed in the same command group. In addition, numeric arguments to all SSC-32 commands must be
222 ASCII strings of decimal numbers, e.g. "1234". Some commands accept negative numbers, e.g. "-5678". Programming examples will be
223 provided. ASCII format is not case sensitive. Use as many bytes as required. Spaces, tabs, and line feeds are ignored.</p>
224 <table border="1" bordercolor="#000000" >
225 <tbody><tr>
226 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="4" ><b>Command Types and Groups</b></td>
227 </tr>
228 <tr>
229 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >1</td>
230 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Servo Movement</td>
231 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >7</td>
232 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Read Analog Inputs</td>
233 </tr>
234 <tr>
235 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >2</td>
236 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Discrete Output</td>
237 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >8</td>
238 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >12 Servo Hexapod Gait Sequencer</td>
239 </tr>
240 <tr>
241 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >3</td>
242 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Byte Output</td>
243 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >9</td>
244 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Query Hex Sequencer</td>
245 </tr>
246 <tr>
247 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >4</td>
248 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Query Movement Status</td>
249 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >10</td>
250 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Get Version</td>
251 </tr>
252 <tr>
253 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >5</td>
254 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Query Pulse Width</td>
255 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >11</td>
256 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Go to Boot</td>
257 </tr>
258 <tr>
259 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >6</td>
260 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Read Digital Inputs</td>
261 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" >12</td>
262 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >MiniSSC-II Compatibility</td>
263 </tr>
264 </tbody></table>
265 <p><span class="headsm"><a name="srvmov">Servo Move or Group Move.</a></span></p>
266 <table border="1" bordercolor="#000000" >
267 <tbody><tr>
268 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b># &lt;ch&gt; P &lt;pw&gt; S &lt;spd&gt; ... # &lt;ch&gt;
269 P &lt;pw&gt; S &lt;spd&gt; T &lt;time&gt; &lt;cr&gt;</b></td>
270 </tr>
271 <tr>
272 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;ch&gt;</td>
273 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Channel number in decimal, 0-31</td>
274 </tr>
275 <tr>
276 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;pw&gt;</td>
277 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Pulse width in microseconds, 500-2500</td>
278 </tr>
279 <tr>
280 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;spd&gt;</td>
281 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Movement speed in uS per second for one channel (Optional)</td>
282 </tr>
283 <tr>
284 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;time&gt;</td>
285 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Time in mS for the entire move, affects all channels, 65535 max (Optional)</td>
286 </tr>
287 <tr>
288 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;cr&gt;</td>
289 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Carriage return character, ASCII 13 (Required to initiate action)</td>
290 </tr>
291 <tr>
292 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;esc&gt;</td>
293 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Cancel the current action, ASCII 27</td>
294 </tr>
295 </tbody></table>
296
297 <p>Servo Move Example: "#5 P1600 S750 &lt;cr&gt;"</p>
298 <p>The example will move the servo on channel 5 to position 1600. It will move from its current position at a rate of 750uS per second until it
299 reaches its commanded destination. For a better understanding of the speed argument, consider that 1000uS of travel will result in around 90° of
300 rotation. A speed value of 100uS per second means the servo will take 10 seconds to move 90°. Alternately, a speed value of 2000uS per second
301 equates to 500mS (half a second) to move 90°.</p>
302 <p>Servo Move Example: "#5 P1600 T1000 &lt;cr&gt;"</p>
303 <p>The example will move servo 5 to position 1600. It will take 1 second to complete the move regardless of how far the servo has to travel to reach
304 the destination.</p>
305 <p>Servo Group Move Example: "#5 P1600 #10 P750 T2500 &lt;cr&gt;"</p>
306 <p>The example will move servo 5 to position 1600 and servo 10 to position 750. It will take 2.5 seconds to complete the move, even if one servo has
307 farther to travel than another. The servos will both start and stop moving at the same time. This is a very powerful command. By commanding all the
308 legs in a walking robot with the Group Move it is easy to synchronize complex gaits. The same synchronized motion can benefit the control of a
309 robotic arm as well.</p>
310 <p>You can combine the speed and time commands if desired. The speed for each servo will be calculated according to the following rules:</p>
311 <ol>
312 <li>All channels will start and end the move simultaneously.</li>
313 <li>If a speed is specified for a servo, it will not move any faster than the speed specified (but it might move slower if the time command
314 requires).</li>
315 <li>If a time is specified for the move, then the move will take at least the amount of time specified (but might take longer if the speed command
316 requires).</li>
317 </ol>
318 <p>Servo Move Example: "#5 P1600 #17 P750 S500 #2 P2250 T2000 &lt;cr&gt;"</p>
319 <p>The example provides 1600uS on ch5, 750uS on ch17, and 2250uS on ch2. The entire move will take at least 2 seconds, but ch17 will not move faster
320 than 500uS per second. The actual time for the move will depend on the initial pulse width for ch17. Suppose ch17 starts at position 2000. Then it
321 has to move 1250uS. Since it is limited to 500uS per second, it will require at least 2.5 seconds, so the entire move will take 2.5 seconds. On the
322 other hand, if ch17 starts at position 1000, it only needs to move 250uS, which it can do in 0.5 seconds, so the entire move will take 2 seconds.</p>
323 <p>Important! The first positioning command should be a normal "# &lt;ch&gt; P &lt;pw&gt;" command. Because the controller doesn't know
324 where the servo is positioned on powerup, it will ignore speed and time commands until the first normal command has been received.</p>
325 <p>Any move that involves more than one servo and uses either the S or T modifier is considered a Group Move, and all servos will start and stop
326 moving at the same time. If you require moving several servos at different speeds, you must issue the commands separately.</p>
327 <p><span class="headsm"><a name="pulseo">Software Position Offset.</a></span></p>
328 <table border="1" bordercolor="#000000" >
329 <tbody><tr>
330 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b># &lt;ch&gt; PO &lt;offset value&gt; ... # &lt;ch&gt; PO
331 &lt;offset value&gt; &lt;cr&gt;</b></td>
332 </tr>
333 <tr>
334 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;ch&gt;</td>
335 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Channel number in decimal, 0-31</td>
336 </tr>
337 <tr>
338 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;offset value&gt;</td>
339 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">100 to -100 in uSeconds</td>
340 </tr>
341 <tr>
342 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;cr&gt;</td>
343 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Carriage return character, ASCII 13</td>
344 </tr>
345 </tbody></table>
346 <p>This command allows the servos centered (1500uS) position to be aligned perfectly. The servo channel will be offset by the amount indicated in
347 offset value. This represents approximately 15° of range. It's important to build the mechanical assembly as close as possible to the desired
348 centered position before applying the servo offset. This makes it easy to setup servos that do not have mechanical alignment. The Position Offset
349 command should be issued only once in your program. When the SSC-32 is turned off it will forget the Position Offsets.</p>
350 <p>The current SSC-32 now has an internal register method for doing Position Offsets. These are stored in the Atmel chips internal EEPROM and are
351 retained when power is removed. Use of this feature is covered in the <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/#ssc32reg">SSC-32 Registers</a> section of this manual.</p>
352 <p><span class="headsm"><a name="genout">General Output Information.</a></span></p>
353 <p>The outputs on the SSC-32 come from four 74HC595 8 bit shift register chips. There are four banks of 8 bit outputs as shown 0-7, 8-15, 16-23 and
354 24-32. The outputs can sink or source up to 25mA per pin, but a max of 70mA per bank must be observed.</p>
355 <p><span class="headsm"><a name="discout">Discrete Output.</a></span></p>
356 <table border="1" bordercolor="#000000" >
357 <tbody><tr>
358 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b># &lt;ch&gt; &lt;lvl&gt; ... # &lt;ch&gt; &lt;lvl&gt;
359 &lt;cr&gt;</b></td>
360 </tr>
361 <tr>
362 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;ch&gt;</td>
363 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Channel number in decimal, 0-31</td>
364 </tr>
365 <tr>
366 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;lvl&gt;</td>
367 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Logic level for the channel, either 'H' for High or 'L' for Low</td>
368 </tr>
369 <tr>
370 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;cr&gt;</td>
371 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Carriage return character, ASCII 13</td>
372 </tr>
373 </tbody></table>
374 <p>The channel will go to the level indicated within 20mS of receiving the carriage return.</p>
375 <p>Discrete Output Example: "#3H #4L &lt;cr&gt;"</p>
376 <p>This example will output a High (+5v) on channel 3 and a Low (0v) on channel 4.</p>
377 <p><span class="headsm"><a name="byteout">Byte Output.</a></span></p>
378 <table border="1" bordercolor="#000000" >
379 <tbody><tr>
380 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b># &lt;bank&gt; : &lt;value&gt; &lt;cr&gt;</b></td>
381 </tr>
382 <tr>
383 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;bank&gt;</td>
384 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">(0 = Pins 0-7, 1 = Pins 8-15, 2 = Pins 16-23, 3 = Pins 24-31)</td>
385 </tr>
386 <tr>
387 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;value&gt;</td>
388 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Decimal value to output to the selected bank (0-255), Bit 0 = LSB of bank</td>
389 </tr>
390 <tr>
391 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">&lt;cr&gt;</td>
392 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Carriage return character, ASCII 13</td>
393 </tr>
394 </tbody></table>
395 <p>This command allows 8 bits of binary data to be written at once. All pins of the bank are updated simultaneously. The banks will be updated
396 within 20mS of receiving the carriage return.</p>
397 <p>Bank Output Example: "#3:123 &lt;cr&gt;"</p>
398 <p>This example will output the value 123 (decimal) to bank 3. 123 (dec) = 01111011 (bin), and bank 3 is pins 24-31. So this command will output a
399 "0" to pins 26 and 31, and will output a "1" to all other pins.</p>
400 <p><span class="headsm"><a name="qmovest">Query Movement Status.</a></span></p>
401 <p>Example: "Q &lt;cr&gt;"</p>
402 <p>This will return a "." if the previous move is complete, or a "+" if it is still in progress.</p>
403 <p>There will be a delay of 50uS to 5mS before the response is sent.</p>
404 <p><span class="headsm"><a name="qpwidth">Query Pulse Width.</a></span></p>
405 <p>Example: "QP &lt;arg&gt; &lt;cr&gt;"</p>
406 <p>This will return a single byte (in binary format) indicating the pulse width of the selected servo with a resolution of 10uS. For example, if the
407 pulse width is 1500uS, the returned byte would be 150 (binary).</p>
408 <p>Multiple servos may be queried in the same command. The return value will be one byte per servo. There will be a delay of at least 50uS to 5mS
409 before the response is sent Typically the response will be started within 100uS.</p>
410 <p><span class="headsm"><a name="readdin">Read Digital Inputs.</a></span></p>
411 <p>Example: "A B C D AL BL CL DL &lt;cr&gt; "</p>
412 <p>A, B, C, and D are normal input reads. They read the value on the input as a binary value. It returns ASCII "0" if the input is a low
413 (0v) or an ASCII "1" if the input is a high (+5v).</p>
414 <p>AL, BL, CL, and DL are latching input reads. They return the value on the input as an ASCII "0" if the input is a low (0v) or if it has
415 been low since the last *L command. It returns a high (+5v) if the input is high and never went low since the last *L command. Simply stated, it
416 will return a low if the input ever goes low. Reading the status simply resets the latch.</p>
417 <p>The ABCD inputs have a weak pullup (~50k) that is enabled when used as inputs. They are checked approximately every 1mS, and are debounced for
418 approximately 15mS. The logic value for the read commands will not be changed until the input has been at the new logic level continuously for 15mS.
419 The Read Digital Input Commands can be grouped in a single read, up to 8 values per read. They will return a string with one character per input
420 with no spaces.</p>
421 <p>Read Digital Input Example: "A B C DL &lt;cr&gt;"</p>
422 <p><span class="headsm"><a name="readain">Read Analog Inputs.</a></span></p>
423 <p>Example: "VA VB VC VD &lt;cr&gt;"</p>
424 <p>VA, VB, VC, and VD read the value on the input as analog. It returns a single byte with the 8-bit (binary) value for the voltage on the pin.</p>
425 <p>When the ABCD inputs are used as analog inputs the internal pullup is disabled. The inputs are digitally filtered to reduce the effect of noise.
426 The filtered values will settle to their final values within 8mS of a change. A return value of 0 represents 0vdc. A return value of 255 represents
427 +4.98vdc. To convert the return value to a voltage, multiply by 5/256. At power up the ABCD inputs are configured for digital input with pullup. <span style="color: #FF0000">The
428 first time a V* command is used, the pin will be converted to analog without pullup. The result of this first read will not return valid data.</span></p>
429 <p>Read Analog Input Example: "VA VB &lt;cr&gt;"</p>
430 <p>This example will return 2 bytes with the analog values of A and B. For example is the voltage on Pin A is 2vdc and Pin B is 3.5vdc, the return
431 value will be the bytes 102 (binary) and 179 (binary).</p>
432 <p><span class="headsm"><a name="hexseqcom">12 Servo Hexapod Sequencer Commands.</a></span></p>
433 <p>LH &lt;arg&gt;, LM &lt;arg&gt;, LL &lt;arg&gt;</p>
434 <p>Set the value for the vertical servos on the left side of the hexapod. LH sets the high value, i.e. the pulse width to raise the leg to its
435 maximum height; LM sets the mid value; and LL sets the low value. The valid range for the arguments is 500 to 2500uS.</p>
436 <p>RH &lt;arg&gt;, RM &lt;arg&gt;, RL &lt;arg&gt;</p>
437 <p>Set the value for the vertical servos on the right side of the hexapod. RH sets the high value, i.e. the pulse width to raise the leg to its
438 maximum height; RM sets the mid value; RL sets the low value. The valid range for the arguments is 500 to 2500uS.</p>
439 <p>VS &lt;arg&gt;</p>
440 <p>Sets the speed for movement of vertical servos. All vertical servo moves use this speed. Valid range is 0 to 65535uS/Sec.</p>
441 <p>LF &lt;arg&gt;, LR &lt;arg&gt;</p>
442 <p>Set the value for the horizontal servos on the left side of the robot. LF sets the front value, i.e. the pulse width to move the leg to the
443 maximum forward position; LR sets the rear value. The valid range for the arguments is 500 to 2500uS.</p>
444 <p>RF &lt;arg&gt;, RR &lt;arg&gt;</p>
445 <p>Set the values for the horizontal servos on the right side of the robot. RF sets the front value, i.e. the pulse width to move the leg to the
446 maximum forward position; RR sets the rear value. The valid range for the arguments is 500 to 2500uS.</p>
447 <p>HT &lt;arg&gt;</p>
448 <p>Sets the time to move between horizontal front and rear positions. The valid range for the argument is 1 to 65535uS.</p>
449 <p>XL &lt;arg&gt;, XR &lt;arg&gt;</p>
450 <p>Set the travel percentage for left and right legs. The valid range is -100% to 100%. Negative values cause the legs on the side to move in
451 reverse. With a value of 100%, the legs will move between the front and rear positions. Lower values cause the travel to be proportionally less, but
452 always centered. The speed for horizontal moves is adjusted based on the XL and XR commands, so the move time remains the same.</p>
453 <p>XS &lt;arg&gt;</p>
454 <p>Set the horizontal speed percentage for all legs. The valid range is 0% to 200%. With a value of 100%, the horizontal travel time will be the
455 value programmed using the HT command. Higher values proportionally reduce the travel time; lower values increase it. A value of 0% will stop the
456 robot in place. The hex sequencer will not be started until the XS command is received.</p>
457 <p>XSTOP</p>
458 <p>Stop the hex sequencer. Return all servos to normal operation.</p>
459 <p><span class="headsm"><a name="hexseqnote">Notes on Hexapod Sequencer.</a></span></p>
460 <ol>
461 <li>The following servo channels are used for the hex sequencer:<br>
462 &nbsp;
463 <table border="1" bordercolor="#000000" >
464 <tbody><tr>
465 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">0</td>
466 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Rear Vertical</td>
467 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">16</td>
468 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Rear Vertical</td>
469 </tr>
470 <tr>
471 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">1</td>
472 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Rear Horizontal</td>
473 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">17</td>
474 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Rear Horizontal</td>
475 </tr>
476 <tr>
477 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">2</td>
478 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Center Vertical</td>
479 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">18</td>
480 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Center Vertical</td>
481 </tr>
482 <tr>
483 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">3</td>
484 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Center Horizontal</td>
485 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">19</td>
486 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Center Horizontal</td>
487 </tr>
488 <tr>
489 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">4</td>
490 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Front Vertical</td>
491 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">20</td>
492 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Front Vertical</td>
493 </tr>
494 <tr>
495 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">5</td>
496 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Right Front Horizontal</td>
497 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">21</td>
498 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Left Front Horizontal</td>
499 </tr>
500 </tbody></table>
501 &nbsp;</li>
502 <li>The hexapod walking gait is an alternating tripod. The tripods are labeled Tripod A and Tripod B. Tripod A consists of {Left Front, Left Rear,
503 Right Center}, and Tripod B consists of {Left Center, Right Front, Right Rear}.</li>
504 <li>While walking, the legs pass through 6 points: (Low Front), (Low Center), (Low Rear), (Mid Rear), (High Center), and (Mid Front).
505 "Center" refers to the mid-point between the Front and Rear positions.<br>
506 &nbsp;<br>
507 <img border="0" src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/servo-erector-set-system/ses-electronics/ses-modules/ssc-32/ssc-32-manual/WebHome/h2seqdia.gif" ><br>
508 &nbsp;</li>
509 <li>The walking sequence consists of 8 states, numbered 0-7. They are defined below:<br>
510 &nbsp;
511 <table border="1" bordercolor="#000000" >
512 <tbody><tr>
513 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" rowspan="2"><b>State</b></td>
514 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b>Tripod A</b></td>
515 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b>Tripod B</b></td>
516 </tr>
517 <tr>
518 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Vertical</b></td>
519 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Horizontal</b></td>
520 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Vertical</b></td>
521 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Horizontal</b></td>
522 </tr>
523 <tr>
524 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">0</td>
525 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
526 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front to Center</td>
527 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Mid to High</td>
528 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear to Center</td>
529 </tr>
530 <tr>
531 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">1</td>
532 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
533 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Center to Rear</td>
534 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">High to Mid</td>
535 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Center to Front</td>
536 </tr>
537 <tr>
538 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">2</td>
539 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
540 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear</td>
541 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Mid to Low</td>
542 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front</td>
543 </tr>
544 <tr>
545 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">3</td>
546 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low to Mid</td>
547 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear</td>
548 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
549 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front</td>
550 </tr>
551 <tr>
552 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">4</td>
553 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Mid to High</td>
554 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear to Center</td>
555 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
556 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front to Center</td>
557 </tr>
558 <tr>
559 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">5</td>
560 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">High to Mid</td>
561 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Center to Front</td>
562 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
563 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Center to Rear</td>
564 </tr>
565 <tr>
566 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">6</td>
567 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Mid to Low</td>
568 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front</td>
569 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
570 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear</td>
571 </tr>
572 <tr>
573 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0">7</td>
574 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low</td>
575 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Front</td>
576 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Low to Mid</td>
577 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Rear</td>
578 </tr>
579 </tbody></table>
580 <br>
581 In this table, "Front" and "Rear" are modified by the XL and XR commands. A value of 100% results in the movement in the
582 table. Between 0 and 100%, the Front/Rear positions are moved closer to Center. For negative values, Front and Rear are exchanged. For example,
583 with an XL of -100%, in State 0, Tripod A on the left side would be moving Rear to Center, and Tripod B would be moving Front to Center.</li>
584 <li>When a horizontal servo is moving, its speed will be adjusted based on the Front/Rear pulse widths, the XL/XR percentage, and the XS
585 percentage. Regardless of the travel distance from front to rear (adjusted by XL/XR), the total move time will be the HT divided by the XS
586 percentage.</li>
587 <li>When a vertical servo is moving from Low to Mid or from Mid to Low, it will move at the speed specified by the VS command. When a vertical
588 servo is moving from Mid to High or High to Mid, the vertical speed will be adjusted so that the horizontal and vertical movements end at the
589 same time.</li>
590 <li>Any of the Hex Sequencer commands can be issued while the sequencer is operating. They will take effect immediately.</li>
591 </ol>
592 <p>Hex Sequencer Examples:</p>
593 <p>"LH1000 LM1400 LL1800 RH2000 RM1600 RL1200 VS3000 &lt;cr&gt;"</p>
594 <p>Sets the vertical servo parameters.</p>
595 <p>"LF1700 LR1300 RF1300 RR1700 HT1500 &lt;cr&gt;"</p>
596 <p>Sets the horizontal servo parameters.</p>
597 <p>"XL50 XR100 XS100 &lt;cr&gt;"</p>
598 <p>Causes the gradual left turn at 100% speed (and starts the sequencer if it is not already started).</p>
599 <p>"XL -100 XR 100 XS 50 &lt;cr&gt;"</p>
600 <p>Causes a left rotate in place at 50% speed.</p>
601 <p>"XSTOP &lt;cr&gt;"</p>
602 <p>Stops the sequencer and allows servo channels 0-5, 16-21 to be controlled using the normal servo commands.</p>
603 <p><span class="headsm"><a name="qhexseq">Query Hex Sequencer State.</a></span></p>
604 <p>XQ &lt;cr&gt;</p>
605 <p>Returns 1 digit representing the state of the hex sequencer, and the approximate percentage of movement in the state. The high nibble will be '0'
606 to '7', and the low nibble will be '0' to '9'. For example, if the sequencer is 80% of the way through state 5, it will return the value 58 (hex).</p>
607 <p><span class="headsm"><a name="softver">Get Software Version.</a></span></p>
608 <p>VER &lt;cr&gt;</p>
609 <p>Returns the software version number as an ASCII string.</p>
610 <p><span class="headsm"><a name="firmupg">Firmware Upgrade.</a></span></p>
611 <p>Updating the firmware is an easy straight forward task, but can only be done at 115.2k baud. Unlike simple VER or servo move commands, updating the firmware requires fast
612 bi-directional serial communications. If you are experiencing problems with this please check over the
613 <a href="https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/support/serial-usb-serial-port-troubleshooting/" target="_blank"> serial port troubleshooting guide</a> to ensure your serial port and or USB to serial drivers are
614 optimized.</p>
615 <p>Upgrading the firmware is best done with Lynxterm or one of our other software packages. Detailed instructions on upgrading the firmware is
616 included in the software manuals.</p>
617 <p><span class="headsm"><a name="transboot">Transfer to Boot.</a></span></p>
618 <p>GOBOOT &lt;cr&gt;</p>
619 <p>Starts the bootloader running for software updates. To exit the bootloader and start running the application, power cycle the control or enter
620 (case sensitive, no spaces):</p>
621 <p>"g0000&lt;cr&gt;"</p>
622 <p><span class="headsm"><a name="sscemu">Mini SSC-II Emulation.</a></span></p>
623 <p>Binary format, 3-bytes.</p>
624 <table border="1" bordercolor="#000000" >
625 <tbody><tr>
626 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Byte 1</b></td>
627 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">255, the sync byte</td>
628 </tr>
629 <tr>
630 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Byte 2</b></td>
631 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0 - 31, the servo number</td>
632 </tr>
633 <tr>
634 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Byte 3</b></td>
635 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0 - 250, the pulse width; 0=500uS, 125=1500uS, 250=2500uS</td>
636 </tr>
637 </tbody></table>
638 <br>
639 <hr color="#808080">
640 <p align="center"><span class="headmd"><a name="ssc32reg">SSC-32 Registers</a></span></p>
641 <p><span class="headsm"><a name="reggen">Register General Info</a></span></p>
642 <table border="1" bordercolor="#000000" >
643 <tbody><tr>
644 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Number</b></td>
645 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Name</b></td>
646 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Minimum</b></td>
647 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Maximum</b></td>
648 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Default</b></td>
649 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Description</b></td>
650 </tr>
651 <tr>
652 <td align="center" bordercolor="#C0C0C0">0</td>
653 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Enable</td>
654 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
655 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">65535</td>
656 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
657 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">A bit field (16 bits) that enables various features of the SSC-32.</td>
658 </tr>
659 <tr>
660 <td align="center" bordercolor="#C0C0C0">1</td>
661 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Transmit Delay</td>
662 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
663 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">65535</td>
664 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">600</td>
665 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">The delay, in microseconds, before transmitting the first byte of a response from the SSC-32.</td>
666 </tr>
667 <tr>
668 <td align="center" bordercolor="#C0C0C0">2</td>
669 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Transmit Pacing</td>
670 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
671 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">65535</td>
672 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">70</td>
673 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">The delay, in microseconds, between bytes in a response from the SSC-32.</td>
674 </tr>
675 <tr>
676 <td align="center" bordercolor="#C0C0C0">3-31</td>
677 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">(Reserved)</td>
678 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
679 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
680 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
681 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
682 </tr>
683 <tr>
684 <td align="center" bordercolor="#C0C0C0">32-63</td>
685 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Initial Pulse Offset</td>
686 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">-100</td>
687 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">100</td>
688 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
689 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">The initial value of the pulse offset (PO) for each servo. Register 32 corresponds to servo #0,
690 register 33 to servo #1, etc.</td>
691 </tr>
692 <tr>
693 <td align="center" bordercolor="#C0C0C0">64-95</td>
694 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Initial Pulse Width</td>
695 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">0</td>
696 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">65535</td>
697 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">1500</td>
698 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">The initial value of the pulse width for each servo. Register 64 corresponds to servo #0, register
699 65 to servo #1, etc. A value of 0 leaves the servo output at a continuous logic '0'; a value of 65535 leaves the servo output at a continuous
700 logic '1'. All other values are clipped to the range 500 - 2500 microseconds.</td>
701 </tr>
702 <tr>
703 <td align="center" bordercolor="#C0C0C0">96-255</td>
704 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">(Reserved)</td>
705 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
706 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
707 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
708 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
709 </tr>
710 </tbody></table>
711 <p>Note: Registers 0-15 are intended for global use, affecting all operation of the SSC-32; registers 32-255 are intended for individual servo
712 channel configuration, and so are in groups of 32 registers.</p>
713 <p><span class="headsm"><a name="enregdef">Enable Register (R0) Bit Definitions</a></span></p>
714 <table border="1" bordercolor="#000000" >
715 <tbody><tr>
716 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Bit</b></td>
717 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Name</b></td>
718 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Definition</b></td>
719 </tr>
720 <tr>
721 <td align="center" bordercolor="#C0C0C0">15 (msb)</td>
722 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Global Disable</td>
723 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">If '1', disables all of the featured controlled by the Enable register.<br>
724 If '0', the individual bit values will be used to enable or disable the features.</td>
725 </tr>
726 <tr>
727 <td align="center" bordercolor="#C0C0C0">14-4</td>
728 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">(Reserved)</td>
729 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">--</td>
730 </tr>
731 <tr>
732 <td align="center" bordercolor="#C0C0C0">3</td>
733 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Initial Pulse Width Enable</td>
734 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">If '1', enables the Initial Pulse Width register values at startup.<br>
735 If '0', the default value of 0 will be used.</td>
736 </tr>
737 <tr>
738 <td align="center" bordercolor="#C0C0C0">2</td>
739 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Initial Pulse Offset Enable</td>
740 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">If '1', enables the Initial Pulse Offset register values at startup.<br>
741 If '0', the default value of 0 will be used.</td>
742 </tr>
743 <tr>
744 <td align="center" bordercolor="#C0C0C0">1</td>
745 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">TX Delay/Pacing Enable</td>
746 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">If '1', enables the Transmit Delay and Transmit Pacing values.<br>
747 If '0', the default values of 600uS and 70uS will be used.</td>
748 </tr>
749 <tr>
750 <td align="center" bordercolor="#C0C0C0">0 (lsb)</td>
751 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Startup String Enable</td>
752 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">If '1', enables execution of the startup string when power is applied to the SSC-32.<br>
753 If '0', the startup string will not be executed.</td>
754 </tr>
755 </tbody></table>
756 <p><span class="headsm"><a name="regrw">Register Read/Write</a></span></p>
757 <table border="1" bordercolor="#000000" >
758 <tbody><tr>
759 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Command</b></td>
760 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Argument</b></td>
761 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Description</b></td>
762 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Examples</b></td>
763 </tr>
764 <tr>
765 <td align="center" bordercolor="#C0C0C0" >Register write:<br>
766 R &lt;r&gt; = &lt;n&gt; &lt;cr&gt;</td>
767 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >r = reg number, 0-255<br>
768 n = value</td>
769 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Programs the value of a register. Spaces are optional around the register number and value.</td>
770 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >R0=1023 &lt;cr&gt;<br>
771 R32 = -50 &lt;cr&gt;</td>
772 </tr>
773 <tr>
774 <td align="center" bordercolor="#C0C0C0" >Register read:<br>
775 R &lt;r&gt; &lt;cr&gt;</td>
776 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >r = reg number, 0-255</td>
777 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Displays the value of a register, followed by a carriage return. The displayed value is in ASCII
778 format, and is terminated with a carriage return.</td>
779 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >R0 &lt;cr&gt;<br>
780 &nbsp;result: 1023&lt;cr&gt;<br>
781 R32 &lt;cr&gt;<br>
782 &nbsp;result: -50&lt;cr&gt;</td>
783 </tr>
784 <tr>
785 <td align="center" bordercolor="#C0C0C0" >Set to defaults:<br>
786 RDFLT &lt;cr&gt;</td>
787 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >none</td>
788 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Sets all of the registers to their default values. When the command is complete the SSC-32 will
789 transmit the string OK&lt;cr&gt;.</td>
790 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >RDFLT &lt;cr&gt;<br>
791 &nbsp;result: OK&lt;cr&gt;</td>
792 </tr>
793 </tbody></table>
794 <p>The RDFLT command may take over a second to execute. It should not be invoked while a timed move or sequence player is active. No register writes
795 should be performed until the RDFLT is complete (as indicated by the 'ok' response).</p>
796 <p>If multiple R= commands are being sent by software, it is recommended that the software read the value of each register after it is written. This
797 will ensure that each register write has completed before the next is started.</p>
798 <p>If an RDFLT or R= command is executing, do not power down the SSC-32 until the command has completed. To determine whether the command has
799 completed, read a register value.</p>
800 <p>Each time a register is written, the EEPROM location(s) used to store the value experience a small amount of wearout. The typical maximum number
801 of writes is 100,000. Do not write your software to rapidly change the register values, or you might cause a permanent wearout of the EEPROM in the
802 ATMega168 processor.</p>
803 <p><span class="headsm"><a name="miscregcom">Miscellaneous Register Commands</a></span></p>
804 <table border="1" bordercolor="#000000" >
805 <tbody><tr>
806 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Command</b></td>
807 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Argument</b></td>
808 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Description</b></td>
809 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Examples</b></td>
810 </tr>
811 <tr>
812 <td align="center" bordercolor="#C0C0C0" >STOP &lt;n&gt; &lt;cr&gt;</td>
813 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >0-31</td>
814 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Immediately stops the specified servo at its current position. A space is optional before the servo
815 number.</td>
816 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >STOP0 &lt;cr&gt;<br>
817 STOP 31 &lt;cr&gt;</td>
818 </tr>
819 </tbody></table>
820 <p>If the servo is part of a timed move, the other servos will continue moving and a query command will indicate that the move continues until the
821 total time for the original move has elapsed. This is true even if <i>all</i> of the servos in the original move are stopped.</p>
822 <p>The EER and EEW commands no longer work to access internal EEPROM. They are replaced by Register Read/Write and Startup String commands. EER and
823 EEW continue to function for external EEPROM.</p>
824 <p><span class="headsm"><a name="startstr">Startup Strings</a></span></p>
825 <table border="1" bordercolor="#000000" >
826 <tbody><tr>
827 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" ><b>Command</b></td>
828 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Argument</b></td>
829 <td bordercolor="#808080" bgcolor="#C0C0C0" align="center"><b>Description / Examples</b></td>
830 </tr>
831 <tr>
832 <td align="center" bordercolor="#C0C0C0" >Delete characters:<br>
833 SSDEL &lt;n&gt; &lt;cr&gt;</td>
834 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >0-255</td>
835 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Deletes &lt;n&gt; characters from the end of the startup string. If &lt;n&gt; is greater than the
836 length of the startup string, then SSDEL deletes the entire string.
837 <p>SSDEL 5 &lt;cr&gt;<br>
838 &nbsp;- Deleted the last 5 characters of the startup string<br>
839 SSDEL 255 &lt;cr&gt;<br>
840 &nbsp;- Deletes the entire startup string</p></td>
841 </tr>
842 <tr>
843 <td align="center" bordercolor="#C0C0C0" >Concatenate:<br>
844 SSCAT &lt;string&gt; &lt;cr&gt;</td>
845 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Up to 100 ASCII characters</td>
846 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Concatenates &lt;string&gt; to the current startup string. The blank space immediately following
847 "SSCAT" is ignored, but all other spaces are part of the string. The string is terminated by a carriage return, and may not contain
848 embedded carriage returns. Commands in the startup string are terminated with a semicolon (including the last command).
849 <p>SSCAT #0P1000#1P2000T3000;&lt;cr&gt;<br>
850 SSCAT PL0 SQ5 SM50;&lt;cr&gt;</p></td>
851 </tr>
852 <tr>
853 <td align="center" bordercolor="#C0C0C0" >Display startup string:<br>
854 SS &lt;cr&gt;</td>
855 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >none</td>
856 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF">Displays the entire startup string, surrounded by quotation marks and followed by a carriage return.
857 <p>SS &lt;cr&gt;<br>
858 &nbsp;result: "#0P1000#1P2000T3000;PL0 SQ5 SM50;"&lt;cr&gt;</p></td>
859 </tr>
860 </tbody></table>
861 <p>The programmed startup string is executed at powerup of the SSC-32, if the Startup String Enable bit is set in the Enable register. The Startup
862 String is executed after any register values are applied (e.g. initial pulse width).</p>
863 <p>The maximum total length of the startup string is 100 ASCII characters. Any additional characters will be ignored.</p>
864 <p>The following commands should not be used in a startup string: EER, EEW, R=, SSCAT, SSDEL.</p>
865 <p>The SS command may take hundreds of milliseconds to execute, depending on baud rate. It should not be invoked while a timed move or sequence
866 player is active.</p>
867 <p>The SSCAT command may take hundreds of milliseconds to execute. It should not be invoked while a timed move or sequence player is active.</p>
868 <p>If an SSDEL or SSCAT command is executing, do not power down the SSC-32 until the command has been completed. To determine whether the command
869 has completed, send an SS command and wait for the response.</p>
870 <p>Each time the startup string is changed the EEPROM locations used to store the value experience a small amount of wearout. The typical maximum
871 number of writes is 100,000. Do not write your software to rapidly change the startup string, or you might cause permanent wearout of the EEPROM in
872 the ATmega168 processor.</p>
873 <table border="1" bordercolor="#000000" >
874 <tbody><tr>
875 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b>Startup String Examples</b></td>
876 </tr>
877 <tr>
878 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Command</b></td>
879 <td bordercolor="#808080" bgcolor="#C0C0C0" ><b>Result</b></td>
880 </tr>
881 <tr>
882 <td align="center" bordercolor="#C0C0C0">SSDEL 255 &lt;cr&gt;<br>
883 SS &lt;cr&gt;</td>
884 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >""&lt;cr&gt;</td>
885 </tr>
886 <tr>
887 <td align="center" bordercolor="#C0C0C0">SSCAT #0P2000T5000;&lt;cr&gt;<br>
888 SS &lt;cr&gt;</td>
889 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >"#0P2000T5000;"&lt;cr&gt;</td>
890 </tr>
891 <tr>
892 <td align="center" bordercolor="#C0C0C0">SSCAT XXXX&lt;cr&gt;<br>
893 SSC &lt;cr&gt;</td>
894 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >"#0P2000T5000;XXXX"&lt;cr&gt;</td>
895 </tr>
896 <tr>
897 <td align="center" bordercolor="#C0C0C0">SSDEL 4 &lt;cr&gt;<br>
898 SS &lt;cr&gt;</td>
899 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >"#0P2000T5000;"&lt;cr&gt;</td>
900 </tr>
901 <tr>
902 <td align="center" bordercolor="#C0C0C0">SSDEL 6 &lt;cr&gt;<br>
903 SS &lt;cr&gt;</td>
904 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >"#0P2000"&lt;cr&gt;</td>
905 </tr>
906 <tr>
907 <td align="center" bordercolor="#C0C0C0">SSCAT #1P1000T4000;PL0SQ5;&lt;cr&gt;<br>
908 SS &lt;cr&gt;</td>
909 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >"#0P2000#1P1000T4000;PL0SQ5;"&lt;cr&gt;</td>
910 </tr>
911 </tbody></table>
912 <p><span class="headsm"><a name="moreexamp">Additional Examples</a></span></p>
913 <table border="1" bordercolor="#000000" >
914 <tbody><tr>
915 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0" colspan="2"><b>Additional</b><b> Examples</b></td>
916 </tr>
917 <tr>
918 <td align="center" bordercolor="#808080" bgcolor="#C0C0C0"><b>Command</b></td>
919 <td bordercolor="#808080" bgcolor="#C0C0C0" ><b>Result</b></td>
920 </tr>
921 <tr>
922 <td align="center" bordercolor="#C0C0C0">RDFLT</td>
923 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Set all registers to default values</td>
924 </tr>
925 <tr>
926 <td align="center" bordercolor="#C0C0C0">SSDEL 255</td>
927 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Erase the startup string</td>
928 </tr>
929 <tr>
930 <td align="center" bordercolor="#C0C0C0">R0</td>
931 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Display register 0</td>
932 </tr>
933 <tr>
934 <td align="center" bordercolor="#C0C0C0">R0=2<br>
935 R1=2000<br>
936 R2=1000</td>
937 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Set TX delay to 2000uS and TX pacing to 1000uS. (R0=2: Bit 1 of R0 enables TX
938 delay/pacing.)</td>
939 </tr>
940 <tr>
941 <td align="center" bordercolor="#C0C0C0">R0=12<br>
942 R32=50<br>
943 R64=1000</td>
944 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Set the pulse offset for servo 0 to 50 and the initial pulse width to 1000. (Bits 2 and
945 3 of R0 enable pulse offset and pulse width.)</td>
946 </tr>
947 <tr>
948 <td align="center" bordercolor="#C0C0C0">R0=13<br>
949 SSDEL 255<br>
950 SSCAT #0P1500T5000;</td>
951 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Move R0 slowly to a pulse width of 1500 at startup. Assume the initial pulse width is
952 set as in the previous example. (Bit 0 of R0 enables the startup string.)</td>
953 </tr>
954 <tr>
955 <td align="center" bordercolor="#C0C0C0">SS</td>
956 <td bordercolor="#C0C0C0" bgcolor="#FFFFFF" >Display the current startup string.</td>
957 </tr>
958 </tbody></table>
959 <br>
960 <hr color="#808080">
961 <p align="center"><span class="headmd"><a name="tshoot">Troubleshooting</a></span></p>
962 <p><span class="headsm"><a name="testcont">Testing the Controller</a></span></p>
963 <p>&nbsp;The easiest way to test the controller is to use LynxTerm, our free terminal program. LynxTerm is downloadable <a href="http://www.lynxmotion.com/showproduct.aspx?productID=567&amp;CategoryID=15" target="_blank">here</a>.</p>
964 <p>Once installed, click on the Port drop down and select your com port. This will work with USB-to-serial port adapters. Install the jumpers for
965 115.2k baud and the two DB9 serial port enable jumpers. Plug a straight-through DB9 M/F cable from the PC to the controller.</p>
966 <p>Install two servos, one on Channel 0 and the other on Channel 1.</p>
967 <p>Power up the SSC-32 (Logic and Servo) and notice the green LED is illuminated.</p>
968 <p>Click on the terminal window so you can type the following into it. Remember that &lt;cr&gt; means to press the Enter key.<br>
969 #0 P1500 #1 P1500 &lt;cr&gt;</p>
970 <p>You should notice both servos are holding position in the center of their range. The LED is also no longer illuminated. It will now only light
971 when the controller is receiving data. Type the following:<br>
972 #0 P750 #1 P1000 T3000 &lt;cr&gt;</p>
973 <p>You should notice both servos moving clockwise, with servo 0 moving slowly and servo 1 moving a bit faster. They will arrive at their destinations at the same time even
974 though they are moving different distances.</p>
975 <p>Now to test the Query Movement Status. Type the following:<br>
976 #0 P750 &lt;cr&gt;</p>
977 <p>Then type the following line. This will make the servo move full range in 10 seconds.<br>
978 #0 P2250 T10000 &lt;cr&gt;</p>
979 <p>While the servo is moving, type the following:<br>
980 Q &lt;cr&gt;</p>
981 <p>When the servo is in motion the controller will return a "+". It will return a "." when it has reached its destination.</p>
982 <p>To experiment with the speed argument, try the following:<br>
983 #0 P750 S1000 &lt;cr&gt;</p>
984 <p>This will move the servo from 2250 to 750 (around 170°) in 1.5 seconds.<br>
985 Travel Distance / Speed Value = Travel Time<br>
986 (2250uS-750uS) / (1000uS/Sec.) = 1.5 Sec.</p>
987 <p>Next try typing the following:<br>
988 #0 P2250 S750 &lt;cr&gt;</p>
989 <p>This will move the servo from 750 to 2250 (around 170°) in 2.0 seconds.<br>
990 (2250uS-750uS) / (750uS/Sec.) = 2.0 Sec.</p>
991 <p>Speed values above around 3500 will move the servo as quickly as it can move.</p>
992 <p><span class="headsm"><a name="trouble">General Troubleshooting</a></span></p>
993 <p>If you notice the servos turn off or stop holding position when moving several servos at one time, this indicates that the SSC-32 has reset. This
994 can be verified by noticing if the green LED is on steady after the servos are instructed to move. The green LED is not a power indicator, but a
995 status indicator. When the SSC-32 is turned on, the LED will be on steady. It will remain on until it has received a serial character, then it will
996 go out and only blink when receiving serial data.</p>
997 <p>The SSC-32 has two power supply inputs. The logic supply (VL) powers the microcontroller and its support circuitry through a 5vdc regulator. The
998 servo supply (VS) powers the servos directly. In single supply mode (default) the jumpers VS1=VL will provide power to the 5vdc regulator from the
999 VS terminal. This works great for battery use, and with most wall pack use, as long as the voltage does not drop too much. However, if it does drop,
1000 the voltage to the microcontroller is interrupted and the SSC-32 resets. To fix this you remove the VS1=VL jumper and connect a 9vdc battery clip to
1001 the VL input. This isolates the servo and logic supplies so one cannot affect the other.</p>
1002 <p>The only other thing that can cause this effect is a poor power delivery
1003 system. If the wires carrying the current are too small, or connections are made with stripped and twisted wire, or cheap plastic battery holders
1004 are used, the same problem may occur. 99% of problems with the SSC-32 are power supply related. If you are noticing erratic or unstable servo
1005 movements, look at the power delivery system.</p>
1006 <p><span class="headsm"><a name="usb2s">Communicating - USB to Serial Cables</a></span></p>
1007 <p>The fastest way to use the SSC-32 is with a PC that has a real serial port. If you have a desktop PC that does not have a serial port it is
1008 recommended that you install a serial port card into the PC. Here is a <a href="http://www.lynxmotion.com/images/html/build126.htm">mini tutorial</a> showing the basics of
1009 adding a serial port. If you're using a laptop or PC without a serial port you can use a USB to serial cable. We recommend the <a href="http://www.lynxmotion.com/showproduct.aspx?productID=699" target="_blank">FTDI
1010 USB to serial cable</a>.<br>
1011 <br>
1012 Note: FTDI based USB to serial cables have properties in their drivers called Latency and Buffer. You will need to reduce the size of the buffer
1013 from 4k to 1k, and the Latency from 16 to 1. As drivers and hardware change it may be necessary to experiment with these values.</p>
1014 <p>If you have trouble with a USB to Serial cable, please refer to our <a href="http://www.lynxmotion.net/viewtopic.php?t=4702" target="_blank">troubleshooting
1015 guide</a>.</p>
1016 <hr color="#808080">
1017 <p align="center"><span class="headmd"><a name="baex">Basic Atom Programming Examples</a></span></p>
1018 <p><span class="headsm"><a name="ssc32ex">Atom / SSC-32 Test Example</a></span></p>
1019 <div class="code">
1020 <p>' Atom / SSC-32 Test<br>
1021 ' Configure the SSC-32 for 38.4k baud.
1022 </p><p>' Note, a | means the line continues onto the next line.<br>
1023 ' Note, a ' means the line is a comment, and will not be compiled.</p>
1024 <p>servo0pw var word<br>
1025 movetime var word</p>
1026 <p>servo0pw = 1000<br>
1027 movetime = 2500</p>
1028 <p>start:<br>
1029 servo0pw = 1000<br>
1030 serout p0,i38400,["#0P",DEC servo0pw,"T",DEC movetime,13]<br>
1031 pause 2500<br>
1032 servo0pw = 2000<br>
1033 serout p0,i38400,["#0P",DEC servo0pw,"T",DEC movetime,13]<br>
1034 pause 2500<br>
1035 goto start</p>
1036 </div>
1037 <p><span class="headsm"><a name="bipedex">Simple Biped Example</a></span></p>
1038 <div class="code">
1039 <p>' Biped example program.<br>
1040 aa&nbsp; var byte '&lt;- general purpose variable.<br>
1041 rax var word '&lt;- right ankle side-to-side. On pin0<br>
1042 ray var word '&lt;- right ankle front-to-back. On pin1<br>
1043 rkn var word '&lt;- right knee. On pin2<br>
1044 rhx var word '&lt;- right hip front-to-back. On pin3<br>
1045 rhy var word '&lt;- right hip side-to-side. On pin4<br>
1046 lax var word '&lt;- left ankle side-to-side. On pin5<br>
1047 lay var word '&lt;- left ankle front-to-back. On pin6<br>
1048 lkn var word '&lt;- left knee. On pin7<br>
1049 lhx var word '&lt;- left hip front-to-back. On pin8<br>
1050 lhy var word '&lt;- left hip side-to-side. On pin9<br>
1051 ttm var word '&lt;- time to take for the current move.</p>
1052 <p>' First command to turn the servos on.<br>
1053 for aa=0 to 9<br>
1054 serout p0,i38400,["#", DEC2 aa\1, "P", DEC 1500, 13]<br>
1055 next</p>
1056 <p>start:<br>
1057 ' First position for step sequence, and time to move, put in your values here.<br>
1058 rax=1400: ray=1400: rkn=1400: rhx=1400: rhy=1400<br>
1059 lax=1400: lay=1400: lkn=1400: lhx=1400: lhy=1400<br>
1060 ttm=1000<br>
1061 gosub send_data<br>
1062 pause ttm</p>
1063 <p>' Second position for step sequence, and time to move, put in your values here.<br>
1064 rax=1600: ray=1600: rkn=1600: rhx=1600: rhy=1600<br>
1065 lax=1600: lay=1600: lkn=1600: lhx=1600: lhy=1600<br>
1066 ttm=1000<br>
1067 gosub send_data<br>
1068 pause ttm</p>
1069 <p>' Third...</p>
1070 <p>' Forth...</p>
1071 <p>' Etc...</p>
1072 <p>goto start</p>
1073 <p>' This sends the data to the SSC-32. The serout is all one line. Use |!<br>
1074 send_data:<br>
1075 serout p0,i38400,["#0P",DEC rax,"#1P",DEC ray,"#2P",DEC rkn,"#3P",DEC |<br>
1076 rhx,"#4P",DEC rhy,"#5P",DEC lax,"#6P",DEC lay,"#7P",DEC lkn,"#8P",DEC |<br>
1077 lhx,"#9P",DEC lhy,"T",DEC ttm,13]<br>
1078 return
1079 </p></div>
1080 &nbsp;
1081 </div>
1082 </body>
1083 {{/html}}
Copyright RobotShop 2018