A DIN module is used to connect buttons and encoders to the Midibox. The Name comes from “Digital Input” and means that the module can detect two states: ON or OFF. It then sends this information to be processed by the mbhp core module.It comes with multiple serial registers 74HC165; every register provides 8 digital inputs, which are sampled with the latch enable signal LD and shifted out with the clock signal CLK. The advantage of using such shift registers is, that they can be cascaded to a long chain without the need of more than 5 cables to the core module. The DIN board has been designed on a way which allows to cascade not only the ICs on the board, but also several DIN modules. But note that it depends on the firmware how much inputs are processed by the core module. For instance, the MIDIbox64 allows to connect up to 64 buttons = 8 ICs = 2 * DINX4, the MIDIO128 supports 128 inputs = 16 ICs = 4 DINX4 modules.
Following interfaces are provided by the dinx4 module:
|Name||No. of pins||Description|
|J1||5||Interface to CORE J9 (if buttons are used) and CORE J6 (if encoders are used, MIDIbox16E only). DINX4 J1 provides two power pins for 5V, 0V, the serial clock, the latch enable and the serial output of the register chain. This port can also be connected with J2 of another DINX module.|
|J2||5||Interface to another DINX4 module. DINX4:J2 provides nearly the same pins like J1, just only the serial output of the first IC is replaced by the serial input of the last IC. This port can be connected with J1 of another DINX module.|
|J3 to J9||5||These are the digital input lines, every connector comes with 4 of them and an additional pin for ground. See mbhp_dinx4_32buttons.pdf as an example how to connect buttons to these pins, and mbhp_dinx4_16enc.pdf how to connect rotary|
Here are suggested part numbers for various distributors for parts for the DIN board. If you find another site or dealer with a different parts list feel free add it into the list. Also if you’ve successfully used a different part from what was listed here please add the number and/or link to the list.
|Part Name||Description||Polar||soldering temp||QTY||Reichelt.de part# 1)||Mouser.com part#|
|R1-R36||Resistor 10 kOhm||No||???||36||1/4W 10k||264-10K-RC|
|C1-C4||Ceramic Cap 100 nF||No||???||4||Z5U-2,5 100n||80-C412C104K5R|
|-||IC-Sockets for serial registers||Yes||???||4||GS 16||571-3902614|
|J*||1-row SIL Headers (50 pins)||No||???||2||STIFTL. 40G||517-6111TG|
|-||1-row sil female con||No||???||2||-||517-850-01-36|
|-||Ribbon cable 3 meters||No||???||3||AWG 28-16G||-|
blah blah blah
Connecting 32 buttons to a DINX4 Connecting 16 Rotary Ecnoders to the MIDIbox16E and other MIOS based controllers Connecting 16 Alps STEC16B03 Encoders to MIDIbox16E and other MIOS based controllers Connection Diagram for touch Sensors
Regardless which MIDIbox you are planning to build, you can use the MIDIO128 application to test the digital inputs of the DIN module(s)
Once MIOS and the MIDIO128 application have been uploaded, each digital input will send a Note On event (pin 1-64) or Controller Event (pin 65-128) when a button is pressed (=0V at the digital input pin), and a Note Off event (pin 1-64) or Controller Event (pin 65-128) when the button is released (=5V at the digital input pin). Rotary encoders will send two Events (because they are connected to two pins) depending on the quadrature state.
Each pin will trigger an individual note/CC number. This is the second byte of a event. The first pin will send “90 30 7F” when pressed, and “90 30 00” when released. The last 128th pin will send “B0 4F 7F” when pressed, and “90 4F 00” when released. The MIDI events can be displayed with MIOS Studio or a MIDI monitor (e.g. MIDI-Ox) The MIDIO_OUT_ENTRY definitions in midio128_presets.inc help to map the pins to the events, the DIN DOUT pin list helps to map the pin numbers to shift register pins.
If the first input pin of the first shift register (74HC165) triggers all 128 Notes at once, there is propably a problem with the Shift or Register Clock line (SC/RC signal). Both signals are driven by the core module, and they are connected to all shift registers in order to scan the chain. If these signals are not connected, or if there is a short, the core will always “see” the first digital pin, and never the remaining pins of the chain.
If some of the last shift registers cannot be scanned, it is very likely that the SC/RC line is broken, that there is a bad soldering, or similar.
Such types of errors can be located with the srio_interconnection_test application, which can be found at the MIOS download page. Step by Step instructions for the testing procedure are described in the main.asm file
If you notice a short circuit (signals always 0V or 5V, or between these voltage levels), check the cables between the modules and especially your soldering at the bottom of the PCB. Consider also, that a PCB track could be broken or connected with another track (etching imperfection).
Connect each signle DINX4 module directly to the core in order to find the bad candidate(s).
If visual checks don't help to detect the short circuit, you could begin with a very drastic, but effective method: cut the failing track in the middle, and check if the short has disappeared. Cutting has to be repeated until you've found the cause for the failure.
Warning: Don't do this too early, this should be the last measure which normaly leads to success, but also to a bad looking PCB. After this procedure, you have to repair the track with some solder