Midi input with no rx pin

Hi

I am doing a project that requires midi input which I have seen uses the rx pin on the arduino.My problem is that I have an 8 bit DAC(digital to analog converter) hooked up to the PORTD(the only one with 8 pins on the uno) so I cant use the rx pin.

Does any body know how can I use midi in with another pin or another arduino board with differnt port registers that will allow an 8 bit DAC without using the rx pin?

Thanks a lot for your time.

  1. Use software serial for your MIDI output
    or
  2. Use an Arduino Micro pro - this can connect to MIDI over USB and so does not need Pin 1
    or
  3. Use a Mega, that has other free ports with all pins available.

Thanks for answering so fast, but could you please explain your ideas a bit more especially the first two because I have no idea how to apply them.

Also I want to make clear that I want to use midi input with my arduino.

Again thanks a lot for your time.

Normally MIDI In/Out use hardware Serial commands which need pins 0 and 1. You can instead change the code to use SoftwareSerial which can be set up on any digital pins of your choice.

If you post the code and circuit that you are using you can probably get detailed instructions about what changes are needed but there's no point us trying to guess what you currently have.

Steve

Option 2 says use a different sort of Arduino. The one I suggested can use the USBMIDI libiary that can connect direct to your PC or lap top and be recognised as a HID MIDI device. This leaves pins 0 & 1 free to use in your parallel interface.

ARIS009:
Hi

I am doing a project that requires midi input which I have seen uses the rx pin on the arduino.My problem is that I have an 8 bit DAC(digital to analog converter) hooked up to the PORTD(the only one with 8 pins on the uno) so I cant use the rx pin.

You can split the 8 bit parallel output of the DAC between two ports, read both ports and combine the
values using shifts and ORs. Sure its convenient to have all 8 bits on a single port, but its not a hard
requirement unless timing is really tight.

Thus instead of reading the 8 bits like this:

byte readDAC()
{ 
  return PIND ;
}

you might do something like:

byte readDAC()
{
  return (PIND & 0xF0) | (PINB & 0x0F) ;
}

Thus using Arduino pins 8,9,10,11,4,5,6,7 for bits 0 to 7 of the DAC's parallel output.

Thanks a lot for the great advice guys.

I am going to use Arduino leonardo pro micro that supports usb midi.Could anyone tell me the port registers for it and save me some trouble please? Cause I do not understand a word from the datasheet.

Thanks.

It is all on the schematic.

arduino-leonardo-schematic_3b.pdf (38.1 KB)

Sorry for being a noob but could you just tell me were to hook up my 8 bit DAC and the command I need to use on my code? As I told you I do not understand the shcematics

Thanks

The loeonardo doesn't bring out an entire 8 bit port out on the Arduino pins.

As I told you I do not understand the shcematics

No you didn’t you said:-

Cause I do not understand a word from the datasheet.

A data sheet is not a schematic.

You have also not said what you want to do with this D/A. Do you know what you are trying to do? Would you mind sharing it with us?

I want be able to receive midi messages and translate them into a voltage so I can control an analog synthesizer with midi.Also sorry for inaccuracys on my posts but it the first serious project I do with arduino.
Anyway could you please answer my question?

ARIS009:
could you just tell me were to hook up my 8 bit DAC and the command I need to use on my code?

Thank a lot for the time you hane invested in my problem.

If you mean MIDI to 1V/ octave CV you'd be amazed how many people have already done such projects with Arduinos. If you were to Google "Arduino MIDI to CV" you'd find all sorts of useful information.

BTW an 8 bit DAC isn't nearly good enough if you expect to get musical notes out of the synth. You might get away with 12 bits but really 16 bits is more like it.

Steve

Yes agreed, and you would be much better off using an SPI interfaced D/A rather than trying to interface a parallel one.
Note that CV is not implemented in a very standard way, but one volt per octave is perhaps the most popular, so you normally need greater than 5V for this. For the different standards see CV/gate - Wikipedia

Guys, please I am not asking for another solution on my project.I simply want to know how can I wirw an 8 bit DAC on an arduino leonardo pro micro.

Does anyone know this???

There are many different DACs with all sorts of different connection schemes. Are you using any particular one?

Steve

This might help you with a parallel connection

Here is a pic that shows what I am going for.
The pic shows an arduino uno.I simply want to know the pins that would make this setup work with a leonardo pro micro.

*Sorry for the bad quality of the pic.

Use the same pins and the library I posted.
That circuit is called an R2R ladder and for 8 bits you need better than 0.5% tolerance resistors for it to work properly.