Subversion Repositories svn.mios

Rev

Rev 1162 | Blame | Compare with Previous | Last modification | View Log | RSS feed

HEADER 3 MBHP_CORE_LPC17 Module

<H1>MIDIbox Hardware Platform, CORE_LPC17 Module</H1>

<P><CENTER><IMG SRC="mbhp/mbhp_core_lpc17_v1.jpg" width=550 height=283></CENTER></P>

<P CLASS=INFO>MBHP_CORE_LPC17 is the successor of the <A HREF="mbhp_core_stm32.html">MBHP_CORE_STM32</A> module, and an alternative solution to the <A HREF="mbhp_core_stm32f4.html">MBHP_CORE_STM32F4</A> module.

<P CLASS=DESC>Main features of the <A HREF="http://www.nxp.com" TARGET="_blank">NXP LPC1769</A> based MBHP_CORE_LPC17 module:
<UL CLASS=CL>
<LI> 512k Flash and 64k RAM like <A HREF="mbhp_core_stm32.html">MBHP_CORE_STM32</A>
<LI> The prebuilt LPCXPRESSO is available for 20 EUR at <A HREF="http://www.embeddedartists.com/products/lpcxpresso/lpc1769_xpr.php" TARGET="_blank">Embedded Artists</A> (+ VAT + shipping - in total ca. 30 EUR with "First Class Mail" option). <B>News:</B> now also available directly in Germany for 24 EUR + Shipping from <A HREF="http://www.watterott.com/de/LPC1769-LPCXpresso-Board" TARGET="_blank">Watterott</A>, in France from <A HREF="http://www.lextronic.fr/P19864-module-lpc1769-lpcxpresso-board.html" TARGET="_blank">Lextronic</A>, and in the USA from <A HREF="http://www2.mouser.com/ProductDetail/Embedded-Artists/EA-XPR-003/?qs=S92LKl1JvFyxqKp2Q1rskQ%3d%3d" TARGET="_blank">Mouser (#924-EA-XPR-003)</A>!<BR>
It will just be attached to the MBHP_CORE_LPC17 PCB
<LI> Easily available for private persons in small quantities and no SMD soldering skills required
<LI> ARM Cortex-M3 CPU is widely supported by the GNU toolchain, accordingly source code can be compiled under Windows/Linux/MacOS w/o spending money for an expensive ARM compiler
<LI> Much better performance - compared to PIC or ATMega, the LPC17xx really plays in a different league because of the higher frequency (120 MHz), higher data width (32bit), hardware multiplier and division unit, etc.
<LI>MIOS32 applications are typically running ca. 30..50% faster than on STM32F103RE @ 72 MHz
<LI> Very useful integrated peripherals for MIDI and Synthesizer applications, such as UART, SPI, I2C, USB, CAN, Timers, ADC, DAC, Ethernet
<LI> in distance to STM32F103RE, CAN and USB can be used in parallel
<LI> the integrated ethernet interface leads to ca. 3 times higher throughput compared to the <A HREF="mbhp_eth.html">MBHP_ETH</A> based solution. Performance could even be better by improving the uIP driver.
<LI> It's easy to interface external components like <A HREF="mbhp_sdcard.html">SD Card</A> and I2S Audio DACs
<LI> LPC17xx is supplied at 3.3V, but 5V tolerant inputs allow to access all existing MBHP modules without additional hardware.
<LI> Performance boost by using the DMA for background operations, such as scanning DIN/DOUT modules, analog inputs but also I2S transfers (Audio Output) w/o loading the CPU
<LI> Supported by a free available Realtime Operating System: <A HREF="http://www.freertos.org" TARGET="_blank">FreeRTOS</A>
<LI> no programmer for flash required, LPC-Link is part of the LPCXPRESSO board to program the MIOS32 bootloader into a "virgin" device
<LI> Fast upload of application code via USB MIDI (ca. 20..40kb/s) - thanks to the <A HREF="mios32_bootstrap_newbies.html">MIOS32 Bootloader</A>
<LI> Due to improved performance, it allowed me to program MIOS32 and some first applications completely in C. This finally makes MIDIbox applications portable, e.g. it is possible to emulate a MIDIbox on a PC/Mac.
</UL>

<P CLASS=DESC>Ok, enough praises for this nice toy. Here a list of issues/imperfections that I don't really like:
<UL CLASS=CL>
<LI> ADCs cannot be supplied at 5V, 3.3V is the limit. This decreases the signal/noise ratio. The <A HREF="mbhp_ainser64.html">MBHP_AINSER64</A> and <A HREF="mbhp_ainser8.html">MBHP_AINSER8</A> module helps to overcome this by using an external 5V ADC.
<LI> all DMA channels share a single interrupt. Request flags have to be checked by the interrupt handler, this consumes some cycles (however, the high CPU frequency somehow compensates this drawback)
<LI> DMA doesn't support decrement address function, so that SRIO (serial shift register input and output) streams have to be reversed by software.
<LI> output pins can't be used in open drain mode if a peripheral function like SPI or UART is assigned to it. This seems to be a design bug, because it isn't mentioned in the user manual (in distance: the description of the IO configuration implies that it should work, but it doesn't) - NXP support contacted, no reply yet!
<LI>accordingly, such peripheral output functions can't be pulled to 5V, 74HCL based buffers are required (part of MBHP_CORE_LPC17 module).
<LI>this limitation especially hurts for the MIDI OUTs, which can't be supplied at the (commonly used) 5V anymore. As a counter measure, R21, R22, R26 and R27 resistors are 47 Ohm instead of 220 Ohm to achieve a current of more than 5 mA for driving the optocoupler of the MIDI target device.
<LI> RTC can only be clocked at 1 Hz by an external 32kHz crystal. Accordingly it isn't possible to use it at mS accuracy (no possibility to clock it by the main oscillator)
<LI> RAM splitted into two 32k halves, there is a gap between the two SRAM ranges which makes it difficult for a code developer to locate variables in GCC. This will lead to unwanted dependencies for bigger MIOS32 applications (large arrays have to be assigned to RAM sections in the C code)
</UL>

<P CLASS=DESC>However, although some of these limitations are really annoying, I find the LPC17xx family a good alternative to <A HREF="mbhp_core_stm32f4.html">STM32F4</A> for the MIDIbox Hardware Platform, especially due to the inexpensive LPCXPRESSO boards with on-board Ethernet PHY.</P>


<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Installing the MIOS32 Bootloader </H2></DT>
  <DD>
  <DD><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH=640>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_program6.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>The original LPCXpresso board consists of a debug interface (left side) and the so called target (right side), which we will attach on the MBHP_CORE_LPC17 module later.<BR>
      Before a MIOS32 application can be uploaded via USB-MIDI, it's required to install the MIOS32 Bootloader. This can be done with the freely available LPCXpresso IDE.
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>Please note that the IDE got changes in the last months which make it more difficult to upload the precompiled binary as described below.<BR>
      Therefore it's recommended to <A HREF="http://www.lpcware.com/lpcxpresso/downloads/older" TARGET="_blank">download version 5.2.6</A> from the <A HREF="http://lpcxpresso.code-red-tech.com" TARGET="_blank">Code Red Technologies</A> webpage.
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_program5.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Note that a registration is required to get access to the IDE installation package. A version for Windows and Linux is available. Mac Users can run the Windows or Linux version on a virtual machine like <A HREF="http://www.virtualbox.org" TARGET="_blank">VirtualBox</A> (this is what I did - both variants are working fine!).<BR>Once the IDE has been installed, another registration has to be done to enable the LPC-Link interface - ready!
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_program_win2.png"><IMG SRC="mbhp/mbhp_core_lpc17_program_win2.png" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>After the LPCxpresso IDE has been opened, create a new "FreeRTOS project" for LPC1700 controllers.<BR>This project is only used as a dummy to enable the flash programmer - you don't need to change something in the code template, it won't run under MIOS32 anyhow!<BR>(You will transfer a precompiled binary into the flash)
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_program_win3.png"><IMG SRC="mbhp/mbhp_core_lpc17_program_win3.png" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>Select the LPC1769 target. It's red marked because it isn't fully supported by the evaluation version of this IDE - but again: for application development you wouldn't use this IDE anyhow!
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_program_win4.png"><IMG SRC="mbhp/mbhp_core_lpc17_program_win4.png" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>Click on the small "Program Flash" icon
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_program_win5.png"><IMG SRC="mbhp/mbhp_core_lpc17_program_win5.png" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>Click on the "Browse" button and search for the project.bin binary of the MBHP_CORE_LPC1769 directory which comes with the <A HREF="mios32_download.html">MIOS32 Bootloader</A> application. Note that you've to explicitely change the file search mask to "*.bin", since this isn't done by default (-&gt; project.bin file not displayed)
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_program_win6.png"><IMG SRC="mbhp/mbhp_core_lpc17_program_win6.png" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>Click on the "OK" button to program the bootloader into the flash.
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_program7.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2><B>Finally disconnect the USB plug, connect it again.</B><BR>
    The red status LED should slowly fade three times (effect via PWM modulation) - the MIOS32 bootloader is up and running!
      </TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>
        Please note that the bootloader doesn't work through the USB port of LPC-Link! Instead, a second USB socket will be required, which is directly connected to the LPC1769 target, and which is part of the MBHP_CORE_LPC17 module. But before we can use it, some additional preparations are required as explained in the next sections.
      </TD>
    </TR>
  </TABLE></DD>
  </DD>
</DL>

<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Preparing the LPCXpresso module </H2></DT>
  <DD>
  <DD><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH=640>
    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>
        The next step is <B>optional!!!</B> and only recommended for <B>experienced DIYers</B>.<BR>
        We will split the LPCXpresso module into two pieces for aesthetical reasons. Once this has been done, the LPC-Link can still be connected to the target via headers, or optionally a standard JTAG interface could be connected via J3 of the MBHP_CORE_LPC17 module to allow access via alternative debug software (and to overcome the 128k limit for debugging purposes).
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare1.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Several methods can be found on the web, here I propose an alternative solution. You need a veroboard, a 1-row SIL header with 8 pins, and a so called Stanley knife (carpet knife, german "Teppichmesser").
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare2.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Stick the SIL header at the border of the vero board; no soldering required (because you want to re-use the SIL header later for other purposes).
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare3.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Now stick the other side of the SIL header into J4 of the target board - again: no soldering required!
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare4.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Now you have to cut a deep groove between the two PCB halves. The veroboard will perfectly guide the knife. The PCB material is quite robust, so that it will require multiple (and especially strong!) cuts. The first time it took me more than 10 minutes to get a sufficient groove, the next time (with some practice and less patience) maybe two minutes.
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare5.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Now you can gently try to separate the boards. Continue with the previous step if it doesn't work - period!
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare6.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Finally separated. The sharp ends could be beveled with a file!
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare7.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Now add male headers at the bottom of the target board. You will need:
        <UL CLASS=CL>
          <LI>two 27-pin SIL headers for the upper/lower side
          <LI>one 2x6-pin DIL header and a 6-pin SIL header for the right side (pin 19 not used, no need to add a header there)
          <LI>Please note, that some people might prefer to solder female sockets instead - see also the "Making the LPCXPRESSO module removable" topic below!
        </UL>
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare8.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>A 8-pin SIL header should be soldered at he bottom of the left side if a standard JTAG debugger will be connected via J3 of the MBHP_CORE_LPC17 module.<BR>
If you are planning to use the LPC-Link instead, the 8-pin SIL header should be mounted at the top...
      </TD>
    </TR>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_prepare9.jpg" WIDTH=280 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>...so that it can be attached via a SIL female header like shown in this picture.
      </TD>
    </TR>
  </TABLE></DD>
  </DD>
</DL>


<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> IMPORTANT: Preparations if LPC-Link not separated</H2></DT>
  <DD>
  <DD><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH=640>
    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>
        If you decided not to separate the LPC-Link from the LPCXpresso module, it's mandatory to cut the 3.3V line from the two parts!<BR>
        <B>As long as the 3.3V is connected to the LPCXpresso, the core module won't boot!!!</B>
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_prepare_withlink.jpg"><IMG SRC="mbhp/mbhp_core_lpc17_prepare_withlink.jpg" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>You could use a knife or a screwdriver to do this. Note that the 8-pin SIL header and the JTAG socket don't have to be stuffed as well if the LPC-Link is available. On the other hand you don't need to remove them to get the core module working!<BR>
      (click on picture to enlarge)
      </TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>
      Background: the 3.3V line between LPC-Link and target powers the core if an USB cable is connected to the LPC-Link module.<BR>
      But usually we want to power the core from the USB socket of the MBHP_CORE_LPC17 module. As long as the 3.3V connection is available, the LPC-Link will be powered as well, and it forces the LPC1769 chip into reset as long as no debugger connection has been opened by the LPCXpresso IDE.<BR>
      Once the MIOS32 Bootloader has been programmed, you don't need to use this IDE anymore to program an application, therefore the 3.3V connection can be safely removed.
      </TD>
    </TR>
  </TABLE></DD>
  </DD>
</DL>



<DL>
   <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Download </H2></DT>
   <DD>
   <DD><TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
    <TR>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Module</STRONG></FONT></td>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Schematic</STRONG></FONT></td>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Layout Data</STRONG></FONT></td>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Quick-view</STRONG></FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><I>MBHP_CORE_LPC17_V1</I></TD>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17.pdf">mbhp_core_lpc17.pdf</A></TD>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17_pcb_v1_0.zip">mbhp_core_lpc17_pcb_v1_0.zip</A></TD>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17_pcb_v1_0.png">mbhp_core_lpc17_pcb_v1_0.png</A></TD>
    </TR>
  </TABLE></DD>

  <DD><TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
    <TR>
      <TD COLSPAN=4 CLASS=TABCOLOR1><FONT SIZE=3>Additional informations</FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>File</STRONG></FONT></td>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Size</STRONG></FONT></td>
      <TD NOWRAP CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17_orderlist.txt">mbhp_core_lpc17_orderlist.txt</A></TD>
      <TD CLASS=TABCOLOR2>1k</TD>
      <TD CLASS=TABCOLOR2><A HREF="http://www.reichelt.de/" TARGET="_blank">Reichelt</A> orderlist</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17_midi3_midi4_extension.pdf">mbhp_core_lpc17_midi3_midi4_extension.pdf</A></TD>
      <TD CLASS=TABCOLOR2>10k</TD>
      <TD CLASS=TABCOLOR2>Optional MIDI IN3/OUT3 and MIDI IN4/OUT4 extension for MBHP_CORE_LPC17 module (must be explicitely enabled by firmware)</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_core_lpc17_output_buffers.pdf">mbhp_core_lpc17_output_buffers.pdf</A></TD>
      <TD CLASS=TABCOLOR2>10k</TD>
      <TD CLASS=TABCOLOR2>Optional 3.3V-&gt;5V level shifters at various IO pins</TD>
    </TR>
  </TABLE></DD>
  </DD>
</DL>

<DL>
   <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Available Ports </H2></DT>
   <DD>
<P CLASS=DESC>Following interfaces are provided by the core module:
  <DD><TABLE CLASS=BOX WIDTH="100%" BORDER=1 CELLSPACING=5 CELLPADDING=0>

    <TR>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Name</STRONG></FONT></td>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>No. of pins</STRONG></FONT></td>
      <TD NOWRAP CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2>J1</TD>
      <TD CLASS=TABCOLOR2>2</TD>
      <TD CLASS=TABCOLOR2>Optional connection to a powersupply unit (PSU). A 7V-10V transformer, or a wall adapter could be used. At least 500 mA is recommended, especially if a backlit display is connected. 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.<BR>
       Note that the prefered solution is to power the module via the USB socket (see below) - in fact J1 only exists due to historical reasons.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J22</TD>
      <TD CLASS=TABCOLOR2>4</TD>
      <TD CLASS=TABCOLOR2>Alternatively the core module can be supplied via USB (prefered solution).<BR>
Once multiple LEDs and/or backlit LCDs are connected to the core module, it's recommended to use a "selfpowered" USB Hub like <A HREF="http://www.reichelt.de/USB-Hubs/MAXXTRO-MX-UAP/index.html?;ACTION=3;LA=444;GROUP=EU3;GROUPID=4831;ARTICLE=99781;START=0;SORT=artnr;OFFSET=16;SID=11TVLbZ38AAAIAAG9MIgIec1e46ae3eb4fc2fe4e011f269170227" TARGET="_blank">this one from Reichelt</A>. Advantage: it has a power-switch!<BR>
Using a hub has another advantage: it can be used to power multiple core modules even when no PC is available - this saves you from buying dedicated PSUs (therefore powering via J1 is obsolete).<BR>
The USB port provides the "MIDI USB" protocol by default, which works more than 50..100 times faster than a common MIDI IN/OUT connection. Also protocols like "Mass Storage Device" (MSD) to access a SD Card directly from a computer are provided by most MIOS32 based firmwares.<BR>
Applications can be updated quickly via USB port as <A HREF="mios32_bootstrap_newbies.html">explained here</A>.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J17</TD>
      <TD CLASS=TABCOLOR2>2</TD>
      <TD CLASS=TABCOLOR2>This jumper enables power supply via USB. Before closing the jumper, ensure that any other supply sources (e.g. at J1 or J2) are removed to avoid shorts or backcurrents to your PC!</TD>
    </TR>


    <TR>
      <TD CLASS=TABCOLOR2>J2</TD>
      <TD CLASS=TABCOLOR2>2</TD>
      <TD CLASS=TABCOLOR2><B>When used as +5V output:</B> to supply modules which are not connected to a Jxx port which already provides a 5V output. Note that the 7805 gets very hot when it delivers currents above 500 mA. Maximum current drain is 1A!<BR>
      <B>When used as +5V input: </B> for supplying the core from an external stabilized Power Supply Unit (PSU). The voltage regulator (IC6) doesn't need to be connected, also the rest of the voltage stabilization circuit between J1 and J2 (X1, C8, C9) can be left out. If the core module (and all connected modules to this branch) drains more than 100 mA, it's recommended to mount C8 directly to J2 (a small cable between the outer soldering pads of the left-out 7805 will do this).</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J3</TD>
      <TD CLASS=TABCOLOR2>20</TD>
      <TD CLASS=TABCOLOR2>Standard 20 pin interface to JTAG Wiggler, see <A HREF="mios32_bootstrap_experts.html">this page</A> for details.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J4A</TD>
      <TD CLASS=TABCOLOR2>4</TD>
      <TD CLASS=TABCOLOR2>IIC port. Interface to <A HREF="mbhp_bankstick.html">BankSticks</A> or to MBHP_IIC_* modules like <A HREF="mbhp_iic_midi.html">MBHP_IIC_MIDI</A>.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J4B</TD>
      <TD CLASS=TABCOLOR2>4</TD>
      <TD CLASS=TABCOLOR2>A second IIC port, which can also be used as an additional MIDI IN/OUT port (MIDI IN4/OUT4) if enabled in MIOS32 (add "#define MIOS32_UART_NUM 4" to the mios32_config.h file).<BR>
MIDI IN4 will be available on the J4B.SC. If a 6N138 based optocoupler circuit should be connected, replace the 2.2k pull-up R10 by 1k, or add a second 2.2k in parallel to get 1.1k effectively.<BR>
MIDI OUT4 will be available on the J4B.SD pin, it isn't required to remove R9 if already soldered - it doesn't hurt.
</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J5a/b</TD>
      <TD CLASS=TABCOLOR2>2*10</TD>
      <TD CLASS=TABCOLOR2>Analog sources (like pots) can be connected to this port (8 pots maximum). If more analog pins should be scanned, please use the <A HREF="mbhp_ainser64.html">MBHP_AINSER64</A> module! There are also some application which use this pin as digital in- or output (mostly described in README.txt file).<BR>
Alternatively J5 pins can also be used as digital input and/or output pins (MIOS32_BOARD_J5_*, see tutorial applications).
And J5B.A6 (MIDI IN3) and J5B.A7 (MIDI OUT3) provide an alternative MIDI IO port as well if "#define MIOS32_UART_NUM 3" has been added to the mios32_config.h file (defines the number of UART ports).<BR>
Sidenote: if MIDI IN4/OUT4 should be enabled, but J5B.A6/A7 should be used for other purposes - e.g. as pot inputs - just write "#define MIOS32_UART_NUM 4" and add "#define MIOS32_UART2_ASSIGNMENT 0" to the mios32_config.h file.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J8/J9</TD>
      <TD CLASS=TABCOLOR2>10</TD>
      <TD CLASS=TABCOLOR2>DMA driven SPI port which works at 5V level. J8 is the interface to the <A HREF="mbhp_dout.html">DOUT module</A> chain, whereas J9 is the interface to the <A HREF="mbhp_din.html">DIN module</A> chain.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J11</TD>
      <TD CLASS=TABCOLOR2>10</TD>
      <TD CLASS=TABCOLOR2>NOT PART OF THE MBHP_CORE_LPC17 PCB DUE TO SPACE REASONS!<BR>
      This port provides two MIDI IOs at TTL level, interface to the <A HREF="mbhp_ltc.html">LED/Thru/COM module</A>. Can also be used to cascade multiple core modules in a MIDI chain (see <A HREF="midibox_link.html">MIDIbox Link</A>). <B>Note:</B> It's possible to distribute the Tx (MIDI Out) signal to multiple cores, but it isn't allowed to connect more than one Tx output to a Rx input. Instead, a <A HREF="midimerger.html">MIDImerger</A> is necessary to combine multiple MIDI IN sources.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J12/J20</TD>
      <TD CLASS=TABCOLOR2>3</TD>
      <TD CLASS=TABCOLOR2>MIDI OUT port 1 and 2. See the schematic, how to connect a MIDI socket to this port.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J13/J21</TD>
      <TD CLASS=TABCOLOR2>3</TD>
      <TD CLASS=TABCOLOR2>MIDI IN port 1 and 2. See the schematic, how to connect a MIDI socket to this port.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J15a/b</TD>
      <TD CLASS=TABCOLOR2>16</TD>
      <TD CLASS=TABCOLOR2>Interface to one or two <A HREF="mbhp_lcd.html">LC display module(s)</A>.<BR>
Please note that the pinout is different compared to the <A HREF="mbhp_core.html">MBHP_CORE</A> module!<BR>
See also special section at the end of this page!
</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J15_S</TD>
      <TD CLASS=TABCOLOR2>3</TD>
      <TD CLASS=TABCOLOR2>Allows to select between 5V and 3.3V based LCDs.<BR>
      For common LCDs (5V based) please stuff the jumper between the middle and 5V pin - the LCD won't be supplied (= won't work) without this jumper!
</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J16</TD>
      <TD CLASS=TABCOLOR2>10</TD>
      <TD CLASS=TABCOLOR2>DMA driven SPI port at 3.3V level for <A HREF="mbhp_sdcard.html">SD Card</A> and additional fast serial interfaces in future. Two chip select lines are available, additional chip selects could be provided by other free pins.<BR>
See the <A HREF="mbhp_sdcard.html">MBHP_SDCARD</A> page for cheap SD Card adapters.
</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J18</TD>
      <TD CLASS=TABCOLOR2>2</TD>
      <TD CLASS=TABCOLOR2>CAN interface at TTL level as used by <A HREF="midibox_network.html">MBNet</A>.<BR>
This port can also be used for measuring frequencies as demonstrated in <A HREF="http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fexamples%2Fcv_autotune%2F" TARGET="_blank">this example</A>.
</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J19</TD>
      <TD CLASS=TABCOLOR2>8</TD>
      <TD CLASS=TABCOLOR2>Interface to application specific module extensions at 5V level like the <A HREF="mbhp_ainser64.html">AINSER64</A> and <A HREF="mbhp_aout.html">AOUT</A> module. Prepared for serial interfaces (although not driven by an integrated SPI), two chip select lines are available, additional select lines can be taken from free pins.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J27</TD>
      <TD CLASS=TABCOLOR2>2</TD>
      <TD CLASS=TABCOLOR2>Bootloader HOLD Mode jumper. The application will be started when this jumper is <B>NOT</B> connected! Bootloader entry will be forced with connected jumper (fallback solution if the application crashes during initialisation).</TD>
    </TR>


    <TR>
      <TD CLASS=TABCOLOR2>J28</TD>
      <TD CLASS=TABCOLOR2>10</TD>
      <TD CLASS=TABCOLOR2>I2S (Audio DAC) Interface as documented at the <A HREF="mbhp_i2s.html">MBHP_I2S</A> page. Can also be used as general purpose IO port with 4 IO pins by using the MIOS32_BOARD_J28* functions.</TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2>J10</TD>
      <TD CLASS=TABCOLOR2>10</TD>
      <TD CLASS=TABCOLOR2>General purpose IO port with 8 pins, accessible via MIOS32_BOARD_J10* functions. Mostly used for the "Standard Control Surface" (SCS, see the appr. tutorial application and <A HREF="mbhp/mbhp_scs_for_j10.pdf">this schematic</A>) to connect buttons and encoders without the need for a DIN Shift Register.</TD>
    </TR>

  </TABLE></DD>
  </DD>
</DL>


<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Minimal Circuit to get USB running</H2></DT>
  <DD>
      <P CLASS=DESC>Following minimal circuit is helpful for impatient builders who want to do some experiments with the LPCXPRESSO running under MIOS32 without using the complete MBHP_CORE_LPC17 module. Interaction with the application is possible via the MIOS Studio Terminal and via MIDI of course!</P>
      <P CLASS=DESC>It provides:
        <UL CLASS=CL>
          <LI>USB Socket for USB-MIDI and to connect to <A HREF="mios_studio.html">MIOS Studio</A>
          <LI>jumper for disconnecting the USB power supply
          <LI>3.3V voltage regulator LF33, 100 uF and 100 nF caps
          <LI>an optional Bootloader Hold jumper which could be useful if the application hangs up due to a programming error (if this happens: close this jumper and reconnect the On/Off jumper to reboot the core - the bootloader stays active and a new .hex file can be uploaded).<BR>
          Note that code upload is possible w/o this HOLD jumper if the application is working properly. In other words: the jumper is only a fallback solution for developers.
        </UL>
      </P>
      <P CLASS=DESC>Other components such as MIDI IN/OUT sockets, MagJack for Ethernet, SRIO ports or whatever can be added successively if required.</P>

      <P CLASS=DESC>Click on the images for higher resolution:</P>
      <TABLE CELLSPACING=2 CELLPADDING=2 WIDTH=640>
       <TR>
         <TD><A HREF="mbhp/mbhp_core_lpc17_miniproto1.jpg"><IMG SRC="mbhp/mbhp_core_lpc17_miniproto1.jpg" WIDTH=320 BORDER=0 ALT=""></A></TD>
         <TD><A HREF="mbhp/mbhp_core_lpc17_miniproto2.jpg"><IMG SRC="mbhp/mbhp_core_lpc17_miniproto2.jpg" WIDTH=320 BORDER=0 ALT=""></A></TD>
       </TR>
     </TABLE>
  </DD>
</DL>

<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Soldering Guide for the complete MBHP_CORE_LPC17 module</H2></DT>
  <DD>
  <DD><TABLE CELLSPACING=2 CELLPADDING=2>
    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_2.jpg" WIDTH=280 HEIGHT=238 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>It's always a good idea to start with the smallest components to simplify mounting.<BR>
So, start with the resistors and diodes:
<UL CLASS=CL>
<LI>R7, R8, R9, R10 = 2.2k
<LI>R11, R13, R18, R23 = 1k
<LI>R12 = 10k
<LI>R19, R24 = 4.7k
<LI>R20, R25 = 220
<LI>R21, R22, R26, R27 = 47
<LI>D1, D2, D3 = 1N4148 (polarity! Check the black ring!)
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_3.jpg" WIDTH=280 HEIGHT=239 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Continue with the resistor arrays.<BR>
Take care that they are "polarised"! The dot marks the common pin which has to be soldered into the appr. square pad of the PCB:
<UL CLASS=CL>
<LI>R2 = 4x10k
<LI>R33 = 4x1k
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_4.jpg" WIDTH=280 HEIGHT=235 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Now solder the caps.<BR>
Pay attention for the polarity of the El.Caps! The positive leg of an El.Cap is longer than the negative leg. The negative leg is also marked on the cap case. Put the positive into the pad which is marked with "+".
<UL CLASS=CL>
<LI>C11, C13, C14, C15 = 100 nF
<LI>C10 = 47 uF (El.Cap - polarity! Plus leg shows to border)
<LI>C12 = 100 uF (El.Cap - polarity! Plus leg shows to border)
<LI>C9 = 330 nF
<LI>C8 = 2200 uF (El.Cap - polarity! Plus leg shows to border)
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_5.jpg" WIDTH=280 HEIGHT=231 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Solder the special components:
<UL CLASS=CL>
<LI>T1 = BC337 (polarity!)
<LI>P1, P2 = 10k Pots
<LI>IC6 = 7805 (polarity! see picture)
<LI>IC7 = LF33 (polarity! see picture)
<LI>X1 = rectifier (polarity!)
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_6.jpg" WIDTH=280 HEIGHT=231 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>And add IC sockets and jumpers:
<UL CLASS=CL>
<LI>IC1, IC2, IC4, IC5 sockets
<LI>J17, J15_S, J27 jumpers
<LI>J1, J2, J4A, J4B, J18 sockets
<LI>USB socket
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_7.jpg" WIDTH=280 HEIGHT=223 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Optional step: before continuing, it makes sense to do a basic voltage check: plug in the USB cable, and mount the "USB Power" jumper on J17. Thereafter you should measure ca. 3.3V between GND (lower left corner in this picture) and the 3v3 (lower right corner) supply pins to the LPCXPRESSO module.<BR>
Note that USB Power Jumper J17 <B>has to be removed</B> when the core is supplied externally via J1!
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_8.jpg" WIDTH=280 HEIGHT=247 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Add the remaining sockets:
<UL CLASS=CL>
<LI>2x5 pin sockets J5A, J5B, J19, J8/9, J16, J10
<LI>2x8 pin sockets J15A and J15B
<LI>2x10 pin socket J3 (optional for JTAG)
<LI>4 MIDI Sockets
</UL>
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_8_sockets.jpg" WIDTH=280 HEIGHT=249 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>And the optional female (or male) sockets for the LPCXPRESSO module if you want (see also the "making the LPCXPRESSO module removable" topic below).
      </TD>
    </TR>

    <TR>
      <TD><IMG SRC="mbhp/mbhp_core_lpc17_9.jpg" WIDTH=280 HEIGHT=244 BORDER=0 ALT=""></TD>
      <TD CLASS=TABCOLOR2>Plug the LPCXPRESSO into the board and solder all pins.<BR>
Finally plug the ICs into the sockets:
<UL CLASS=CL>
<LI>IC1 = 74HCT541
<LI>IC2 = 74HCT595 if LCD should be supplied at 5V, otherwise 74HC595 for 3.3V option<BR>
Note: 74HCT595 not available at Reichelt - take 74HC595 instead, it will work properly anyhow!
<LI>IC4, IC5 = 6N138
</UL>
      </TD>
    </TR>

    <TR>
      <TD CLASS=TABCOLOR2 COLSPAN=2>
      </TD>
    </TR>
    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_prepare_withlink.jpg"><IMG SRC="mbhp/mbhp_core_lpc17_prepare_withlink.jpg" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>
        If you decided not to separate the LPC-Link from the LPCXpresso module, it's mandatory to cut the 3.3V line from the two parts!<BR>
        <B>As long as the 3.3V is connected to the LPCXpresso, the core module won't boot!!!</B><BR>
        You could use a knife or a screwdriver to do this. Note that the 8-pin SIL header and the JTAG socket don't have to be stuffed as well if the LPC-Link is available. On the other hand you don't need to remove them to get the core module working!<BR>
      (click on picture to enlarge)
      </TD>
    </TR>

    <TR>
      <TD><A HREF="mbhp/mbhp_core_lpc17_10.jpg" TARGET="_blank"><IMG SRC="mbhp/mbhp_core_lpc17_10.jpg" WIDTH=280 BORDER=0 ALT=""></A></TD>
      <TD CLASS=TABCOLOR2>Since the LPCXPRESSO module doesn't provide dedicated pins for the two Ethernet Socket LEDs, you have to solder them directly from the appr. on-board SMD LEDs to J26 of the core module with two wires (click on picture to enlarge).<BR>
                <BR>
                DONE! :-)

      </TD>
    </TR>

  </TABLE></DD>
  </DD>
