> > I am new to PICs so please excuse any stupidity. No such thing here. Thi is a good project. It's on my task list of things to do. I also want to add storage. >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. Personally I vote for 3: Use PICs that do not have UARTS. Distribute the load by assigning only 1 software UART to each PIC. Use an 8 pin part like a 12C508. Use a clocked serial interface like I2C between the control PIC like a 16F84. To maintain good clocking you'll probably want to generate and distribute the 4 Mhz signal to the PIC/UARTS instead of using their internal oscillators. The good thing about this arrangement is that you can test with a single JW part then duplicate the PIC/UARTS with OTP parts. Thinking about it, I think that having an actual chip select may be useful to fight the addressing problem of multiple chips. Also a interrupt or a busy line may be helpful. So there'd be a 4 wire connection from the control PIC to each PIC/UART. Three lines CLOCK/DATA/INT are shared among all the PIC/UART and an individual CS line for each PIC/UART. So a 18 pin PIC could easily drive up to 8 PIC/UARTS. I just realized that I've used too many pins on the PIC12C508. Will have to rethink. BAJ