Section 9.b. Our USB-to-Serial app turns a single Wixel into a USB-to-TTL serial adapter that is capable of baud rates as high as 350,000 bps and supports four serial control signals. This app does not use the radio. Detailed information...
USB connection can also provide power to the Wixel. On the side of the board opposite the USB connector, the Wixel has a 2.4 GHz PCB trace antenna. This antenna, along with the other RF circuitry, forms a radio that allows the Wixel to send and receive data packets in the 2.4 GHz band.
Page 5
P1_7), and P2_1. The P2_1 pin is tied to the red LED but the other 14 free I/O lines are only connected to the microcontroller. The P2_2 line is also accessible, but it is tied to the yellow LED and is used to get the Wixel into...
Page 6
While the Wixel is in bootloader mode (i.e. the app is stopped), this LED indicates whether there is an application on the Wixel. If there is no application, the red LED will be on. Otherwise, it will be off. By default, the Wixel does not have an application on it, so this LED will be on the first time you power your Wixel.
The P2_2 pin is connected to the yellow LED, so this line will go high when the yellow LED is on and otherwise be pulled low. While the Wixel is running its app, the behavior of this LED depends on the app. See the documentation of your particular app for more details.
Wixel. No further action from you is required. Windows XP users: Follow steps 5–9 for each new Wixel you connect to your computer. You will also have to follow these steps again the first time you run an actual Wixel app on the Wixel.
Page 12
Pololu Wixel USB Bootloader entry in your Device Manager. The entry you see in the Device Manager will depend on the application that is loaded on the Wixel. Some apps might not enable the USB interface, in which case you will see no entry for the Wixel in the Device Manager.
Page 13
Windows will remember which COM port was assigned to which Wixel using the built-in serial number of the Wixel; a given Wixel will always get assigned to the same COM port regardless of which USB port it is plugged into.
Any Wixel app that implements a USB virtual COM port or a Human Interface Device (HID) will work on Linux with no special driver installation required. The virtual COM ports are managed by the cdc-acm kernel module, whose source code you can find in your kernel’s source code in...
Start Menu. 4. Connect a Wixel to your computer via USB. You should see it appear in the “Wixels” list. If it does not appear, you might need to use a button or wire to get your Wixel into bootloader mode (see Section 5.c).
Page 16
This app has one parameter, blink_period_ms, and it is currently set to 500 (the default). 6. Select the Wixel by left-clicking on its entry in the Wixels list. If you see a dialog box pop up, this is because the Wixel already has an application on it and the Auto Read checkbox is checked. Click the “Cancel”...
Page 17
If Auto Read is enabled when you select a Wixel with an app on it, then you might be prompted you to open the App File. 11. To read the settings from a Wixel, you will need to open the app that is currently on the Wixel. Click the “Open” button in the dialog, and select example_blink_led_v1.0.wxl.
Page 18
Some apps might implement a non-standard USB interface (or no USB interface at all). In that case, they will not be recognized by the Wixel Configuration Utility while the app is running, so you will need to get them into bootloader mode manually (see Section 5.c...
Wixel that is in bootloader mode (i.e. the app is stopped) or is running an app that implements a single USB Virtual COM port with a USB Vendor ID of 0x1FFB (for Pololu) and a Product ID of 0x2200. If your Wixel is...
Page 20
The Wixel is reconnecting, disconnecting, or in a transitional state. If you select a Wixel, you can see more information about it in the area below the list. The USB Product ID is the current product ID presented by the Wixel on its USB interface, as defined in the USB Specification. The Port Name is the name of the virtual COM port that has been assigned to the Wixel.
Page 21
Read Wixel button at any time to read settings from the selected Wixel. To read the settings from a Wixel, you will need to open the app that is currently on the Wixel. This is necessary because the app file contains metadata which is needed in order to correctly interpret the settings contained in the Wixel’s flash memory.
This chapter explains some of the electrical connections you might need to make to get your Wixel working the way you want it to. 5.a. Connecting Power The two main ways of powering the Wixel are the USB port and the VIN pin. The schematic of the Wixel’s power system is shown below: Wixel power system schematic diagram.
3.5 V, the 3V3 output will be less than 3.3 V. Normally this output can provide up to 150 mA, but if the Wixel’s power supply is above 5 V then it is limited to 100 mA. You can use 3V3 to power your own 3.3 V devices.
5.c. Connecting Buttons and Starting the Bootloader In order to load a new app or new settings onto your Wixel (or read the Wixel’s flash memory) you will need to get it into bootloader mode. Most Wixel apps support a special USB command for putting the Wixel into bootloader mode and the Wixel Configuration Utility can send that command automatically when you try to access the Wixel’s flash.
Page 25
USB. Using a wire to put the Wixel into bootloader mode. Another way to is to wire a bootloader button and a reset button to the Wixel and follow the procedure shown in the picture below: 5. Connecting Your Wixels...
Most of the available Wixel apps implement a USB interface that consists of a single virtual COM (serial) port. This interface allows you to send and receive bytes from the Wixel in the same way you would send and receive bytes from any other serial port on your computer.
• Remove objects that are very close to the Wixel’s antenna. For example, if the Wixel has no header pins installed and it is resting flat on your desk, find a way to get the Wixel at least an inch or two above the desk.
Installation Instructions Download Wireless Serial App v1.3 (26k [http://www.pololu.com/file/download/wireless-serial-v1.3.wxl?file_id=0J484] wxl). Open it with the Wixel Configuration Utility, choose your parameters, and then write it to two Wixels. See Section 4 for more information on how this is done. Default Pinout Function...
Page 32
The RX pin has an internal 20 kΩ pull-up resistor. The PA_PD pin (P1_5) is a debugging output that goes low while the Wixel is transmitting a packet on the radio. The serial data format used by this app is 8 data bits, one stop bit, with no parity, which is often expressed 8-N-1.
Page 33
DTR on the other Wixel, while RTS on one Wixel corresponds to CD on the other Wixel. The default configuration of this app (as shown in the table above) gives the Wixel two inverted output pins (DTR and RTS), and two inverted input pins (DSR and CD). These pins are inverted, which means that a logical value of 0 corresponds to high voltage (usually 3.3 V), while a logical value of 1 corresponds to 0 V (GND).
Page 34
Caveats Data will be lost if the Wixel receives bytes on the RX line faster than the radio can convey them to the other Wixel. If you have trouble, try reducing the amount of data sent to the RX line by lowering the baud rate or adding delays to your microcontroller’s code.
2011-03-23: Improved the radio protocol to fix a problem in v1.0 where if one Wixel resets but the other Wixel does not, then (depending on the state of the other Wixel) there is a 50% probability that the next radio packet sent in either direction will be ignored by the receiver.
Page 36
Description After you have loaded this app onto a Wixel, the Wixel will appear to the computer as Virtual COM Port (with USB product ID 0x2200). If you are using Windows, you should see an entry labeled “Wixel” in your Device Manager in the “Ports (COM &...
The Wixel’s I/O lines are not 5V tolerant. You must use level-shifters, diodes, or voltage dividers to connect the Wixel to outputs from 5V systems. Also, avoid drawing more current from an I/O line than it can provide (see the discussion of P1_0 and P1_1 in Section 1.a).
Page 38
Wixels. Input pins do not have any effect on output pins that are on the same Wixel. If a Wixel is running this app and has one or more pins configured to be inputs, then it will transmit a single radio packet every 10 ms (approximately) that contains input values and link IDs of all of its inputs.
LED (e.g. 1 kΩ) • A Wixel input pin can be used to read the state of a button or switch. Connect the button or switch between the input pin and GND, so that when the switch is open the pin will read high, and when the switch is closed the pin will read low.
Page 40
P1_7 Latch Ground Additionally, the Wixel and ShiftBrites may share the same VIN as long as the voltage requirements for both modules are satisfied. For initial testing, you may alternatively use VALT to power the ShiftBrites from USB (see Section 5.a).
• The yellow LED is normally on, and flickers whenever data is received from the radio, which might be useful for debugging your wireless connection. • You can use wires with pre-crimped terminals crimp [http://www.pololu.com/catalog/category/71] connector housings to make a custom cable between the Wixel and [http://www.pololu.com/catalog/category/70] the ShiftBrite chain. Versions • Shiftbrite App v1.1 (20k wxl), released [http://www.pololu.com/file/download/shiftbrite_v1.1.wxl?file_id=0J469]...
Page 42
With the battery pack switched off, connect power for the transmitter Wixel. The black wire from the battery pack should connect to a GND pin on the Wixel. The red wire from the battery pack should connect to VIN. To test the connection, turn on the battery pack: the transmitter Wixel’s yellow LED should turn on.
Page 43
The mouse speed is calculated from the measured acceleration vector of the device. The acceleration vector normally points straight upwards and has a magnitude of 1 g due to the Earth’s gravity. The Wixel measures the X and Y outputs from the accelerometer, which tell it the components of the device’s acceleration vector in the plane of the accelerometer.
Overview This app turns a Wixel into a serial-to-I²C bridge, acting as a master controller on a single-master I²C bus. To perform I²C operations, another device can issue serial ASCII commands to the Wixel on its radio, UART, or USB interface.
Page 45
0 disables this timeout. If the Wixel receives a Get Errors command (‘E’), it will respond with a single byte containing the status of several error conditions. This command can be issued any time the app is not expecting a slave address or data byte.
Page 47
Pin Assignment Parameters The following parameters can be used to reassign the I²C lines to different pins on the Wixel. The value of each parameter must be the number of an unused pin on the Wixel. The number can be computed by multiplying the first digit in the pin name by 10 and adding it to the second digit in the pin name.
You have now built all the apps in the Wixel SDK and all the libraries that they depend on. Every subfolder of the folder should now have a WXL file in it. This is a compiled app which can be loaded onto Wixels using the apps Wixel Configuration Utility or the Wixel Command-Line Utility (WixelCmd).
Page 49
Loading an App onto Wixels from the Command Line While you are developing an app, it can be useful to have a way to load an app onto the target Wixel from the command line. You can do this with the Makefile: plug a Wixel into your computer, open up a command...
Creating Your Own Apps Now that you know how to compile apps and quickly load them onto the Wixel to test them, you are ready to develop your own Wixel apps. You can either modify one of the existing apps in the SDK or create your own app.
Page 51
, such as removing a blank line or adding a comment. example_blink_led.c Save the file by pressing Ctrl+S or by selecting File > Save. 12. Press Ctrl+B or select Project > Build All to rebuild the Wixel SDK project. When you do this, Eclipse runs in the folder, which builds all of the apps and the libraries they depend on.
Page 52
By default, Eclipse has a large number of toolbar buttons, views (panes), and menu items that are not needed for developing Wixel applications. You can greatly simplify the user interface of Eclipse by hiding those items. To hide unused toolbar and menu commands, select Window > Customize Perspective…. This brings up the “Customize Perspective C/C++”...
We recommend and use the MIT license, which is simple and allows widespread use of your code. Note that if you have used the Wixel SDK to build your app, you need to include our license, though you may add your own restrictions if necessary.
Page 54
In some cases, you might want to start over with a fresh copy of the Wixel SDK, which you can make by typing git clone -o pololu git://github.com/pololu/wixel-sdk.git...
Wixel software are the cdb and hex sections. The hex section The hex section contains an Intel Hex file that specifies the bytes to write to the flash of the Wixel. See the Intel page on Wikipedia for more information. The flash memory region on [http://en.wikipedia.org/wiki/Intel_HEX]...
Page 56
32-bit signed integer, which is encoded as “{4}SL:S”. The Wixel SDK generates the cdb of section by running grep on the CDB file produced by SDCC during the linking step, selecting all lines containing the string “param”. This means you can define a parameter simply by writing the following code in your Wixel App, outside of any function: int32 CODE param_NAME = DEFAULT_VALUE;...
11. The Wixel USB Bootloader The Wixel comes with a USB bootloader that can be used in conjunction with the Wixel Configuration Utility or WixelCmd to upload apps to the Wixel (no external programmer is required). This section documents some technical details of the bootloader and is intended for advanced users.
Page 58
Finally, is none of these tests have caused it to go into bootloader mode, it runs the application. When the Wixel resets, it uses this procedure to decide whether to run the bootloader or the app. 11. The Wixel USB Bootloader...
Need help?
Do you have a question about the Wixel and is the answer not in the manual?
Questions and answers