How about analogue or digital multiplexers controlled by a PIC? (Plus output buffers etc as required) Richard > -----Original Message----- > From: Thomas Brandon [mailto:tom@PSY.UNSW.EDU.AU] > Sent: Friday, June 04, 1999 12:54 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: 2-way MIDI > > > I am new to PICs so please excuse any stupidity. I would like > to design a > MIDI "router". It would have say for INs and OUTs and allow > you to route > messages between the various channels on the INs and OUTs > (e.g. route IN1 > Channel 3 to OUT1 Channel 4 and OUT2 Channel 5). I realise it > is a fairly > ambitious project to start with but I don't expect it to be > easy or fast. > > At the moment I'm trying to devise a way of supporting that > many MIDI ports > (i.e. 8). I can think of two possible methods: > 1) Use PICs such as the 16C74 that have USARTs. > One disadvantage of this is that no PIC has more than 2 > USARTs thus for > a 4x4 box I would need at least 4 PICs (probably 5, 1 to deal > with moving > messages between the other 4 PICs). Also, I'd need a fair few > JW parts for > prototyping and these don't come cheap (especially here in > Australia). In > this arrangement I guess I2C would be a good way of > communication between > PICs. > > 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. > > Another possible problem is that MIDI runs at 31250 baud so > the UART must > support this. I know the PIC USART can and I've heard SMC > UARTs support > 31250 out of the box( so to speak). I gather you can change > the crystal on a > UART to get other rates but is 31250 easy to do with > available crystals? BTW > the MIDI specs allow for a +/-1% on the speed so there a bit > of room in > which to use. > > In summary my basic questions are: > - Do either of these designs appear even slighly feasible? > - Is there a better design? > - Is interfacing a UART to a PIC > possible/difficult/processor intensive? > - Is it possible to do 31250 on all UARTs? (Easily?) > > Sorry for the large ammount of info but I'm not sure what > is/isn't relevant > yet. > > Thanks in advance, > Thomas Brandon. >