Firmware-73 Operation

From I-CubeX Wiki
Jump to: navigation, search

The USB-microDig is powered by USB, communicates through a virtual serial port using the MIDI message protocol, and can operate in host mode or stand-alone mode. Host mode is intended for using the USB-microDig with a computer that processes the sensor data and/or controls the actuator outputs, while stand-alone mode is intended for using the USB-microDig either on its own, where sensor data is mapped to actuator outputs, or together with other MIDI capable devices.

To set the USB-microDig mode, use the SET MODE command.


Power

The USB-microDig is powered by USB and provides 5V power to the connected sensors/actuators. It is registered as a device that uses 300mA, so if the maximum allowed current has been exceeded for the USB hub where the USB-microDig is connected you might get a system message on your computer warning you about this or the hub will simply shut the power off. In this case you will need to get a powered hub so that it can provide sufficient current to the USB-microDig. The USB-microDig is compliant with the USB v2.0 specification and uses the full-speed (12Mbps) transfer rate.


Standalone Mode

Stand-alone mode allows the USB-microDig to be used with its internal signal processing so that another MIDI capable device (which could be a computer) can directly use the calculated end result. Processing and mapping of sensor data, and control of actuator outputs happens in the USB-microDig itself, so once it has been programmed using our configuration software (free to download from our website) it can run by itself or it can be patched to MIDI-capable software or devices. This mode allows sensor inputs to be mapped to channel voice MIDI messages. Stand-alone mode commands (including STREAM and INTERVAL), contrary to host mode commands, change the settings stored in non-volatile memory as well as volatile memory. Stand-alone mode commands are executed in both modes of operation, even though in host mode no channel voice MIDI messages are output to reflect any changed settings.


Host Mode

Host mode requires that the USB-microDig is connected with a host computer to control and store the USB-microDig settings, and process the sensor data and/or control the actuator outputs. In host mode unprocessed, raw sensor values are output only as system exclusive MIDI messages (ie. no stand-alone mode type channel voice MIDI messages processed from sensor values are output). When using Max/MSP software, host mode allows multiple iCube / oCube Max/MSP objects for each USB-microDig (to this end, some of the commands are echoed back to the host computer). Host mode commands (except STREAM and INTERVAL), contrary to stand-alone mode commands, do not change the settings stored in non-volatile memory but only the settings stored in volatile memory. Generally, host mode commands have the same effect in either mode of operation.


Communication

To communicate with the USB-microDig you need to connect its USB cable to your computer and install the supplied driver available for download from our web site (Windows or MacOS). You can then establish a connection with the USB-microDig by using our free Connect software or use the virtual COM port (VCP) with your own application (such as the serial object in Max/MSP). If you are using the VCP the COM port setting of the USB-microDig is 115200 bps, no parity, 1 stop bit, 8 data bits, hardware data flow control enabled.


Flow Control

In host mode the USB-microDig can detect when the COM port is open by the use of hardware data flow control (using the RTS and CTS pins of the COM port, see also the COM command below). If the software application you are using doesn’t have hardware data flow control (such as the Max/MSP serial object) then the COM port can be open but the USB-microDig pauses data processing and the IN and OUT LED on the USB-microDig will keep on flashing once a second until it receives a byte (that your software application sent). Once a byte has been received data processing resumes and the IN and OUT LED will only be ON momentarily once every second when data is transmitted as per their definition above, even after the COM port is closed.

If the software application uses hardware data flow control, and the USB-microDig is in host mode, when the USB-microDig COM port is closed (by default when the USB-microDig is being connected) the USB-microDig pauses data processing and the IN and OUT LED will blink again once every second.

When the USB-microDig is in stand-alone mode data processing is never paused, it ignores data flow control and the IN and OUT LED will not blink once a second but only when data is transmitted.


Protocol

In this documentation the communication protocol used by the USB-microDig is based on the MIDI protocol. Despite the fact that the USB-microDig has a different baud rate, uses a serial port and has no MIDI cables, you can use it as a MIDI device by running our free Connect software that makes the serial port data available at a MIDI port on the computer. This way you can use any MIDI application to communicate with the USB-microDig. The “MIDI input” and “MIDI output” expressions used in this document therefore refer to a communication setup as established between the USB-microDig and the computer running our Connect software. You can turn it into a stand-alone MIDI (output-only) device by using our USB-microMIDICable.


LED status indications

IN LED definition The USB-microDig will give visual feedback via the yellow IN LED for any data received from it’s USB interface. Each time data is received from the interface the IN LED will be ON momentarily.
OUT LED definition The USB-microDig will give visual feedback via the green OUT LED, for any data sent to it’s USB interface. Each time data is sent to the interface the OUT LED will be ON momentarily.
POWER LED definition The USB-microDig will give visual feedback via the red POWER LED when power is received from the USB connector. When the power at the sensor input connector is 5V the POWER LED is normally lit. When the power at the sensor input connector is below 5V because of a short circuit or an excessive supply current, the POWER LED will be dimmed.
IN and OUT LED blinking If the USB-microDig is in host mode, the IN and OUT LED on the USB-microDig will blink once a second after the COM port is closed and until it receives a byte.
POWER and OUT LED ON If the POWER and OUT LED are ON immediately after power the USB-microDig, the firmware didn't complete its bootup. Please contact us for help.
All LEDs ON If all LEDs are ON, the USB-microDig has encountered an unexpected error. Power it off and then on again to reset it.