General parameters, Pin assignment parameters, Caveats – Pololu Wixel User Manual

Page 43

Advertising
background image

The

yellow

LED is on when VIN power is detected.

The

red

LED indicates an error condition when lit; it can be reset by issuing a Get Errors command (described above).

General Parameters

bridge_mode: Selects the bridge mode (0–2, see list above). The default is 0.

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).

I2C_freq_kHz: The clock frequency of the I²C bus, in kilohertz. The default is 100. Common I²C speeds
are 10 kHz (low speed), 100 kHz (standard), and 400 kHz (high speed). The range of possible frequencies is
2-500 kHz; because of rounding inaccuracies and timing constraints, the actual frequency might be lower than
the selected frequency, but it is guaranteed never to be higher.

I2C_timeout_ms: The allowed delay, in milliseconds, before a low SCL line causes an I²C bus timeout. This
resets the bus and sets the I²C Timeout error bit. The default is 10.

cmd_timeout_ms: The allowed delay, in milliseconds, before failure to receive the next byte of a command
sequence causes a command timeout. This resets the I²C bus and sets the Command Timeout error bit. The
default is 500. A value of 0 disables this timeout.

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.

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. For example, if you wanted to assign the
SCL pin to P1_2, you would set I2C_SCL_pin to 12.

I2C_SCL_pin: The pin assignment for the I²C SCL (clock) line. The default is 10 (P1_0).

I2C_SDA_pin: The pin assignment for the I²C SDA (data) line. The default is 11 (P1_1).

Caveats

Data will be lost if the Wixel receives commands on the UART’s RX line faster than they can be processed on the
I²C bus. 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. Using the Get Errors command and checking the UART Overflow error bit is
a good way to detect this problem.

Caution:

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

). Avoid connecting multiple output pins

together.

The Wixel does not support the RS-232 voltage levels typically used by DB9 serial ports. The Wixel’s I/O
lines, including the RX and TX lines, operate on voltages between 0 and 3.3 V. To connect the Wixel to an
RS-232 serial signal, you will need additional level-shifting and inverting hardware like the

Pololu 23201a

serial adapter

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

(RS-232 serial is inverted; the Wixel’s serial interface

expects non-inverted serial).

Pololu Wixel User's Guide

© 2001–2014 Pololu Corporation

9. Wixel Apps

Page 43 of 64

Advertising