> > Thomas Brandon wrote > >2) Use external UARTs > > I am unsure of how this would work. How many UARTs can you "drive" off > >one PIC? How many I/Os do you need for an external UART? I gather an > >external UART can be used asynchronously by using the external interrupts > on > >PORTB. So, I guess you're limited to 4 UARTs on one PIC. > > Check out the MAX3100 from maxim, it has a serial interface to the PIC so it > won't chew too many pins. It's got an 8 byte input buffer (no output buffer > from memory). Because of the input buffering you can probably get away with > polling each chip separately. I'm back again. I rethought about using 12C508 8 pin PICS as smart UARTS. It's a good idea. See you can distribute the work of routing through the smart UARTS. First of only a two pin interface is required just like I2C. I thought through several senarios of doing interrupts using a two wire interface. None worked effectively. So like above, polling seems to be the ticket. Now to the routing. If you use a smart PIC as a UART it can also be a routing element. For example say UART1 channel0 is destined for UART4 channel10. With ordinary UARTs the MIDI data would come into the controller with channel0 intact and the controller would have the job of converting from channel 0 to channel10. However with a smart PIC/UART the controller could program the PIC/UART to do the conversion and thus would only have to receive the data and transmit it to UART4 without having to do the conversion. Distributed routing. > > >Another possible problem is that MIDI runs at 31250 baud so the UART must > >support this. > > Shouldn't be a problem. The MIDI Baud rate is designed to be easily > divisible from 1,2,4,8 MHz cpu clocks. Correct. It's exactly 1/16 of 500khz and so is a simple binary divide from any of the CPU clocks listed above. > > Good luck, I'm sure there is a lot of interest in this project. If you end > up documenting it on the web let me know and I'll add it to my PIC MIDI apps > page: > > http://www.audiomulch.com/midipic/ Thanks for the info. I hope we can put together something interesting. BAJ