Certainly reading up on the MIDI protocol would help. Google is your friend. To boil it down to the simplest, hardware-wise you want a serial port and an opto-isolator for input, and a transistor and a couple of resistors for output. The serial port needs to run at 31250 baud, which most microcontrollers can do since they can generate pretty arbitrary baud rates (ie. they're not stuck to 1200/2400/4800/9600/19200 and so on, like PCs are).
From the software side, it's just strings of bytes. Most messages are three bytes long (Note On, note number, velocity for example). Patch change is two bytes, and some are a single byte. You've got to watch some of the single-byte Systems Realtime messages since they can occur in the middle of another message! So you might get Note Off, MIDI CLOCK, note number, velocity - and that won't work correctly! Your MIDI parser needs to at least ignore these, unless you're actually using MIDI clock.
See, if you used AVR microcontrollers then you could just rip off my MIDI code. And fix the bugs in it. Ahem.