|
|
|||||||||||||||||
|
Download The Latest Version SI-Pro Software HERE |
|||||||||||||||||
|
PC Serial Port Setup: Start the SI-Pro software and use the "Settings" button to select the PC serial port the Air-Byte transceiver is connected to. This will be the default communications port each time you start the SI-Pro software.
Each SI-Pro firmware IC is pre-programmed with a default address of 99. When you first start the software select 99 as the address. The software will remember the last address selected, and use this as the SI-Pro hardware address to communicate with each time you start the software. As shown below in Figure #2, select 99 as the address to communicate with. To communicate with an SI-Pro transceiver set to a different address, just select the different address using the drop-down menu.
Finding & Changing The SI-Pro Hardware Address: If you have more than one SI-Pro transceiver, you may at some time need to verify or change the SI-Pro transceivers address. The process is simple. Click the "Change Programmer Address" button as shown below in Figure #3. Note: Communications with the SI-Pro transceiver hardware for address changes or verification requires the Air-Byte & SI-Pro transceivers to be connected and powered up.
As shown below in Figure #4, after clicking the change programmer address button, a window will open allowing you to set a new address, and ask for the old address to be changed. If you don't remember an SI-Pro hardware address, use the "Get Programmer Address" satellite button as shown below in Figure #4. If you know the SI-Pro hardware address and want to change it, follow these steps.
Note: When changing or verifying an SI-Pro hardware address, only one SI-Pro should be powered up and present during the procedure. This will help you avoid setting a new address in other SI-Pro transceivers within range.
To find or verify an SI-Pro hardware address, click on the "Get Programmer Address" satellite button as shown above in Figure #4. Point the SI-Pro transceiver towards the Air-Byte transceiver connected to your PC serial port, and connect or cycle the power to the SI-Pro transceiver. Address recognition takes approximately 1 second after the SI-Pro has been power-cycled.
As shown above in Figure #5, the software will wait to receive the current SI-Pro hardware address. When you apply power to the SI-Pro hardware, the SI-Pro will initialize, read, and then transmit its address stored in EEPROM to the Air-Byte transceiver. [ Top ]
As shown below in Figure #5A, the address feature allows selective communications with specific BASIC Stamp robots, and Stamp development boards. Wireless programming & communications with a specific address is transparent to other addresses, and will not interrupt code running on other SI-Pro/BASIC Stamp boards within range of the Air-Byte transceiver that are set to a different address. A single Air-Byte PC transceiver can communicate with & program up to 256 [0 to 255] individually addressed SI-Pro & BASIC Stamp systems. Simply change the software address window to select another SI-Pro address to communicate with.
When the Stamp is using the SI-Pro transceiver for wireless IR communications, all serial data packets must start with the address of the SI-Pro transceiver connected to the Stamp. Example: To send wireless information from a BASIC Stamp connected to an SI-Pro set to address #3, insert the following BASIC Stamp code - DEBUG 3,"Object Detected". The message displayed on the DEBUG screen would read -- Object Detected. [ Top ] Sending IR Data & SI-Pro Buffer Limitation: The SI-Pro data buffer is limited to a maximum of 18 bytes. When the Stamp sends data to the SI-Pro for wireless transmission, the SI-Pro begins to store data in the buffer immediately after the address has been received. The contents of the data buffer will be transmitted once the buffer is full, or after a timeout period of 25mS has passed since the address was received. The SI-Pro will transmit only the contents of the data buffer. Example:
When the SI-Pro receives IR data from the Air-Byte or another BASIC Stamp using an SI-Pro, it will begin to buffer incoming data immediately after the address has been received. The contents of the data buffer will be transmitted to the Stamp once the buffer is full, or after 25mS has passed since the address was received. Note: The address is separate from data, and is not stored in the buffer. The CR & LF commands are included in the 18 byte limitation, and treated as any other data. This example shows how to print a menu from a remote Stamp or robot on the Parallax editors DEBUG screen. Data is sent from a BASIC Stamp connected to an SI-Pro with an address of 99. This example shows how to print remote data on-screen in the debug window. It does not offer a complete solution for an interactive menu system, and is only an example. '{$STAMP BS2} The Stamp sends serial data to the SI-Pro using the DEBUG command. The SI-Pro sends the data via infrared at 2400 baud. Each byte of data consists of 10 bits.
At 2400 baud, the individual bit-timing is 1/2400 = 0.000416 S or 416uS. This means it will take each single "bit" 416uS to be transmitted at 2400 baud. If we send 18 bytes this = 18 bytes x 10-bits per byte x 416uS per bit for a total data transmission time of roughly 75mS. The PAUSE 90 instruction in the previous code example waits for 90mS between each serial data transmission before sending more serial data. This pause allows time for data packets to be sent at 2400 baud & time for SI-Pro program overhead to modulate and send each data packet. Figure #5B shown below is the menu displayed on-screen in the editors DEBUG window.
Remember that the buffer cannot accept more than 18 bytes per data packet. Also remember to WAIT for the SI-Pro to send the contents of the data buffer before attempting to send more data to the SI-Pro. Sending serial data to the SI-Pro while it's in the process of sending the first 18-byte buffer contents will result in a loss of data. A General Rule-of-Thumb:
When sending a single byte, a 40mS PAUSE period would allow for the buffer transmit timeout period of 25mS, + 10mS for SI-Pro program overhead, and 5mS for the time it takes to transmit a single data byte at 2400 baud. [ Top ]
The SI-Pro software includes an editor & tokenizer. The tokenizer is based on the publicly released BASIC Stamp code compiler or "Tokenizer" from Parallax Inc, and does not yet support the newer editor release version 2.5. BASIC Stamp code you run through the SI-Pro tokenizer can not include the new '{$PBASIC 2.5} directive. This directive is specific to the newer version 2.5 editor/compiler, and not yet supported by the SI-Pro tokenizer. Support for version 2.5 will be added on release of the 2.5 tokenizer by Parallax Inc. BASIC Stamp code used with the SI-Pro tokenizer must have the Stamp type directives as shown below for the various supported BASIC Stamp types.
Loading, Editing & Viewing Code Files:
Use the "Load Stamp File" button as shown above in Figure #6 to locate & open BASIC Stamp program code files. Select the "View Stamp File" button as shown below in Figure #7 to open the editor window for viewing & editing Stamp program code files. The editor box can be re-sized by dragging the side, bottom or top of the editor box. Note: Changes made to BASIC Stamp code will not take affect until after you save & tokenize the file. Use the File & Save options to save all changes before tokenizing. The editor has drop-down menus that allow saving, tokenizing and downloading files.
Tokenizing BASIC Stamp Program Code Files:
BASIC Stamp program code has to be compiled or tokenized before downloading to the Stamp. After you open a file, select the "Tokenize Stamp File" button as shown above in Figure #8 to run the tokenizer, compile and check your program code for errors. If there are no errors, the compile result window shown above in Figure #8 will appear. If there are errors, look for & correct any mistakes. Then use the tokenize button to repeat the compile process until there are no errors. [ Top ]
Identifying The BASIC Stamp Type Connected to The SI-Pro:
Figure #9 shows the "Identify" button used to identify the Stamp type connected to the SI-Pro transceiver. Figure #9 also shows the result screen after successfully identifying a remote BS2. It works similarly to ID the BS2e, BS2sx, BS2p, and BS2pe. Note: To identify the Stamp type connected to an SI-Pro transceiver, you will need both the SI-Pro & Air-Byte powered-up & operating. The BASIC Stamp development board or robot must be connected to the SI-Pro transceiver. The correct SI-Pro address to communicate with must be selected in the address window. The Air-Pro transceiver must be connected to your PCs serial port. It's important to have the correct "address" set in the SI-Pro software address selection window. If the address does not match the SI-Pro address you want to communicate with, the ID process will return an error. Refer to the section on "Finding And Changing The SI-Pro Hardware Address" for details on this step. [ Top ]
Infrared Remote Wireless Programming:
Once you have selected the remote SI-Pro address for the BASIC Stamp to be programmed, opened and successfully tokenized the BASIC Stamp program code file, click the program arrow button as shown above in Figure #10 to send your code to the BASIC Stamp target connected to the SI-Pro infrared transceiver. Figure #10 shows the resulting "Download Complete" window from a successful remote programming session of a BASIC Stamp connected to an SI-Pro set to address #25. The SI-Pro infrared remote BASIC Stamp programming & communications system has been tested in excess of 65 foot. While it's not necessary to aim the Air-Byte & SI-Pro IR transceivers directly at each other at close range [approximately 15-25 foot], longer distance programming & communications will require more direct pointing. [ Top ] SI-Pro software includes a debug screen with easy to use macros and a robot control keypad. To open the debug window, click the "Open Debug Terminal" button as shown below in Figure #11.
The debug window can be used for interactive debug sessions & remote robotics control with the SI-Pro & Air-Byte transceivers. Although very similar to the Parallax editors debug window, the SI-Pro debug macros are activated with single button clicks instead of multiple key combinations. Macro buttons can be assigned individual names - making them very easy to use. Note: All data sent from within the SI-Pro debug window automatically sends the SI-Pro address. The address selected in the address selection window [shown below in Figure #12] is automatically sent with all outgoing data. Notice in Figure #12 how the lower case ASCII 'c' is sent when 99 is the address.
[ Top ] The robot control keypad is located below the macro buttons. Each key will automatically send the SI-Pro hardware address followed by an "A" and then the single upper case ASCII letter shown on the key. Use the robot control keypad to send single ASCII letters F, R, B, L or S with a single key-press. Example: Click button F, data sent is SI-Pro address, A, & F. Click button B, data sent is SI-Pro address, A, & B. The Stamp robot would receive the A and then the ASCII letters F, R, B, L or S for directional control of a robot from the control keypad. A very simple Stamp program to decode each key would be: '{$STAMP BS2} Editing Macro Names & Data Macros can be used to send single bytes or strings of data. As shown below in Figure #13 - macro data & button names are entered into the macro Name & Data windows.
ASCII characters like A,B,C, and complete text strings are entered as shown above in Figure #13. For numeric data, precede each numeric value with the pound # sign to separate individual numeric characters as shown in Figure #13. When finished editing macros, click the OK button to save & exit. As shown above in Figure #12, macro buttons now show the macro names assigned. Clicking on a macro button will send data entered into the macro data fields as shown in Figure #13. [ Top ]
Sample BOE Robot Control Program: Below is a simple program to control a BOE bot from your PC using a terminal program. You can remotely control & program the BOE robot with the Air-Byte & SI-Pro system. '{$STAMP BS2} |
|||||||||||||||||
|
Order SI-Pro & Air-Byte Transceivers & Accessories |
|||||||||||||||||
|
|
|
||||||||||||||||
|
|
|||||||||||||||||
|
|
|||||||||||||||||