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?
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.
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.
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.
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.
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
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.
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
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.
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.