MIDIbox Hardware Platform, Digital IN Module
The DIN module comes with multiple serial registers 74HC165; every register (SR) 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:
- MIOS8 based applications typically allow to cascade up to 4 modules (=16 DIN SRs), makes up to 128 digital inputs
- MIOS32 based applications typically allow to cascade up to 8 modules (=32 DIN SRs), makes up to 256 digital inputs
Some applications also allow to scan the shift registers in a so called "matrix" configuration. E.g. a 8x8 matrix (which is driven by a single DOUT SR and captured by a single DIN SR) can scan up to 64 buttons, a 16x16 matrix could scan up to 256 buttons. But normally 8x8 matrices are perferred due to lower latency.
Download
-
Note: To reduce effort only the DINX4 variant is available at Mikes PCB shop and Modular Addict's MIDIbox Shop. If you don't want to etch the modules by yourself, just use the DINX4 and stuff just only the ICs which are really required.
Available Ports
-
Following interfaces are provided by the DINX4 module:
Name |
No. of pins |
Description |
J1 |
5 |
Interface to CORE:J9. 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.
The revised PCB layout from SmashTV uses a 2-row DIL Header instead to simplify the connection to the J8/9 connector of the core 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 the next DINX module. |
J3-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 encoders.
The revised PCB layout from SmashTV uses 2-row DIL headers instead so that buttons can be easily connected via 2-row DIL sockets. |
Used Components
-
Part Name |
Value |
Description |
IC1, IC2, IC3, IC4 |
74HC165 |
The digital input shift registers |
R1-R32 |
10k |
These pull-up resistors are required if buttons are connected to the digital inputs. They ensure that the pins are supplied by defined voltage levels when a button is not closed (pressed). If you are using the DIN module with a MIDIO128, you maybe want to drive the pins "high-active" (which means: +5V = on, 0V = off). In this case please solder the two red isolated cables not to 5V, but to 0V (Vss), so that the resistors act as pull-downs. Your MIDIbox will send a lot of random MIDI traffic without these pull-ups, so don't miss them! |
C1-C4 |
100nF |
The additional bypass caps have to be placed on the bottom side of the PCB, as close to the +5V power input of the 74HC165 as possible. |
R33-R36 |
10k |
4 additional pull-up resistors. They ensure a defined level if an IC is not plugged into the socket. Your MIDIbox will send a lot of random MIDI traffic without these pull-ups, so don't miss them! |
J* |
* |
All connectors are optional, the cables can also be soldered directly into the board. Otherwise I suggest SIL headers (header sockets), known from PC motherboards. They are cheap and usefull. |
DIL |
SOCKETS |
Don't forget to buy sockets for the shift registers. 8 * 5 pin DIL sockets are required for the old PCB layout, resp. 4 2x5 DIL sockets for the SmashTV layout. |
Soldering Guide
-
This soldering guide explains how to build a DIN module based on the revised layout from SmashTV. If you want to build a DIN module based on the old layout (e.g. from Mike) please continue at this page.
|
It's always a good idea to start with the smallest components to simplify mounting.
So, start with the caps and resistor arrays:
- 8 5x10k resistor arrays (resp. discrete 36x10k resistors if you don't use resistor arrays)
- C1-C4: 100 nF
|
|
Continue with the 4 IC sockets. |
|
Thereafter mount the 2x5 SIL headers. As you can see, we are using "polarized" headers for J1 and J2, and DIL headers for J3-J6, so that the silkscreen (which shows the pin names) won't be hidden. It's your personal choice to use "polarized" headers for these connections as well. |
|
Finally put the 74HC165 ICs into the sockets. Your module is now ready for use! |
Two cascaded DINX4 modules connected to J8/9 of a MBHP_CORE_STM32F4 module with selfmade IDC cables. |
Two cascaded DINX4 and two DOUTX4 modules connected to J8/9 of a MBHP_CORE_STM32F4 module with selfmade IDC cables.
This picture gives you a more detailed view of the special (selfmade) Y cable which has one additional DIL socket at the middle so that the DIN and DOUT chain can be connected to the J8/9 connector of the core module. |
Last update: 2024-05-08
Copyright © 1998-2023, Thorsten Klose. All rights reserved.
|