[EE]: Microcontroller with 4 USARTs and 40 pins (an 18C can do it (maybe))
Bob Ammerman email (remove spam text)
Does the application require 4 _bi_directional UARTs? Or can some of your
MIDI ports be unidirectional (ie: how many MIDI ins and MIDI outs do you
need). Bit banging the transmit side is _much_ easier than the receive
side. You could set up an interrupt source at the bit rate (31250) and
easily have time to blast out the bits. I would suggest, perhaps, the 18C
series chips, running at a 10MHz crystal, with the PLL x4 to get 10MIPS.
This would give you 320 instructions per bit time, which is nearly
Unfortunately, to receive you need to run your interrupt handler somewhat
faster than the bit time. I have successfully built a software UART using a
interrupt 6x of the bit rate. I expect 5x would work pretty well.
So, you would have to take 1 interrupt every 64 instruction times. I'm
guessing about a 8 instruction time overhead in the interrupt handler (the
18C can be quite efficient at this) and perhaps 15 instructions per
interrupt per receiver. You could handle 5 transmitters by processing them
round-robin, one per interrupt (say another 10 instructions).
Thus, our interrupt budget would be about 8 (overhead) + 15*Number of
receivers + 10 instructions.
Assuming 2 receivers, this would take about 48 instructions, leaving you
with about 2.5 MIPS for 'task-level' code.
I really think this could be done on the 18C chips!
BTW: I have developed an 18C application that directly generates (no
hardware other than the PIC and 3 resistors) a full-screen animated NTSC
(monochrome) image -- this chip can really make things happen!
(high function, high performance, low-level software)
See also: www.piclist.com/techref/microchip/ios.htm?key=usart
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the