Arduino UNO MIDI-IN debugging with PuTTY (Windows)

This is gonna be a short article of a method I’m using to debug my Arduino UNO program that implements MIDI-in serially (digital pin 0 “RX”).

If you’re reading this you probably had the same problem I had: You want to transfer debug info trough USB at the same time you receive MIDI messages and you find out the Serial Monitor in Arduino software doesn’t support MIDI baud rates (32150 bauds). I read somewhere that it has to do with Java not allowing this speed.

The easiest solution would be to try all your code in a more complete Arduino, like the Mega which has more than one serial port, and use different baud rates for debug and MIDI. But in case you need for some reason to work with a UNO, here’s my solution.

I use the PuTTY terminal softwareConfigure it with the COM serial port you’re using to program your Arduino, and the following options, like this:

putty arduino midi 31250
The “Implicit CR for every LF” option basically means it will do a carriage return even if the ‘\r’ character is not present in a string, which oftenly is not and just ‘\n’ suffices. You should save the session for convenience, and double click on it when you open PuTTY to jump right to the terminal and connect to the Arduino.

midi_in arduino uno_bb

This is the wiring of the circuit. Notice the push button. This is a normally closed push button (push to open circuit). You must break the connection to the opto-isolator when you’re programming your device, or the MIDI interface will “win”, sort of speak, over the USB-to-Serial chip that is trying to upload the new program, because it uses Pin 0 and 1 (RX and TX) for that. It’ll win because it’s a 470Ω resistor to +5V versus a 1kΩ (internal) to the USB interface.

putty out

I made a simple program to test it (very ugly code), you can download the Arduino sources here:
MIDI_in_decoder_en_es_2013_10_16.zip

You can see the screenshot to the right on how it will look on PuTTY.

I’ve used an Akai MPD-16 as MIDI controller.

Step-by-step

  1. Hold the normally closed push button
  2. Upload with Arduino software
  3. Release the push button
  4. Open PuTTY
  5. Load the previously configured session by double clicking on it
  6. Test and read your debug stuff
  7. Fix something in the code
  8. Close PuTTY (so that Arduino can use the serial port)
  9. Go to step 1

I hope you find this useful!

6 comments

  1. Tobi says:

    Thanks a lot! This was very helpful in debugging my MIDI setup.
    You should post it on the arduino.cc website.
    I am pretty sure that more people run into this problem.

    Tobi

  2. Fantastic items from you, man. I’ve be mindful your stuff prior to and you are just extremely excellent.
    I actually like what you have acquired right here, certainly like what you
    are saying and the way in which during which you assert it.
    You are making it entertaining and you continue to care for to keep it wise.
    I can’t wait to learn far more from you. That is actually a wonderful web site.

  3. ggcheat.com says:

    Very shortly this web page will be famous among all blogging
    and site-building users, due to it’s nice articles
    or reviews

  4. Isidra says:

    I see a lot of interesting posts on your page. You have to spend
    a lot of time writing, i know how to save you a lot of time, there is a tool that creates unique,
    SEO friendly articles in couple of minutes, just type in google – k2 unlimited content

  5. Lyle says:

    May I simply just say what a relief to discover an individual who
    actually knows what they are discussing over the internet.

    You definitely realize how to bring a problem to light and make it
    important. More and more people must check this out and understand
    this side of the story. I can’t believe you’re not more popular because you surely possess the gift.

Leave a Reply to Isidra Cancel reply

Your email address will not be published. Required fields are marked *