|
Click to enlarge, connections to Mega
and Diecimila.
Circuit Schematic:
A circuit schematic of the
MIDI IN/OUT board shows the Input/Output connections.
The unit can be connected directly to an
Arduino Duemilanove, Mega or Diecimila.
Arduino Pin D0/RX is connected to the
output of the Opto-coupler whose input
is connected to the MIDI IN socket.
Arduino Pin D1/TX is connected to the
MIDI OUT socket via resistor R5. Arduino
Pins D2 and D3 provide +5 Volt and 0
Volt(GND) but they need to be set
correctly in the software. Arduino Pins
D4, D5, D6 and D7 are connected to the
4-way DIL switch, which can be used to
select the MIDI Channel (1 to 16).
So 8 Pins (D0 to D7) are used
when the MIDI IN/OUT board is plugged
into the Arduino. All other pins are
still accessible.
Layout:
The PCB layout is shown without
the components and with
the components.
Software:
Details to set Arduino Pins D2 and D3 to
provide +5 Volt and 0 Volt(GND), and to set Arduino Pins D4, D5, D6
and D7, connected to the 4-way DIL
switch, to select the MIDI Channel
(1 to 16) are shown on the
software page.
MIDI Wiring:
The MIDI IN and OUT connectors use a 5-Pin 180 degree DIN
sockets. Note that the MIDI IN/OUT wiring
is polarised and the correct pins should be used.
Download:
Open the source
code file and copy and paste it into the Arduino programme and
save it as a .PDE file.
.
|
DIL Switch
Selections |
MIDI
Channel
|
| 4 |
3 |
2 |
1 |
| on |
on |
on |
on |
1 |
| on |
on |
on |
off |
2 |
| on |
on |
off |
on |
3 |
| on |
on |
off |
off |
4 |
| on |
off |
on |
on |
5 |
| on |
off |
on |
off |
6 |
| on |
off |
off |
on |
7 |
| on |
off |
off |
off |
8 |
| off |
on |
on |
on |
9 |
| off |
on |
on |
off |
10 |
| off |
on |
off |
on |
11 |
| off |
on |
off |
off |
12 |
| off |
off |
on |
on |
13 |
| off |
off |
on |
off |
14 |
| off |
off |
off |
on |
15 |
| off |
off |
off |
off |
16 |
|
Table 1 MIDI Channel |
Connections:
The MIDI IN/OUT board can be used with all variations of
Arduino boards. The connections required are TX to TX, RX to RX,
+5 Volt and 0 Volt (GND). The DIL 4-way switch is optional, but
can be connected to D4, D5, D6 and D7. In fact the board can work
with the serial port on any microcontroller/microprocessor capable
of running at 31250 Baud.
|