Questions tagged [microcontroller]

A device which includes a central processing unit (CPU), memory, and (generally) an assortment of I/O peripherals (UART, ADC, DAC, general-purpose I/O, I2C, etc.) in a tightly-coupled standalone package.

Microcontrollers are software-controlled devices which provide a convenient way to perform complex tasks like data collection, reporting and control in a compact, tightly integrated package.

There are a few general differences between microcontrollers and microprocessors:

  • Microcontrollers generally use internal flash/ROM/RAM and lack external address and data buses. Microprocessors rely on external memory, and have limited internal memory (usually only cache).

  • Microcontrollers generally have a large variety of input/output peripherals built-in, like general-purpose I/O lines, analog-to-digital converters, dedicated UART hardware, etc. Microprocessors generally do not, since most of its I/O functionality is used for addressing external memory (or memory-mapped peripherals.)

  • Microcontrollers are generally optimized for very low power consumption, and have computational trade-offs because of this (many have no floating-point capabilities, no pipelining, etc.). Modern microprocessors perform faster than microcontrollers, and require much higher power budgets.

Major manufacturers of microcontrollers include Microchip, Atmel (acquired by Microchip in 2016), NXP, Texas Instruments and Cypress Semiconductor.

related tags:

9216 questions
206
votes
13 answers

What's the difference between a microcontroller and a microprocessor?

What's the difference between a microcontroller and a microprocessor?
endolith
  • 28,494
  • 23
  • 117
  • 181
183
votes
16 answers

Is C++ suitable for embedded systems?

A common question, here and elsewhere. Is C++ suitable for embedded systems? Microcontrollers? RTOSes? Toasters? Embedded PCs? Is OOP useful on microcontrollers? Does C++ remove the programmer too far from the hardware to be efficient? Should…
Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
108
votes
5 answers

Can microcontrollers be run at arbitrarily low clock frequencies?

The datasheet for the ATTiny13A, for instance, lists Min frequency of 0 MHz. Does this mean the clock can be run at any arbitrarily low frequency with no ill effects? I'm assuming it draws lower current at lower clock speeds? Does 0 MHz mean you…
endolith
  • 28,494
  • 23
  • 117
  • 181
95
votes
10 answers

Why are there no 256-bit or 512-bit microprocessors?

In an 8-bit microprocessor its data bus consists of 8 data lines. In a 16-bit microprocessor its data bus consists of 16 data lines and so on. Why is there neither a 256-bit microprocessor nor a 512-bit microprocessor? Why don't they simply…
Michael harris
  • 1,155
  • 2
  • 9
  • 8
91
votes
6 answers

What is the difference between a DSP and a standard microcontroller?

I understand that a DSP is optimized for digital signal processing, but I'm not sure how that impacts to the task of choosing an IC. Almost everything I do with a microcontroller involves the processing of digital signals! For example, let's…
Kevin Vermeer
  • 19,989
  • 8
  • 57
  • 102
87
votes
8 answers

When is a MOSFET more appropriate as a switch than a BJT?

In my experimentation, I've used only BJTs as switches (for turning on and off things like LEDs and such) for my MCU outputs. I've been repeatedly told, however, that N-channel enhancement-mode MOSFETs are a better choice for switches (see here and…
Mark
  • 4,650
  • 10
  • 48
  • 53
82
votes
11 answers

What's the cheapest way to link a few microcontrollers wirelessly at low speeds over short distances

What's the cheapest way to link a few microcontrollers wirelessly at low speeds over short distances. I'm looking to keep it ultra-cheap, use common discrete parts and keep it physically small. I don't care about bands and licensing so long as it…
Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
77
votes
3 answers

Push-pull/open drain; pull-up/pull-down

I am reading the datasheet of an ARM Cortex chip, specifically the GPIO chapter. Ultimately, I want to configure various GPIO pins to use them in "Alternate Function" mode for read/write access to SRAM. Of all the GPIO registers available, I do not…
Randomblue
  • 10,953
  • 29
  • 105
  • 178
69
votes
11 answers

How can anyone use a microcontroller which has only 384 bytes of program memory?

For instance a PIC10F200T Virtually any code you write will be larger than that, unless it is a single purpose chip. Is there any way to load more program memory from external storage or something? I'm just curious, I don't see how this could be…
coder543
  • 913
  • 6
  • 9
69
votes
8 answers

Why aren't FPGAs ubiquitous?

Reading about FPGAs, if I understand correctly, they are basically fully configurable logic gate circuits. Being this, one can design anything with them. One can design everything in the most customized way possible and hence, meet the same ends in…
Utku
  • 1,789
  • 2
  • 20
  • 29
65
votes
3 answers

What is a boot loader, and how would I develop one?

I've met many projects in which an AVR microcontroller uses with a bootloader (such as the Arduino), but I don't understand the concept very well. How can I make a bootloader (for any microcontroller)? After writing my bootloader, how it is…
mina_g
  • 1,355
  • 4
  • 18
  • 21
64
votes
5 answers

What exactly fries the chip when you invert power supply?

From my own experience, burning microcontrollers is quite easy. Put the 5V at ground, GND at VCC and in an instant your chip is burned. What exactly goes on internally that causes it to stop functioning entirely? For instance, if I were magically…
triplebig
  • 1,407
  • 1
  • 19
  • 25
60
votes
9 answers

RTOS for Embedded Systems

I have seen many articles that tell me I should be using RTOS for time management and resource management. My time has not permitted my own research, so I come to chiphacker for advice. I use low resource microcontrollers(MSP430, PIC) and was…
Kortuk
  • 13,362
  • 8
  • 60
  • 85
59
votes
5 answers

Can I cut an IC?

As far as I understand, the die of a DIP package is located at the center and the rest is just the lead frame. Given that I have unused pins, can I cut the top part of this microcontroller (ATmega16/32)? Will it still function afterwards? Edit:…
v.m.
  • 974
  • 1
  • 8
  • 15
57
votes
5 answers

When to use pull-down vs. pull-up resistors

After learning and experimenting with microcontrollers, I've understood the concept of pull-up- and pull-down resistors. I now understand when and how to use them, and how they work. I've mainly used pull-ups because I was taught to, but it has…
osvein
  • 725
  • 1
  • 8
  • 10
1
2 3
99 100