This is an old revision of the document!
Table of Contents
Communications Protocols
This section of the wiki is devoted to methods of getting data from sensor interfaces to host computers.
RS232 serial
Serial data is generally buffered by the operating system in order to provide the highest possible data transfer rates. This usually adds to latency and jitter. However, RS232 often provides the simplest means to connect an inexpensive microcontroller to a host computer. A simple circuit can be used to convert from a microcontroller's TTL voltage levels to the RS232 standard.
- Connector: DB9 or DB25
- Max Transfer Rate: 115,200 bps
USB-CDC serial
Serial data is generally buffered by the operating system in order to provide the highest possible data transfer rates. This usually adds to latency and jitter.
- Connector: USB
- USB communications device class on wikipedia
USB HID
USB HID data is generally given high priority in operating system kernels since its designed around human response times.
- Connector: USB
- Max Transfer Rate: 64 kbps
IEEE1284 Parallel Port
- Connector: DB25, Centronics, or mini-Centronics
MIDI (Musical Instrument Digital Interface)
MIDI is an asynchronous serial communication protocol which is almost universally used in commercial digital instruments. MIDI has a lower resolution and data transfer rate than many newer data protocols, which makes it less-than-ideal for transferring large amounts of continuous data, but due to its ubiquity it can be useful for interfacing with a lot of existing music hardware. MIDI can easily implemented using the UART output capability of most microcontrollers.
Most MIDI messages consist of three bytes, where the first byte specifies the type of message and the channel number, and the last two bytes are parameters relating to the type of message sent (key number, controller number, velocity, etc). For a full list, see the link below.
- Connector: DIN-5 circular connector
- Max Transfer Rate: 31.25 kbps
- Data Resolution: 7 bits (14 bits for pitch bend)
Arduino and MAXMSP interface
Some good option for test, debug and also for some control can be find on Arduino Playground webpage. As of March, 2011, under the following configuration: Mac OS X system + Arduino duemilanove board + Arduino 018 software + MAXMSP 5.1.7
two options worked really fine: