The mbhp Core Module is the heart and brain of every MIDIbox. It holds the PIC microcontroller which runs MIOS and your MIDIbox application. It handles MIDI communication, it drives an LCD (or two, or more), and it connects all the other modules. The main part of this module is the PIC18F452, a microcontroller manufactured by Microchip. It is clocked at 40 MHz (externally with a 10 MHz crystal) and offers enough performance to handle with all the analog and digital modules with latencies below 1ms. The PIC is a “system on chip” (SoC), this means, it contains not only a CPU, but also an integrated 32k flash program memory, 1536 bytes data memory, 256 bytes data EEPROM, and a lot of usefull peripherals like AD-converter and UART (for MIDI). I decided to use PIC controllers for my MIDI applications many years ago, and I stayed by this product family because of the low prices and worldwide availability for hobbyists. In distance to other (more modern) microcontrollers, the PIC is easy to program, requires no external memories, is almost non-destroyable and comes in a handy DIP package, so that also electronic beginners can work with this chip without the danger of damaging small SMD pins within some seconds with their soldering iron.
A nice outlook for the future is, that Microchip still considers pin compatible devices. The MBHP started with a PIC16F877, in the meantime PIC18F452 is used, and for memory intensive projects like MIDIbox SEQ V3 or MIDIbox SID V2 the PIC 18F4620/PIC 18F4685. So long this upgrade path is given, a switch to another microcontroller family (like Atmel devices) with all it's advantages, but also disadvantages, is not required, and hard/software compatible applications can still be expected in the next years.
One core module, stuffed with a supported processor, can handle:
In addition, multiple cores can be linked together to extend these capabilities. Linking Multiple Cores
(Check on PCB for revision number)
Pins | Description |
J1 | Connection to the power supply. Either the output of a 7V-10V transformer, or a wall adapter can be used. 500 mA is recommented, especially if a backlit display is used, but MIDIfilter and MIDImerger work also with ca. 100 mA. AC or DC doesn't matter, since the rectifier behind J1 converts to DC anyhow. Also the polarity has not to be taken into account. |
---|---|
J2 | +5V output, can be used to supply other core modules in a multiprocessor environment, so that you only have to mount the parts for the power supply (BR1, IC3, C5, C6) on one core module. Restriction: the 7805 gets very hot when it delivers currents above 500 mA, so only core modules without backlit display like MIDIO128, MIDImerger, MIDIfilter should be supplied over this port. |
J4 | Interface to the BankStick, to MBHP_IIC_* modules like MBHP_IIC_MIDI, and to the second MIDI IN port for MIDImerger. |
J5, J5a, J5b | This is an either-or setup. J5 matches the old (SIL) AIN connection. J5A and J5B match the with newer AIN boards (AIN_R3 up). Obviously with newer AIN boards leave out the SIL pinheader out and load J5A/B, if using older boards leave out J5A/B and load J5. Interface to the AIN module for MIDIbox64 and MIDIbox64E. There are also some application which use this as digital in- or output. |
J6 | J6-Interface to the AIN module for MIDIbox64 and MIDIbox64E. |
J7 | Interface to the MF module, sometimes also used for the MBHP_AOUT or MBHP_AOUT_LC module. |
J8 | Pay attention to this one, it has moved since last rev…. Interface to the DOUT module chain. |
J9 | Pay attention to this one, it has moved since last rev…. Interface to the DIN module chain. |
J10 | Pay attention to this one, it has moved since last rev…. Do not mistake it for J8 orJ9 since they were in this position on the last rev. Interface to application specific module extensions like the SID module. |
J11 | MIDI digital IO port, interface to the LED/Thru/COM module. Can also be used to cascade multiple core modules in a long MIDI chain. Note: Don't plug the optocoupler (IC2, 6N138) into the socket when using the J11:MI (MIDI-IN) pin as an input, otherwise the Rx input will get the data from two different sources, which is not provided by the MIDI protocol (point-to-point). A MIDImerger is necessary to combine multiple MIDI IN sources. In other words: when using the COM module or when connecting the J11:MO of one core module to J11:MI of another core module, or when connecting the core module directly with the Gameport, the optocoupler of the other module should not be plugged into the socket to avoid a corrupted MIDI data stream. |
J12 | MIDI OUT port. This is an either-or position, load SIL 3 pin header for wiring to panel mount MIDI jacks, otherwise install a PCB mount MIDI socket in/over the J12 pads. |
J13 | MIDI IN port. This is an either-or position, load SIL 3 pin header for wiring to panel mount MIDI jacks, otherwise install a PCB mount MIDI socket in/over the J12 pads. |
J14 | Used by MIOS as touch sensor strobe line. Sometimes also used for debugging purposes. |
J15 | Interface to LCD display module. |
GND LIFT | Can be used to temorarily disconnect the CORE's ground from the ground on J12:Pin2. Leave this alone for normal operation! |
This list gives you an oversight over the pin usage of MIOS.
Name | Class | Core Port:Pin | PIC Pin # | Direction | Additional Information |
---|---|---|---|---|---|
RA0 | A | J5:A0 | 2 | Input | analog pin |
RA1 | A | J5:A1 | 3 | Input | analog pin |
RA2 | A | J5:A2 | 4 | Input | analog pin |
RA3 | A | J5:A3 | 5 | Input | analog pin |
RA5 | A | J5:A4 | 7 | Input | analog pin |
RE0 | A | J5:A5 | 8 | Input | analog pin |
RE1 | A | J5:A6 | 9 | Input | analog pin |
RE2 | A | J5:A7 | 10 | Input | analog pin |
RA4 | K | J4:SD | 6 | Input / Output | IIC data pin SD, external 1k pull-up, can be used by an application for other purposes so long MIOS_IIC_* won't be called |
RC0 | B | J6:RC / J7:RC | 15 | Output | used to address the AIN multiplexers or the MF module. In both cases driven by an interrupt service routine. |
RC1 | B | J6:SC / J7:SC | 16 | Output | used to address the AIN multiplexers or the MF module. In both cases driven by an interrupt service routine. |
RC2 | D | J7:SO | 18 | Output | used as serial output to the MF module, driven by an interrupt service routine. |
RC3 | C | J6:SI / J10:PWM | 17 | Output | used to address the AIN multiplexers, driven by an interrupt service routine / SID PWM. This pin is stuffed with an external 10k pull-up which could be useful for an application which uses this pin as input |
RD0 | E | J8:SO | 19 | Output | serial output to the DOUT chain, driven by an interrupt service routine if MIOS_SRIO active |
RD1 | E | J9:SI | 20 | Input | serial input to the DIN chain, used by an interrupt service routine if MIOS_SRIO active |
RD2 | F | J8:RC / J9:RC | 21 | Output | serial latch output, used by an interrupt service routine if MIOS_SRIO active |
RD3 | F | J8:SC / J9:SC / J10:SC | 22 | Output | serial clock output, used by an interrupt service routine if MIOS_SRIO active / SID SC |
RC4 | G | J10:RC | 23 | Output | SID RC / free for applications without restrictions if second CLCD not used |
RC5 | G | J10:SO | 24 | Output | SID SO / free for applications without restrictions |
RD4 | E | J14 | 27 | Output | touch sensor strobe signal, used by an interrupt service routine if MIOS_SRIO active and TS_Sensitivity > 0 |
RD5 | H | J4:SC / J10:MD / J15:RS | 28 | Output | clock output to IIC / SID MD / address signal to LCD |
RD6 | H | J10:MU / J15:RW | 29 | Output | SID MU / RW signal to LCD |
RD7 | I | J15:E | 30 | Output | enable signal to LCD (exclusive!) |
RB0 | J | J15:D0 | 33 | Input / Output | LCD data line #0 |
RB1 | J | J15:D1 | 34 | Input / Output | LCD data line #1 |
RB2 | J | J15:D2 | 35 | Input / Output | LCD data line #2 / CAN Tx |
RB3 | J | J15:D3 | 36 | Input / Output | LCD data line #3 / CAN Rx |
RB4 | J | J15:D4 | 37 | Input / Output | LCD data line #4 |
RB5 | J | J15:D5 | 38 | Input / Output | LCD data line #5 |
RB6 | J | J15:D6 | 39 | Input / Output | LCD data line #6 |
RB7 | J | J15:D7 | 40 | Input / Output | LCD data line #7 |
The pins are divided into following classes:
See also the schematic of the MBHP_CORE module as reference, or this PCB layout:
This table is based on the original from mios_pin_list.txt
Here are suggested part numbers for various distributors for parts for the core V3 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.
Description | polarity | Soldering Instructions | QTY | Reichelt Part# 1) | Mouser Part# |
---|---|---|---|---|---|
PIC18F452-I/P | Yes | Don't (use socket) | 1 | PIC 18F452-I/P | 579-PIC18F452-I/P |
Crystal 10 MHz | No | 1 | 10-HC18 | 73-XT49S1000-20 | |
Voltage Regulator 7805 | Yes | 1 | uA 7805 | 512-LM7805CT | |
IC-Socket for PIC | Yes | 1 | GS 40P | 571-3902625 | |
Optocoupler 6N138 | Yes | Don't (use socket) | 1 | 6N 138 | 782-6N138 |
IC-Socket for Optocoupler | Yes | 1 | GS 8P | 571-3902612 | |
Transistor BC337 | Yes | quick | 1 | BC 337-16 | 512-BC337TF |
Resistor 10 kOhm | No | 3 | 1/4W 10k | 291-10K-RC | |
Resistor 5.6 kOhm | No | 1 | 1/4W 5.6k | 291-5.6K-RC | |
Resistor 1.2 kOhm | No | 1 | 1/4W 1.2k | 291-1.2K-RC | |
Resistor 1 kOhm | No | 3 | 1/4W 1k | 291-1K-RC | |
Resistor 220 Ohm | No | 3 | 1/4W 220 | 291-220-RC | |
Resistor 100 Ohm | No | 1 | 1/4W 100 | 291-100-RC | |
Ceramic Cap 100 nF | No | 3 | Z5U-2,5 100n | 80-C412C104K5R | |
Ceramic Cap 330 nF | No | 1 | MKS-2 330n | 80-C320C334M5U | |
Ceramic Cap 33 pF | No | 2 | Kerko 33p | 140-50N2-330J | |
Polarised Capacitor 10 uF | Yes | 1 | rad 10/35 | 140-HTRL25V10-RC | |
Polarised Capacitor 2200 uF | Yes | 1 | rad 2200/16 | 140-HTRL16V2200-RC | |
Diode 1N4148 | Yes | quick | 1 | 1N 4148 | 78-1N4148 |
Rectifier | Yes | 1 | B80C800RUND | 625-W08G | |
TrimmPot 10 k | Yes | 2 | PIHER 10-S 10K | 531-PT6KV-10K | |
MIDI Sockets | Yes | 2 | MAB 5S | 161-0505 | |
1-row SIL Headers (about 30 pins) | No | 1 | STIFTL. 40G | 517-6111TG | |
1-row sil female 36 con | No | 1 | - | 517-850-01-36 | |
2-row SIL Headers (about 2*22 pins) | No | 1 | STIFTL. 2X40G | 517-6221TG | |
2-row sil female 25 rows | No | 1 | - | 517-852-01-25 | |
Ribbon cable 3 meters | No | 3 | AWG 28-16G | - | |
Wall adapter (Power supply) 500 mA | - | 1 | MW 17-GS/6 | - | |
Socket for Power Supply | - | 1 | HEBLM 21 | - |
The Microchip PIC18F series chips are used as the main microprocessor in the Core module. Details regarding the chips are as follows:
There are different possibilities to have multiple Cores.