hwRX-pin on UNO not working for midi reception

Hey eh, i loaded the standard MIDI.h dual-merger onto my UNO, I have a standard midi-shield setup on my breadboard using a 6N136 with a 10K pullup on pin 6 for the input, and a 7404 with 2x 220R on the output. Anyway this is a tested schematic, the hardware midi-thru works ! Not only that, software midi-thru works, but only if use the swSerial RX-pin. Both TX-outputs work, but the hardwareSerial input is not working ?! I am truly puzzled. Not only does it not work, but connecting stops hardware midi-thru from working as if there is some form of interference. Is there something about that UART that i need to know (and don't) ? Or is possibly just broken ? but then why do al other uses of that pin still work as expected ?
The sketch (for completions sake)

#include <MIDI.h>

#include <SoftwareSerial.h>
SoftwareSerial softSerial(2, 3);
MIDI_CREATE_INSTANCE(HardwareSerial, Serial,     midiA);
MIDI_CREATE_INSTANCE(SoftwareSerial, softSerial, midiB);


void setup()
{
  // Initiate MIDI communications, listen to all channels
  midiA.begin(MIDI_CHANNEL_OMNI);
  midiB.begin(MIDI_CHANNEL_OMNI);
}

void loop()
{
  if (midiA.read())
  {
    // Thru on A has already pushed the input message to out A.
    // Forward the message to out B as well.
    midiB.send(midiA.getType(),
               midiA.getData1(),
               midiA.getData2(),
               midiA.getChannel());
  }

  if (midiB.read())
  {
    // Thru on B has already pushed the input message to out B.
    // Forward the message to out A as well.
    midiA.send(midiB.getType(),
               midiB.getData1(),
               midiB.getData2(),
               midiB.getChannel());
  }
}

and the schematic (as said i am using a 6N136)


I am not sure if i had this issue before with my UNO, normally i would grab a pro-mini, but i didn't have one with header pins already soldered on, and normally i use the UNO to upload to other boards, for which it works just fine.

Check out the schematic of the UNO here;

The hardware UART RX (D0) pin is connected to the TX output of the ATMEGA16U2 USB to serial device.

Yes of course, but why should that inhibit my rx reception ? the 16u2 is not connected to USB, are you saying that hwRX doesn't and should work on an UNO other than USB serial ?

btw, just turned the soldering iron on and soldered the header pins onto a pro-mini, and that one does work as expected.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.