Differences

This shows you the differences between two versions of the page.

Link to this comparison view

communication_protocols [2018/11/01 18:55] (current)
Line 1: Line 1:
 +====== ​ 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 [[http://​sodoityourself.com/​max232-serial-level-converter/​|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
 +
 +[[http://​www.camiresearch.com/​Data_Com_Basics/​RS232_standard.html|The RS232 Standard]]
 +
 +=====  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
 +
 +  * [[http://​en.wikipedia.org/​wiki/​USB_communications_device_class|USB communications device class]] on wikipedia
 +  * [[http://​www.usb.org/​developers/​devclass_docs/​usbcdc11.pdf|Universal Serial Bus Class Definitions for Communication Devices]]
 +
 +=====  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 ​
 +  * [[http://​www.doc.ic.ac.uk/​~ih/​doc/​par/​|Interfacing the IBM-PC Parallel Printer Port]]
 +  * [[http://​www.fapo.com/​ieee1284.htm|IEEE 1284 Info]]
 +
 +===== 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)
 +  * [[http://​www.midi.org/​techspecs/​electrispec.php|MIDI Electrical Specifications]]
 +  * [[http://​www.midi.org/​techspecs/​midimessages.php|MIDI Message Table]]
 +
 +===== Arduino and MAXMSP interface =====
 +Some good option for test, debug and also for some control can be find on [[http://​www.arduino.cc/​playground/​|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:
 +  * [[http://​www.arduino.cc/​playground/​interfacing/​MAXMSP|Arduino2Max(nov2010)]]
 +  * [[http://​www.maxuino.org/​|Maxuino(Firmata)(april2010)]]