Pin assignment parameters, Example uses – Pololu Wixel User Manual

Page 35

Advertising
background image

baud_rate: The baud rate to use for the UART, in bits per second. The default is 9600. We recommend not
exceeding 115200. This parameter has no effect on serial communication over the virtual COM port (USB).

radio_channel: The channel number is from 0 to 255 and determines which frequency to broadcast on. The
default is 128. Wixels must be on the same channel to communicate with each other. To avoid interference,
Wixels that aren’t supposed to talk to each other should be at least 2 channels away from each other. For example,
you could have one pair of Wixels on channel 128 and another pair on 130.

framing_error_ms: The approximate number of milliseconds to disable the UART’s receiver for after
encountering a framing error on the RX line. Valid values are 0–250. The default is 0, which means that the
UART’s receiver will not get disabled after a framing error.

Pin Assignment Parameters

The following parameters can be used to reassign the control signals 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. For example, if you wanted to assign
the DSR pin to P1_2, you would set nDSR_pin to 12. To disable a signal (assign it to no pin), set the corresponding
parameter to -1.

nDTR_pin: The pin assignment for the inverted DTR output. The default is 10 (P1_0).

nRTS_pin: The pin assignment for the inverted RTS output. The default is 11 (P1_1).

nDSR_pin: The pin assignment for the inverted DSR input. The default is 12 (P1_2).

nCD_pin: The pin assignment for the inverted CD input. The default is 13 (P1_3).

DTR_pin: The pin assignment for the non-inverted DTR output. The default is -1 (disabled).

RTS_pin: The pin assignment for the non-inverted RTS output. The default is -1 (disabled).

DSR_pin: The pin assignment for the non-inverted DSR input. The default is -1 (disabled).

CD_pin: The pin assignment for the non-inverted CD input. The default is -1 (disabled).

arduino_DTR_pin: The pin assignment for an output for wireless Arduino programming when used with the

Wixel shield

[http://www.pololu.com/product/2500]

. The default is 0 (P0_0).

You should not simultaneously enable the non-inverted and inverted input for the same signal. Specifically, either
nCD_pin or CD_pin should be -1 and either nDSR_pin or DSR_pin should be -1.

Example Uses

1. This application can be used to make a wireless serial link between two microcontrollers, with no USB
involved (except for initially configuring the Wixels). To do this, use the UART-to-Radio mode on both Wixels.

2. This application can be used to make a wireless serial link between a computer and a microcontroller. Use
USB-to-Radio mode on the Wixel that is connected to the computer and use UART-to-Radio mode on the Wixel
that is connected to the microcontroller. If you are powering both Wixels in the usual way, you should be able to
use auto-detect serial mode (serial_mode = 0).

3. If you are doing option 2 above and using the the auto-detect serial mode (serial_mode = 0), then you have
the option to (at any time) plug a USB cable directly into the Wixel that is connected to your microcontroller
to establish a more direct (wired) serial connection with the microcontroller. (You would, of course, have to tell
your computer to switch to the other COM port when you do this.)

Pololu Wixel User's Guide

© 2001–2014 Pololu Corporation

9. Wixel Apps

Page 35 of 64

Advertising