</DL>

<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Hint: making the LPCXPRESSO module removable</H2>
  <DD>
  <P CLASS=INFO>Ilmenator demonstrates in <A HREF="http://midibox.org/forums/topic/15892-lpc17xx-socket-connection-to-mbhp32-core-board" TARGET="_blank">this forum posting</A> how you can make the LPCXPRESSO module removable by using female sockets. Unfortunately it's hard to get perfectly matching female sockets with at least 27 pins, and the 20-pin sockets available at Reichelt are slightly too long. Therefore some file work is required to combine multiple sockets.</P>
  <P CLASS=INFO>Using sockets for the LPCXPRESSO module is recommended, but not required if you are sure what you are doing.</P>
  <P CLASS=INFO>It's also up to you if you prefer to use these female sockets for the LPCXPRESSO module, or for the MBHP_CORE_LPC17 module. Since female sockets are more expensive, you have to consider if you would like to use the LPCXPRESSO module on multiple boards, or if you want to get the possibility to replace the LPCXPRESSO module by another (pin compatible) one in future.
  </DD>
</DL>

<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Special Guide: Connecting a 2x20 (or 2x40) LCD</H2></DT>
  <DD>
  <P CLASS=INFO>The pinning of the 2x8 LCD connectors J15A and J15B is mirrored to simplify the cabling of common 2x20 and 2x40 displays (and partly due to historical reasons - it's originated from the so called "UltraPCB").<BR>
Note also that in difference to the MBHP_CORE_STM32 module, the J15 ports have been rotated by 180 degrees! But the polarity is the same, which means that you can re-use the LCD cables which you made for the MBHP_CORE_STM32 module.<BR>
J15 Pin 1 (labeled with Vs) goes to Pin 1 of the LCD (normaly named "Vss").<BR>
Following pictures illustrate the orientation of the IDC connectors:
<P><CENTER><IMG SRC="mbhp/mbhp_core_lpc17_lcd1.jpg" width=550 height=403></CENTER></P>
<P><CENTER><IMG SRC="mbhp/mbhp_core_lpc17_lcd2.jpg" width=550 height=403></CENTER></P>
<P CLASS=DESC>See also <A HREF="mbhp/mbhp_lcd_2x20_mios32.pdf">this schematic</A>.
  </DD>
</DL>


<DL>
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Credits </H2></DT>
  <DD><P CLASS=DESC>A big thank-you goes to <A HREF="http://www.exodusamps.com" TARGET="_blank">Sebastian Kulik</A>, who pushed me to evaluate a new microcontroller and who created the layout. He used <A HREF="http://www.altium.com/" TARGET="_blank">Altium Designer</A> for this task and wants to thank the company for the very friendly support.<P>
  </DD>
</DL>

  
FOOTER