> Speaking further of expansion... What about this stuff of using > a single chip micro, then piling so many other chips around it that we > might as well have just used a standard microprocessor instead of a > microcontroller? It seems to me that microcontrollers are ideal for > small designs where the vast majority of the functionality is on the > controller. However, if we have to start using the chip in an "expanded > mode" where most of the I/O that we're paying for ends up being processor > bus, aren't there less expensive ways of getting processor bus? I agree that in many cases where a micro is used to run code out of external memory, a microprocessor would be just about as effective (esp. since many UART chips can be set up for periodic timer interrupts, provide some spare I/O, etc.) On the other hand, there can be a number of advantages to running code out of internal memory: [1] The code can be protected reasonably well from prying eyes. By contrast, it's not possible to protect the code in an external EPROM without rendering it useless. [2] If the CPU is running code from internal memory and only accessing the bus occasionally, the bus will radiate less than if the CPU were running code from it. In addition, glitches on the bus (or dropped screwdrivers) are less likely to cause errant behavior. [3] If there are any problems with a microprocessor's bus (e.g. shorted lines, open-circuits, etc..) the CPU itself will be running random code and will not be able to aid in any diagnostics. By contrast, a program in the CPU's internal memory may test external memory and indicate faults; it may also provide other troubleshooting aids (such as outputting a known continuous sequence of memory accesses). From my experience, this can be a great aid to trouble-shooting (since it's possible to simply look at different spots on the board to see if the proper waveforms appear). [4] Many systems may normally run code out of RAM or Flash, but need some way to get it there (or replace it if it gets corrupted). While boot-block flash is good for this, it's also possible to use a micro with a small bootstrap program in ROM. This may eliminate the need to have an external EPROM. There are probably more reasons, but those are a few to start with...