(Updated on 23/07/2011 with versions which improve handling of incoming MIDI messages)
(Updated on 21/04/2011 with versions which support switching to higher MIDI speeds to reduce latency when used in MegaDrum over USB only)
(Updated on 20/02/2011 with versions which support 2 MIDI interfaces. With 2 MIDI interfaces it is possible to use one to configure MegaDrum and another to be used by any MIDI software.)
First, this is an archive which includes firmware files for PIC18F2550/PIC18F2450(4/8/12/16/20MHz) and PIC18F14K50/PIC18F13K50:
PIC18F2450 is almost two times cheaper than PIC18F2550. It is pin compatible with PIC18F2550 so can be used as a direct replacement.
I've tested it and it works fine. I didn't try to program PIC18F2450 using ICSP cable but I think it can be programmed with it just as well.
Microchip also produce PIC18F14K50 and PIC18F13K50 which are more then two times cheaper than PIC18F2550. I've adapted the PIC18F2550 USB MIDI firmware for PIC18F14K50/PIC18F13K50. When tested they both work exactly like PIC18F2550/PIC18F2450.
This is the schematic:
This is the source code:
I should point out that the part of the source code written by me is provided under GPL license.
It is sad I had to mention it since there already has been an incident of publishing/using this code under
other names without acknowledgement of/reference to the original author.
I didn't try to program PIC18F14K50/PIC18F13K50 using ICSP cable but it should work provided WinPic (or any other programmer) supports it. Make sure that pins 18 and 19 are not connected to D+/D- of USB when you program PIC18F14K50/PIC18F13K50 since these pins are used for both programming and USB.