greetsI'm looking for a way to have an Arduino (Uno) handle multiple UART/Serial streams, only with one RX port, i.e. without using SoftwareSerial. What ways are there to achieve this?I need this capability for receiving (and perhaps mixing) MIDI data from multiple devices. thanks
I don't know anything about MIDI,
MIDI is an asynchronous serial interface. The baud rate is 31.25 Kbaud (+/- 1%). There is 1 start bit, 8 data bits, and 1 stop bit (ie, 10 bits total), for a period of 320 microseconds per serial byte.
I do think you can connect multiple devices to one Rx,Tx line, as long as you can have 1 master device, and all the rest are slave devices - meaning they are smart enough to transmit only when directly commanded to do so by the master.
Then, for hookup, you run Tx from the master to Rx on all the slaves, and you take the Tx pins from the slaves and wire-AND them together to feed to Rx on the master. Wire-ANDing should be doable either with diodes and a pullup-R, or else using 74LS or 74HC chips. It might work, :-).
Some discussion that might be of interest.http://forum.arduino.cc/index.php?topic=175851.msg1305132#msg1305132
Re MIDI, if you cannot control the output flow from the multiple devices, then you'll need to use a hardware multiplexer, and have the master switch between datastreams, eg, http://www.allaboutcircuits.com/worksheets/mux.html
Quote from: oric_dan on Oct 31, 2013, 07:11 pmRe MIDI, if you cannot control the output flow from the multiple devices, then you'll need to use a hardware multiplexer, and have the master switch between datastreams, eg, http://www.allaboutcircuits.com/worksheets/mux.htmlYep, but you'd still need each midi input to have some kind of memory buffering, otherwise incoming bytes from one midi input will be lost while the master is listening to another midi input.