Digital I⁄O Interface
The U401 can be programmed to be a simple digital i⁄o interface for the PC (Win⁄Linux) or Mac (OSX) . There are two 8-bit ports, thus sixteen i⁄o lines. There are two commands that set port A and port B i⁄o directions. The individual lines of the port can be set to inputs or outputs on a per line basis, but the command to set the direction operates on an entire port.
The ports can be read with two distinct port read commands. The state of the lines that are set as inputs are returned with the read command. The state of any line that is not set as an input is undetermined and should be ignored.
The ports, when set as outputs, can be written to on a byte-wide basis with two distinct port write commands. Individual line states may be changed with a set of commands that mask the port state and affect only user-specified lines.
A set of commands allow for a byte write to one port, while strobing a user-selected line from another port. The strobe can be either negative-going or positive-going.
LCD Interface
The U401 is a convenient way to interface a standard Hitachi-type of intelligent LCD controller to USB. The commands that support communication to the LCD module are the “standard” LCD commands. Standard commands include writing characters to the display, and controlling the display.
SPI Master
The U401 is an interface to SPI devices. The firmware on the U401 provides generic access to read and write SPI devices. The SPI clock rate can be adjusted to 62.5 kHz, 500 kHz, 1 MHz, or 2 MHz. Because additional pins are available as generic i⁄o, the U401 can use these lines as slave select lines and address multiple SPI devices.
SPI Slave
The U401 can be operated as a SPI slave device. A microcontroller circuit external to the device can transfer data via SPI into the U401. The data can then be read from the PC (Win⁄Linux) or Mac (OSX) with an application. The external processor could be, for example, a PIC that performs data collection and filtering from an analog sensor, and transfers readings to the PC (Win⁄Linux) or Mac (OSX) via the U401.
Stepper Motor Control
The U401 can be operated as a two channel stepper motor controller. The U401 can interface to various types of stepper motor driver circuits. The stepper sequence can be “Wave”, “Full”, or “Half” with control over direction, speed, and step count.
1-Wire Interface
The U401 can interface with 1-wire devices (temperature sensors, i⁄o ports, etc) either on each individual U401 device pin, or on a bus of multiple 1-wire devices.