TK just mentioned something in another thread, and rather than take it off topic, I thought it might be worthy of a thread of it’s own…
Short answer: an even more powerful method is the use of the I2C protocol. In the last days I’ve worked out just another demonstrator, which shows, that this protocol is not only useful for accessing EEPROMs and LCDs from a MIOS core, but also to exchance data with other microcontrollers (see http://www.ucapps.de/mbhp/mbhp_iic_midi.pdf and http://www.ucapps.de/mbhp/mbhp_iic_midi_preview.jpg - this is a II<->MIDI bridge which allows to control multiple MIDI interfaces from a “master” core via I2C
I will write some documentation and especially programming examples to this project after my holidays. In the meantime you could work on the I2C slave routines for Atmel (for PIC I can provide a tested template) - MIOS already provides MIOS_IIC_* functions for I2C master accesses (an OS change is not required)
Another hint: Duggle has worked out a PIC based application for PS/2->MIDI some time ago, you could contact him in order to prevent double-effort. I think that a modification for PS/2<->I2C isn’t that difficult
Best Regards, Thorsten.
TK - I saw that image a while ago in a German post, and I have it on my list to ask what it was… now i know
That looks really great!!
I have been writing a document which I will put on the wiki soon, and I thought you might find this excerpt amusing:
Previously, I mentioned the PIC18F4620, and it’s additional memory allowing for these features to be implemented practically. I also mentioned that there is a EUSART fault (for those who haven’t heard, it’s got a bug and it causes problems with MIDI). If Microchip do not release a fixed silicon revision for this, I will implement a way to send MIDI out through the built-in I2C on PORTC pins of the PIC, to a second, older model PIC. This second PIC will then pass the incoming I2C data as MIDI out. I think that even a PIC16 could do this job, but I plan to use an 18F452. The extra power in the chip will be used to perform MIDI Effects such as transposition, delays, filtering, and LFO’s and Multi-Point Envelopes to sent MIDI CC’s, NRPN’s, SysEx, etc. The reason behind this is just because I feel that if I have to write the special code and possibly make minor modifications to circuitry to send MIDI over I2C, then I will capitalize on it and make the most of it… and the good news is, it will easily be converted to a standalone unit
Also, I have thought about using several MIDI over I2C slaves, to allow for multiple MIDI Outs, so you could run 32 or maybe more channels.
Looks like we were working on something similar
I notice you’ve used a much cheaper PIC for the slave, which is sensible for a MIDI interface with so many of them… it is a MIDI interface, isn’t it ![]()
I was thinking of MIDI over IIC as a workaround for that annoying 4620 EUSART bug, do you think this would be appropriate? I figured that with the greater speed and lower latency of IIC, there shouldn’t be a performance loss, but I could be wrong ![]()