ATMEGA328P send MIDI via USB

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: khz, MattKingUSA

Posts: 1
Joined: Thu Dec 22, 2016 5:49 am

ATMEGA328P send MIDI via USB

Postby Kendall » Fri Dec 23, 2016 7:19 am

I've created a circuit on my breadboard including multiple shift registers and a teensy 2.0++.

My program takes inputs from the shift regs and converts them into MIDI messages. Using my teensy in MIDI mode, my project works just fine.

I'm now moving all this to a permanent solution using an ATMEGA328P. I used my teensy as a programer and then as serial-to-USB-bridge. The project works well this way too, and the midi messages are received and interpreted correctly by my DAW.

When all the stuff is moved to the casing and screwed together, I want to use MIDI-over-USB instead of using regular MIDI connectors.

So my question is this: How do I extend my circuit to be compatible with USB HID and send the serial data via USB-MIDI?

Ideally I'd like to have an architecture with exchangeable I/O Boards:

My main controller outputs the MIDI commands via a 31250 baud serial bus. This signal could then be sent to:
A USB-board that sends the MIDI via USB
A standard MIDI-board
Or even an ethernet-board to add network support.
Would that be worth the effort?
How could that be done?

User avatar
Establlshed Member
Posts: 102
Joined: Sun Mar 06, 2016 9:14 pm
Location: Minneapolis

Re: ATMEGA328P send MIDI via USB

Postby kbongosmusic » Fri Dec 23, 2016 11:38 pm

Hi Kendall,

I used to do a lot of stuff with micros. AVR is a favorite. Here would be my suggestions.
Stick with the pre-made teensy-2.0++ or something like it - I believe the AVR you mention does not have a USB peripheral, while the one on teensy2.0++ does. And while there are software to bit-bang USB, this is very limited, slow. Unless you are planning to produce 100's of these, it's probably not going to save you anything to try to make your own board. These little modules are built with socket pin IO, so they already are extensible.

A lot of it is up to the software as well - even if you have the USB peripheral, they are quite complex, and having someone elses MIDI project with a pre-configured MIDI HID as a starting point is going to be very helpful. So go find a few existing AVR USB MIDI open projects, see what AVR micro they use, try to re-use them.

So what do you do with the shift registers? Do you mean like real shift registers? Or are they a software construct?

Return to “Computer Related Hardware”

Who is online

Users browsing this forum: No registered users and 4 guests