From version < 9.1 >
edited by Eric Nantel
on 2023/01/20 11:03
To version < 10.1 >
edited by Eric Nantel
on 2023/01/20 11:08
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,174 @@
1 1  {{html wiki="false" clean="true"}}
2 -
2 +<body><table border="0" cellpadding="0" cellspacing="0" >
3 + <tbody><tr>
4 + <td valign="top" align="left" colspan="2"><b><font face="Verdana" size="2">BASIC
5 + Micro Studio Programming Tutorial for BASIC Atom Pro.</font></b>
6 + <p><b><font face="Verdana" size="2">Updated <!--webbot bot="Timestamp" s-type="EDITED" s-format="%m/%d/%Y" startspan -->09/23/2009<!--webbot bot="Timestamp" i-CheckSum="12576" endspan -->.</font></b></p>
7 + <p><b><font face="Verdana" size="2">Safety first!</font></b><font face="Verdana" size="1"> Wear eye protection and never touch a powered robot!</font></p>
8 + <p><font face="Verdana" size="2"><b>Note:</b> The purpose of this tutorial is to illustrate how to download a BASIC program onto the BASIC Atom
9 + Pro processor, and test the functionality of the Bot Board II.</font></p>
10 + <font face="Verdana" size="2">&nbsp;</font></td>
11 + </tr>
12 + <tr>
13 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
14 + </tr>
15 + <tr>
16 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 1.</b><br>
17 + Install the Atom Pro module into the Bot Board II as shown in the diagram below.</font>
18 + <p><font face="Verdana" size="2">Connect the serial data cable to the PC's serial port. This can be recognized by having 9 pins that stick out.
19 + Connect the other end of the serial data cable to the Bot Board's DB9 port. See the troubleshooting guide for a list of tested USB-to-Serial
20 + adaptors.</font></p>
21 + <p><font face="Verdana" size="2">Please consult the <a href="https://community.robotshop.com/forum/t/serial-usb-to-serial-port-troubleshooting/17938" target="_blank">serial
22 + troubleshooting guide</a> if you have difficulties with this.</font></p></td>
23 + <td align="left" valign="top" width="320">
24 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/comp.jpg" border="2" hspace="10" width="320" height="240"><br>
25 + Figure 1.</font></p></td>
26 + </tr>
27 + <tr>
28 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
29 + </tr>
30 + <tr>
31 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2"> Note: This schematic shows the default wiring and jumper configuration; even though servos are not used in this tutorial. Check to make sure
32 + your Bot Board II is set up as shown in the diagram. Connect a 9vdc battery to the Bot Board's VL terminal. The green LED should light up
33 + steadily.</font>
34 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/bb2tst01.gif" border="0" hspace="10" width="600" height="328"><br>
35 + Figure 1.</font></p></td>
36 + </tr>
37 + <tr>
38 + <td valign="top" align="left" colspan="2"><br class="pb">
39 + </td>
40 + </tr>
41 + <tr>
42 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 2.</b><br>
43 + Download and install the latest version of the <a href="http://www.basicmicro.com/Downloads_ep_43.html" target="_blank">BASIC
44 + Micro Studio</a>.</font>
45 + <p><font face="Verdana" size="2">Download the <a href="http://www.lynxmotion.com/images/assembly/bapro/aprotut1.bas">sample BASIC Atom Pro program</a>, and save it on
46 + your computer, somewhere you will be able to easily find it.</font></p>
47 + <p><font face="Verdana" size="2">Open the IDE (double-click the desktop icon, or use the Start menu), then load up the sample program by
48 + clicking on File -&gt; Open.</font></p></td>
49 + <td align="left" valign="top" >
50 + <div align="center">
51 + <center>
52 + <table border="1" width="324" bordercolor="#FFFFFF">
53 + <tbody><tr>
54 + <td width="320" bordercolor="#808080" bgcolor="#C0C0C0">
55 + <p align="center"><font size="1" face="Verdana, Helvetica, sans-serif">Sample BASIC Atom Pro Program</font></p></td>
56 + </tr>
57 + <tr>
58 + <td width="320" bordercolor="#C0C0C0" align="left" valign="middle"><font size="1" face="Courier New"><font color="#808080">;The compiler
59 + will ignore any commands<br>
60 + ;or text after a ; or '</font><br>
61 + <br>
62 + <font color="#0000FF">x var</font> <font color="#FF0000">word</font><br>
63 + <br>
64 + <font color="#0000FF">start</font><br>
65 + <br>
66 + <font color="#808080">;this will sound 3 ascending beeps</font><br>
67 + <font color="#0000FF">sound</font> <font color="#FF0000">9</font>,[<font color="#FF0000">150</font>\<font color="#FF0000">2500</font>, <font color="#FF0000">150</font>\<font color="#FF0000">3000</font>,
68 + <font color="#FF0000">150</font>\<font color="#FF0000">3500</font>]<br>
69 + <font color="#808080">;pause for one second</font><br>
70 + <font color="#0000FF">pause</font> <font color="#FF0000">1000</font><br>
71 + <font color="#808080">;add one to the count</font><br>
72 + <font color="#0000FF">x</font> = <font color="#0000FF">x</font> + <font color="#FF0000">1</font><br>
73 + <font color="#808080">;sends the x back to the computer</font><br>
74 + <font color="#0000FF">serout s_out</font>,<font color="#0000FF">i9600</font>,[DEC x, <font color="#FF0000">13</font>]<br>
75 + <br>
76 + <font color="#808080">;repeat</font><br>
77 + <font color="#0000FF">goto</font> start</font></td>
78 + </tr>
79 + </tbody></table>
80 + </center>
81 + </div>
82 + </td>
83 + </tr>
84 + <tr>
85 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
86 + </tr>
87 + <tr>
88 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2"><b>Step 3.</b><br>
89 + Your screen should now look like Figure 2. Note that you can get more room for your programming window by turning off the "Workspace"
90 + window: either click the X at its top right corner, or from the View menu choose Toolbars, then uncheck the "Workspace" toolbar.</font>
91 + <p><font face="Verdana" size="2">The Build area (labeled "Build" at the bottom) shows error messages and compile time messages. You
92 + can optionally hide the Build window by clicking the X at its top right corner, or from the View -&gt; Toolbars menu ("Results"
93 + toolbar). If you do hide it, make sure you unhide it again before compiling your program so you can see messages.</font></p>
94 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut3.jpg" border="2" hspace="10" width="681" height="400"><br>
95 + Figure 3.</font></p></td>
96 + </tr>
97 + <tr>
98 + <td valign="top" align="left" colspan="2"><br class="pb">
99 + </td>
100 + </tr>
101 + <tr>
102 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 4.</b><br>
103 + Now you need to change some options in order to connect with the Bot Board. </font>
104 + <p><font face="Verdana" size="2">Click on Tools -&gt; Preferences.</font></p></td>
105 + <td align="left" valign="top" >
106 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut4.jpg" border="2" hspace="10" width="320" height="240"><br>
107 + Figure 4.</font></p></td>
108 + </tr>
109 + <tr>
110 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
111 + </tr>
112 + <tr>
113 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 5.</b><br>
114 + Click on "Find Processor". This will locate the COM port that the Bot Board is connected to, and automatically set the appropriate COM
115 + port and processor to default.</font>
116 + <p><font face="Verdana" size="2">Click "OK" to exit the Preferences screen.</font></p></td>
117 + <td align="left" valign="top" >
118 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut5.jpg" border="2" hspace="10" width="320" height="235"><br>
119 + Figure 5.</font></p></td>
120 + </tr>
121 + <tr>
122 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
123 + </tr>
124 + <tr>
125 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 6.</b><br>
126 + If you have trouble with the IDE not connecting with the Atom Pro, you may need to make an adjustment in the Advanced Comm Settings screen.
127 + Click on Tools -&gt; Preferences -&gt; Advanced.</font>
128 + <p><font face="Verdana" size="2">Adjust the "Reset Hold Time" a little at a time, until the IDE is able to connect.</font></p>
129 + <p><font face="Verdana" size="2">If you have no problems connecting, leave these settings alone.</font></p></td>
130 + <td align="left" valign="top" >
131 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut6.jpg" border="2" hspace="10" width="219" height="338"><br>
132 + Figure 6.</font></p></td>
133 + </tr>
134 + <tr>
135 + <td valign="top" align="left" colspan="2"><br class="pb">
136 + </td>
137 + </tr>
138 + <tr>
139 + <td valign="top" align="left"><font face="Verdana" size="2"><b>Step 7.</b><br>
140 + Click on the "Program" button located in the toolbar as shown. This will compile the program and load it onto the Atom Pro.</font>
141 + <p><font face="Verdana" size="2">The program will begin to run as soon as the Atom Pro receives it.</font></p></td>
142 + <td align="left" valign="top" >
143 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut7.jpg" border="2" hspace="10" width="320" height="240"><br>
144 + Figure 7.</font></p></td>
145 + </tr>
146 + <tr>
147 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
148 + </tr>
149 + <tr>
150 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2"><b>Step 8.</b><br>
151 + Click on the "Terminal 1" tab at the bottom of the Output window, at the bottom of the screen. Make sure your settings are as shown in
152 + the figure below.</font>
153 + <p><font face="Verdana" size="2">Click the "Connect" button, and the results of the program (from the "serout" command) will
154 + display as shown.</font></p>
155 + <p align="center"><font face="Verdana" size="2"><img src="https://wiki.lynxmotion.com/info/wiki/lynxmotion/download/support/basic-micro-studio-programming/WebHome/aprotut8.jpg" border="2" hspace="10" width="606" height="199"><br>
156 + Figure 8.</font></p></td>
157 + </tr>
158 + <tr>
159 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2">&nbsp;</font></td>
160 + </tr>
161 + <tr>
162 + <td valign="top" align="left" colspan="2"><font face="Verdana" size="2"><b>Step 9.</b><br>
163 + If you would like to fully test the Bot Board II and Atom Pro, download the <a href="http://www.lynxmotion.com/images/assembly/bapro/bb2tst01.bas">Bot Board II testing
164 + program</a>, and save it on your computer, somewhere you will be able to easily find it. Program the Atom Pro with this code.</font>
165 + <p><font face="Verdana" size="2">When the program is running, you can test the ABC buttons and LEDs. Pressing the A button will add one to a
166 + binary count that is visible on the LEDs. Pressing the B button will subtract one. The C button will clear the count.</font></p>
167 + <p><font face="Verdana" size="2">The speaker circuitry is tested by emitting a tone when the buttons are pressed. All of the I/O pins are
168 + toggled with each button press so you can read them with a volt meter.</font></p>
169 + <p><font face="Verdana" size="2">By clicking on the Terminal 1 tab, you can read the analog input on Pin 16 (AX0), which will reflect the VS
170 + value. You will need to change the Baud rate from 9600 to 57.6k in order to see these values.</font></p></td>
171 + </tr>
172 +</tbody></table>
173 +</body>
3 3  {{/html}}
Copyright RobotShop 2018