5
\$\begingroup\$

Being fairly new in the field of electronics, and being a computer scientist, it strikes me as a bit odd that almost every single microcontroller that I've come across thus far is fitted with:

  • Multiple timers, with multiple trigger modes
  • Multi-channel PWM
  • Multi-channel ADC
  • Multiple hardware supported communication protocols
  • Multiple external interrupt pins
  • EEPROM
  • Sometimes DAC and analog comparators

It seems, at least to me, a bit wasteful to jam all of this specialized (even through commonly used) equipment inside the microcontroller, if I'm only using 1/50 of it. Even if I wanted to, I'd only be able to use, say, 1/10th of it, as pins are often mapped to many of these features at once.

  • Why are they jammed up, i.e. what's the argument of not just using external chips or even just software implementations?
  • Are there any ATMega-like processing chips, i.e. chips with a lot of processing power instead of PWM, ADC etc.?
\$\endgroup\$
  • \$\begingroup\$ There are bare or nearly bare ARM core processors available, as well as dedicated DSP type processors. The reason that general purpose microcontrollers have the features they do is really because the market demands it. In general, the hardware to support those functions doesn't take up a lot of die area (with some exceptions) so it doesn't cost a lot to offer it. \$\endgroup\$ – John D Jan 6 '15 at 18:56
  • 8
    \$\begingroup\$ Why make more chips (ex.10) with only one feature, when you can integrate all into one and use it for your particular needs? \$\endgroup\$ – Triak Jan 6 '15 at 18:57
  • \$\begingroup\$ I've used all of those features you've listed in a single project. \$\endgroup\$ – whatsisname Jan 6 '15 at 21:59
15
\$\begingroup\$

Those peripherals are necessary for most real-world applications of microcontrollers, Not all of them, but leaving out any subset would decrease the market for the microcontroller. For example, the Scenix microcontroller family which was very fast but had very limited hard peripherals was a resounding market failure. That's really bad news for those of us charged with specifying microcontrollers- a complete redesign in order just to keep your products going (okay, maybe good news if you're brought in to replace the person who specified the oddball micro and subsequently paid to clean up someone the mess they left, but that's not great fun either). Much of the area on the chip is taken up by the memory and the bonding pad/drivers and the CPU so those little hardware peripherals are pretty minor.

If you need more processing power, leave the world of 8-bit micros behind and move to one of the 32-bit ARM cores which are generally used in microcontroller-like situations but have more of the chip area devoted to the processor and often to the memory. Or a DSP or FPGA can offer orders of magnitude more processing power, suitable for video processing, high end audio, high end instrumentation and data acquisition etc. As it is, the processing power of modern 8/16 bit micros is not all that bad, and often we 'waste' it by using a high-level language to gain other advantages (faster development and prototyping, use of commercially available libraries such as protocol stacks) rather than tediously hand-crafting bespoke code in assembly.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Bonus Question: Does any of the arm processors come in a DIP package? \$\endgroup\$ – Skeen Jan 6 '15 at 19:09
  • 1
    \$\begingroup\$ @Skeen DIP packages are going the way of the dinosaurs. \$\endgroup\$ – Matt Young Jan 6 '15 at 19:17
  • 2
    \$\begingroup\$ AFAIK the LPC1114 (Cortex-M0) and LPC810 (Cortex-M0+) are the only ARM chips in DIP. Microchip has a wide range of powerfull 32-bit chips in DIP, but these have the much less common MIPS core, not ARM/Cortex. \$\endgroup\$ – Wouter van Ooijen Jan 6 '15 at 19:38
  • 1
    \$\begingroup\$ Unless you can buy it at retail around the corner, I'll have a breakout or purpose-targeted pcb for that SMT package ready (using things I can buy around the corner) before you can get your hands on the part itself. Many can be bought already on eval boards anywaya, at small premium (sometimes nearly negative in comparison to the single quantity chip). \$\endgroup\$ – Chris Stratton Jan 6 '15 at 21:35
  • 1
    \$\begingroup\$ Pads have also been shrinking slower than transistors for quite a while, so the trend is toward being pad limited. Mask costs have also increased, increasing sales volume by broadening the market distributes this and other NRE. Incidentally, for a really tiny die the waste from sawing means that increasing die size may not proportionally increase cost. \$\endgroup\$ – Paul A. Clayton Jan 6 '15 at 21:46
9
\$\begingroup\$

I think there are two main reasons.

The first reason is that the cost to develop and prototype a microcontroller is huge -- so much so that low-end members of a product line are usually the same hardware as the high-end models, just with certain features disabled or not specified. Most of the time it's cheaper to make one chip that targets many markets instead of many chips that each target a small market.

The second reason is that microcontrollers are designed for control, not processing. Usually the thing you're controlling will have some analog sensing capability and some analog control mechanism. The sensors can connect to the ADCs or (if they have built-in electronics) they can communicate via SPI or I2C. The control mechanism could be driven by a DAC or a PWM. A popular paradigm in control systems, distributed control, involves many small control systems communicating with each other. That's where a longer-range protocol like CAN comes in handy. Finally, timers and external interrupts are useful for all kinds of stuff, and even general-purpose computers rely on them heavily.

External components would cost more, take up more board space, and be less convenient from a logistics standpoint. You would also have to worry about compatibility and reliability. System integration is not trivial. Emulating these functions in software (aka "bit-banging") is usually not feasible since it would require a much faster processor, especially if you want to use more than one function at once. That means more cost and more power consumption. Imagine trying to create a 1 MHz PWM function on a 50 MHz CPU, for instance. After the overhead from the timer interrupt and conditional branches, you'd be lucky to have more than a couple dozen cycles left over to do all the work!

If you want a chip that's more focused on processing power, try a DSP or an actual microprocessor.

| improve this answer | |
\$\endgroup\$
5
\$\begingroup\$

If you're running a program on the CPU you are already using 90% of the chip!

Counters and UART/SPIs and so on are relatively trivial pieces of hardware occupying very little chip area. ADCs and DACs maybe a bit more, PWMs are just counters, so you're paying noise-level prices for most of the peripherals.

At least, for their silicon. The pins they use are another matter - so pick the smallest pin count package that does your job.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

It maximizes available market share for a part while minimizing the development and support cost. Plus relatively speaking an I2C or a SPI block is pretty small area wise.

It's better for them to put their development team on a part that includes a bunch of features that can fit into all different applications, than to try and make tons of parts with very specific features sets.

While you're in the micro controller world you'll almost always see the process accompanied by some "jazz" that fits with where they think it should be in the market. Starting with 8bit MCUs and going up into the general purpose ARM processors.

Again though, the area that those peripheral functions take up is small compared to the area the processor core takes up (well maybe the ADC has some area to it). It's not like if you ripped out those sections then you really could make more powerful processors.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.