Microcontroller

From Wikipedia for FEVERv2
Jump to navigation Jump to search

A microcontroller (MCU for microcontroller unit) is a small computer on a single metal-oxide-semiconductor (MOS) integrated circuit (IC) chip. Microcontroller_sentence_0

A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Microcontroller_sentence_1

Program memory in the form of ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontroller_sentence_2

Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips. Microcontroller_sentence_3

In modern terminology, a microcontroller is similar to, but less sophisticated than, a system on a chip (SoC). Microcontroller_sentence_4

SoC may include a microcontroller as one of its components, but usually integrates it with advanced peripherals like graphics processing unit (GPU), Wi-Fi module, or one or more coprocessors. Microcontroller_sentence_5

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. Microcontroller_sentence_6

By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Microcontroller_sentence_7

Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. Microcontroller_sentence_8

In the context of the internet of things, microcontrollers are an economical and popular means of data collection, sensing and actuating the physical world as edge devices. Microcontroller_sentence_9

Some microcontrollers may use four-bit words and operate at frequencies as low as 4 kHz for low power consumption (single-digit milliwatts or microwatts). Microcontroller_sentence_10

They generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications. Microcontroller_sentence_11

Other microcontrollers may serve performance-critical roles, where they may need to act more like a digital signal processor (DSP), with higher clock speeds and power consumption. Microcontroller_sentence_12

History Microcontroller_section_0

Background Microcontroller_section_1

Further information: MOS integrated circuit and Microprocessor chronology Microcontroller_sentence_13

The origins of both the microprocessor and the microcontroller can be traced back to the invention of the MOSFET (metal-oxide-semiconductor field-effect transistor), also known as the MOS transistor. Microcontroller_sentence_14

It was invented by Mohamed M. Atalla and Dawon Kahng at Bell Labs in 1959, and first demonstrated in 1960. Microcontroller_sentence_15

The same year, Atalla proposed the concept of the MOS integrated circuit, which was an integrated circuit chip fabricated from MOSFETs. Microcontroller_sentence_16

By 1964, MOS chips had reached higher transistor density and lower manufacturing costs than bipolar chips. Microcontroller_sentence_17

MOS chips further increased in complexity at a rate predicted by Moore's law, leading to large-scale integration (LSI) with hundreds of transistors on a single MOS chip by the late 1960s. Microcontroller_sentence_18

The application of MOS LSI chips to computing was the basis for the first microprocessors, as engineers began recognizing that a complete computer processor could be contained on a single MOS LSI chip. Microcontroller_sentence_19

The first multi-chip microprocessors, the Four-Phase Systems AL1 in 1969 and the Garrett AiResearch MP944 in 1970, were developed with multiple MOS LSI chips. Microcontroller_sentence_20

The first single-chip microprocessor was the Intel 4004, released on a single MOS LSI chip in 1971. Microcontroller_sentence_21

It was developed by Federico Faggin, using his silicon-gate MOS technology, along with Intel engineers Marcian Hoff and Stan Mazor, and Busicom engineer Masatoshi Shima. Microcontroller_sentence_22

It was followed by the 4-bit Intel 4040, the 8-bit Intel 8008, and the 8-bit Intel 8080. Microcontroller_sentence_23

All of these processors required several external chips to implement a working system, including memory and peripheral interface chips. Microcontroller_sentence_24

As a result, the total system cost was several hundred (1970s US) dollars, making it impossible to economically computerize small appliances. Microcontroller_sentence_25

MOS Technology introduced sub-$100 microprocessors, the 6501 and 6502, with the chief aim of addressing this economic obstacle, but these microprocessors still required external support, memory, and peripheral chips which kept the total system cost in the hundreds of dollars. Microcontroller_sentence_26

Development Microcontroller_section_2

One book credits TI engineers Gary Boone and Michael Cochran with the successful creation of the first microcontroller in 1971. Microcontroller_sentence_27

The result of their work was the TMS 1000, which became commercially available in 1974. Microcontroller_sentence_28

It combined read-only memory, read/write memory, processor and clock on one chip and was targeted at embedded systems. Microcontroller_sentence_29

During the early-to-mid-1970s, Japanese electronics manufacturers began producing microcontrollers for automobiles, including 4-bit MCUs for in-car entertainment, automatic wipers, electronic locks, and dashboard, and 8-bit MCUs for engine control. Microcontroller_sentence_30

Partly in response to the existence of the single-chip TMS 1000, Intel developed a computer system on a chip optimized for control applications, the Intel 8048, with commercial parts first shipping in 1977. Microcontroller_sentence_31

It combined RAM and ROM on the same chip with a microprocessor. Microcontroller_sentence_32

Among numerous applications, this chip would eventually find its way into over one billion PC keyboards. Microcontroller_sentence_33

At that time Intel's President, Luke J. Valenter, stated that the microcontroller was one of the most successful products in the company's history, and he expanded the microcontroller division's budget by over 25%. Microcontroller_sentence_34

Most microcontrollers at this time had concurrent variants. Microcontroller_sentence_35

One had EPROM program memory, with a transparent quartz window in the lid of the package to allow it to be erased by exposure to ultraviolet light. Microcontroller_sentence_36

These erasable chips were often used for prototyping. Microcontroller_sentence_37

The other variant was either a mask programmed ROM or a PROM variant which was only programmable once. Microcontroller_sentence_38

For the latter, sometimes the designation OTP was used, standing for "one-time programmable". Microcontroller_sentence_39

In an OTP microcontroller, the PROM was usually of identical type as the EPROM, but the chip package had no quartz window; because there was no way to expose the EPROM to ultraviolet light, it could not be erased. Microcontroller_sentence_40

Because the erasable versions required ceramic packages with quartz windows, they were significantly more expensive than the OTP versions, which could be made in lower-cost opaque plastic packages. Microcontroller_sentence_41

For the erasable variants, quartz was required, instead of less expensive glass, for its transparency to ultraviolet light—to which glass is largely opaque—but the main cost differentiator was the ceramic package itself. Microcontroller_sentence_42

In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning with the Microchip PIC16C84) to be electrically erased quickly without an expensive package as required for EPROM, allowing both rapid prototyping, and in-system programming. Microcontroller_sentence_43

(EEPROM technology had been available prior to this time, but the earlier EEPROM was more expensive and less durable, making it unsuitable for low-cost mass-produced microcontrollers.) Microcontroller_sentence_44

The same year, Atmel introduced the first microcontroller using Flash memory, a special type of EEPROM. Microcontroller_sentence_45

Other companies rapidly followed suit, with both memory types. Microcontroller_sentence_46

Nowadays microcontrollers are cheap and readily available for hobbyists, with large online communities around certain processors. Microcontroller_sentence_47

Volume and cost Microcontroller_section_3

In 2002, about 55% of all CPUs sold in the world were 8-bit microcontrollers and microprocessors. Microcontroller_sentence_48

Over two billion 8-bit microcontrollers were sold in 1997, and according to Semico, over four billion 8-bit microcontrollers were sold in 2006. Microcontroller_sentence_49

More recently, Semico has claimed the MCU market grew 36.5% in 2010 and 12% in 2011. Microcontroller_sentence_50

A typical home in a developed country is likely to have only four general-purpose microprocessors but around three dozen microcontrollers. Microcontroller_sentence_51

A typical mid-range automobile has about 30 microcontrollers. Microcontroller_sentence_52

They can also be found in many electrical devices such as washing machines, microwave ovens, and telephones. Microcontroller_sentence_53

Cost to manufacture can be under $0.10 per unit. Microcontroller_sentence_54

Cost has plummeted over time, with the cheapest 8-bit microcontrollers being available for under 0.03 USD in 2018, and some 32-bit microcontrollers around US$1 for similar quantities. Microcontroller_sentence_55

In 2012, following a global crisis—a worst ever annual sales decline and recovery and average sales price year-over-year plunging 17%—the biggest reduction since the 1980s—the average price for a microcontroller was US$0.88 ($0.69 for 4-/8-bit, $0.59 for 16-bit, $1.76 for 32-bit). Microcontroller_sentence_56

In 2012, worldwide sales of 8-bit microcontrollers were around $4 billion, while 4-bit microcontrollers also saw significant sales. Microcontroller_sentence_57

In 2015, 8-bit microcontrollers could be bought for $0.311 (1,000 units), 16-bit for $0.385 (1,000 units), and 32-bit for $0.378 (1,000 units, but at $0.35 for 5,000). Microcontroller_sentence_58

In 2018, 8-bit microcontrollers can be bought for $0.03, 16-bit for $0.393 (1,000 units, but at $0.563 for 100 or $0.349 for full reel of 2,000), and 32-bit for $0.503 (1,000 units, but at $0.466 for 5,000). Microcontroller_sentence_59

A lower-priced 32-bit microcontroller, in units of one, can be had for $0.891. Microcontroller_sentence_60

In 2018, the low-priced microcontrollers above from 2015 are all more expensive (with inflation calculated between 2018 and 2015 prices for those specific units) at: the 8-bit microcontroller can be bought for $0.319 (1,000 units) or 2.6% higher, the 16-bit one for $0.464 (1,000 units) or 21% higher, and the 32-bit one for $0.503 (1,000 units, but at $0.466 for 5,000) or 33% higher. Microcontroller_sentence_61

Smallest computer Microcontroller_section_4

On 21 June 2018, the "world's smallest computer" was announced by the University of Michigan. Microcontroller_sentence_62

The device is a "0.04mm3 16nW wireless and batteryless sensor system with integrated Cortex-M0+ processor and optical communication for cellular temperature measurement." Microcontroller_sentence_63

It "measures just 0.3 mm to a side—dwarfed by a grain of rice. Microcontroller_sentence_64

[...] In addition to the RAM and photovoltaics, the new computing devices have processors and wireless transmitters and receivers. Microcontroller_sentence_65

Because they are too small to have conventional radio antennae, they receive and transmit data with visible light. Microcontroller_sentence_66

A base station provides light for power and programming, and it receives the data." Microcontroller_sentence_67

The device is 1/10th the size of IBM's previously claimed world-record-sized computer from months back in March 2018, which is "smaller than a grain of salt", has a million transistors, costs less than $0.10 to manufacture, and, combined with blockchain technology, is intended for logistics and "crypto-anchors"—digital fingerprint applications. Microcontroller_sentence_68

Embedded design Microcontroller_section_5

A microcontroller can be considered a self-contained system with a processor, memory and peripherals and can be used as an embedded system. Microcontroller_sentence_69

The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. Microcontroller_sentence_70

While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Microcontroller_sentence_71

Typical input and output devices include switches, relays, solenoids, LED's, small or custom liquid-crystal displays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind. Microcontroller_sentence_72

Interrupts Microcontroller_section_6

Microcontrollers must provide real-time (predictable, though not necessarily fast) response to events in the embedded system they are controlling. Microcontroller_sentence_73

When certain events occur, an interrupt system can signal the processor to suspend processing the current instruction sequence and to begin an interrupt service routine (ISR, or "interrupt handler") which will perform any processing required based on the source of the interrupt, before returning to the original instruction sequence. Microcontroller_sentence_74

Possible interrupt sources are device dependent, and often include events such as an internal timer overflow, completing an analog to digital conversion, a logic level change on an input such as from a button being pressed, and data received on a communication link. Microcontroller_sentence_75

Where power consumption is important as in battery devices, interrupts may also wake a microcontroller from a low-power sleep state where the processor is halted until required to do something by a peripheral event. Microcontroller_sentence_76

Programs Microcontroller_section_7

Typically micro-controller programs must fit in the available on-chip memory, since it would be costly to provide a system with external, expandable memory. Microcontroller_sentence_77

Compilers and assemblers are used to convert both high-level and assembly language codes into a compact machine code for storage in the micro-controller's memory. Microcontroller_sentence_78

Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or it may be field-alterable flash or erasable read-only memory. Microcontroller_sentence_79

Manufacturers have often produced special versions of their micro-controllers in order to help the hardware and software development of the target system. Microcontroller_sentence_80

Originally these included EPROM versions that have a "window" on the top of the device through which program memory can be erased by ultraviolet light, ready for reprogramming after a programming ("burn") and test cycle. Microcontroller_sentence_81

Since 1998, EPROM versions are rare and have been replaced by EEPROM and flash, which are easier to use (can be erased electronically) and cheaper to manufacture. Microcontroller_sentence_82

Other versions may be available where the ROM is accessed as an external device rather than as internal memory, however these are becoming rare due to the widespread availability of cheap microcontroller programmers. Microcontroller_sentence_83

The use of field-programmable devices on a micro controller may allow field update of the firmware or permit late factory revisions to products that have been assembled but not yet shipped. Microcontroller_sentence_84

Programmable memory also reduces the lead time required for deployment of a new product. Microcontroller_sentence_85

Where hundreds of thousands of identical devices are required, using parts programmed at the time of manufacture can be economical. Microcontroller_sentence_86

These "mask programmed" parts have the program laid down in the same way as the logic of the chip, at the same time. Microcontroller_sentence_87

A customized micro-controller incorporates a block of digital logic that can be personalized for additional processing capability, peripherals and interfaces that are adapted to the requirements of the application. Microcontroller_sentence_88

One example is the AT91CAP from Atmel. Microcontroller_sentence_89

Other microcontroller features Microcontroller_section_8

Microcontrollers usually contain from several to dozens of general purpose input/output pins (GPIO). Microcontroller_sentence_90

GPIO pins are software configurable to either an input or an output state. Microcontroller_sentence_91

When GPIO pins are configured to an input state, they are often used to read sensors or external signals. Microcontroller_sentence_92

Configured to the output state, GPIO pins can drive external devices such as LEDs or motors, often indirectly, through external power electronics. Microcontroller_sentence_93

Many embedded systems need to read sensors that produce analog signals. Microcontroller_sentence_94

This is the purpose of the analog-to-digital converter (ADC). Microcontroller_sentence_95

Since processors are built to interpret and process digital data, i.e. 1s and 0s, they are not able to do anything with the analog signals that may be sent to it by a device. Microcontroller_sentence_96

So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. Microcontroller_sentence_97

A less common feature on some microcontrollers is a digital-to-analog converter (DAC) that allows the processor to output analog signals or voltage levels. Microcontroller_sentence_98

In addition to the converters, many embedded microprocessors include a variety of timers as well. Microcontroller_sentence_99

One of the most common types of timers is the programmable interval timer (PIT). Microcontroller_sentence_100

A PIT may either count down from some value to zero, or up to the capacity of the count register, overflowing to zero. Microcontroller_sentence_101

Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. Microcontroller_sentence_102

This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc. Microcontroller_sentence_103

A dedicated pulse-width modulation (PWM) block makes it possible for the CPU to control power converters, resistive loads, motors, etc., without using many CPU resources in tight timer loops. Microcontroller_sentence_104

A universal asynchronous receiver/transmitter (UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU. Microcontroller_sentence_105

Dedicated on-chip hardware also often includes capabilities to communicate with other devices (chips) in digital formats such as Inter-Integrated Circuit (I²C), Serial Peripheral Interface (SPI), Universal Serial Bus (USB), and Ethernet. Microcontroller_sentence_106

Higher integration Microcontroller_section_9

Micro-controllers may not implement an external address or data bus as they integrate RAM and non-volatile memory on the same chip as the CPU. Microcontroller_sentence_107

Using fewer pins, the chip can be placed in a much smaller, cheaper package. Microcontroller_sentence_108

Integrating the memory and other peripherals on a single chip and testing them as a unit increases the cost of that chip, but often results in decreased net cost of the embedded system as a whole. Microcontroller_sentence_109

Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of a CPU and external peripherals, having fewer chips typically allows a smaller and cheaper circuit board, and reduces the labor required to assemble and test the circuit board, in addition to tending to decrease the defect rate for the finished assembly. Microcontroller_sentence_110

A micro-controller is a single integrated circuit, commonly with the following features: Microcontroller_sentence_111

Microcontroller_unordered_list_0

This integration drastically reduces the number of chips and the amount of wiring and circuit board space that would be needed to produce equivalent systems using separate chips. Microcontroller_sentence_112

Furthermore, on low pin count devices in particular, each pin may interface to several internal peripherals, with the pin function selected by software. Microcontroller_sentence_113

This allows a part to be used in a wider variety of applications than if pins had dedicated functions. Microcontroller_sentence_114

Micro-controllers have proved to be highly popular in embedded systems since their introduction in the 1970s. Microcontroller_sentence_115

Some microcontrollers use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently. Microcontroller_sentence_116

Where a Harvard architecture is used, instruction words for the processor may be a different bit size than the length of internal memory and registers; for example: 12-bit instructions used with 8-bit data registers. Microcontroller_sentence_117

The decision of which peripheral to integrate is often difficult. Microcontroller_sentence_118

The microcontroller vendors often trade operating frequencies and system design flexibility against time-to-market requirements from their customers and overall lower system cost. Microcontroller_sentence_119

Manufacturers have to balance the need to minimize the chip size against additional functionality. Microcontroller_sentence_120

Microcontroller architectures vary widely. Microcontroller_sentence_121

Some designs include general-purpose microprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the package. Microcontroller_sentence_122

Other designs are purpose built for control applications. Microcontroller_sentence_123

A micro-controller instruction set usually has many instructions intended for bit manipulation (bit-wise operations) to make control programs more compact. Microcontroller_sentence_124

For example, a general purpose processor might require several instructions to test a bit in a register and branch if the bit is set, where a micro-controller could have a single instruction to provide that commonly required function. Microcontroller_sentence_125

Microcontrollers traditionally do not have a math coprocessor, so floating point arithmetic is performed by software. Microcontroller_sentence_126

However, some recent designs do include an FPU and DSP optimized features. Microcontroller_sentence_127

An example would be Microchip's PIC32 MIPS based line. Microcontroller_sentence_128

Programming environments Microcontroller_section_10

Microcontrollers were originally programmed only in assembly language, but various high-level programming languages, such as C, Python and JavaScript, are now also in common use to target microcontrollers and embedded systems. Microcontroller_sentence_129

Compilers for general purpose languages will typically have some restrictions as well as enhancements to better support the unique characteristics of microcontrollers. Microcontroller_sentence_130

Some microcontrollers have environments to aid developing certain types of applications. Microcontroller_sentence_131

Microcontroller vendors often make tools freely available to make it easier to adopt their hardware. Microcontroller_sentence_132

Microcontrollers with specialty hardware may require their own non-standard dialects of C, such as SDCC for the 8051, which prevent using standard tools (such as code libraries or static analysis tools) even for code unrelated to hardware features. Microcontroller_sentence_133

Interpreters may also contain nonstandard features, such as MicroPython, although a fork, CircuitPython, has looked to move hardware dependencies to libraries and have the language adhere to a more CPython standard. Microcontroller_sentence_134

Interpreter firmware is also available for some microcontrollers. Microcontroller_sentence_135

For example, BASIC on the early microcontrollers Intel 8052; BASIC and FORTH on the Zilog Z8 as well as some modern devices. Microcontroller_sentence_136

Typically these interpreters support interactive programming. Microcontroller_sentence_137

Simulators are available for some microcontrollers. Microcontroller_sentence_138

These allow a developer to analyze what the behavior of the microcontroller and their program should be if they were using the actual part. Microcontroller_sentence_139

A simulator will show the internal processor state and also that of the outputs, as well as allowing input signals to be generated. Microcontroller_sentence_140

While on the one hand most simulators will be limited from being unable to simulate much other hardware in a system, they can exercise conditions that may otherwise be hard to reproduce at will in the physical implementation, and can be the quickest way to debug and analyze problems. Microcontroller_sentence_141

Recent microcontrollers are often integrated with on-chip debug circuitry that when accessed by an in-circuit emulator (ICE) via JTAG, allow debugging of the firmware with a debugger. Microcontroller_sentence_142

A real-time ICE may allow viewing and/or manipulating of internal states while running. Microcontroller_sentence_143

A tracing ICE can record executed program and MCU states before/after a trigger point. Microcontroller_sentence_144

Types Microcontroller_section_11

See also: List of common microcontrollers Microcontroller_sentence_145

As of 2008, there are several dozen microcontroller architectures and vendors including: Microcontroller_sentence_146

Microcontroller_unordered_list_1

Many others exist, some of which are used in very narrow range of applications or are more like applications processors than microcontrollers. Microcontroller_sentence_147

The microcontroller market is extremely fragmented, with numerous vendors, technologies, and markets. Microcontroller_sentence_148

Note that many vendors sell or have sold multiple architectures. Microcontroller_sentence_149

Interrupt latency Microcontroller_section_12

In contrast to general-purpose computers, microcontrollers used in embedded systems often seek to optimize interrupt latency over instruction throughput. Microcontroller_sentence_150

Issues include both reducing the latency, and making it be more predictable (to support real-time control). Microcontroller_sentence_151

When an electronic device causes an interrupt, during the context switch the intermediate results (registers) have to be saved before the software responsible for handling the interrupt can run. Microcontroller_sentence_152

They must also be restored after that interrupt handler is finished. Microcontroller_sentence_153

If there are more processor registers, this saving and restoring process may take more time, increasing the latency. Microcontroller_sentence_154

(If an ISR does not require the use of some registers, it may simply leave them alone rather than saving and restoring them, so in that case those registers are not involved with the latency.) Microcontroller_sentence_155

Ways to reduce such context/restore latency include having relatively few registers in their central processing units (undesirable because it slows down most non-interrupt processing substantially), or at least having the hardware not save them all (this fails if the software then needs to compensate by saving the rest "manually"). Microcontroller_sentence_156

Another technique involves spending silicon gates on "shadow registers": One or more duplicate registers used only by the interrupt software, perhaps supporting a dedicated stack. Microcontroller_sentence_157

Other factors affecting interrupt latency include: Microcontroller_sentence_158

Microcontroller_unordered_list_2

  • Cycles needed to complete current CPU activities. To minimize those costs, microcontrollers tend to have short pipelines (often three instructions or less), small write buffers, and ensure that longer instructions are continuable or restartable. RISC design principles ensure that most instructions take the same number of cycles, helping avoid the need for most such continuation/restart logic.Microcontroller_item_2_30
  • The length of any critical section that needs to be interrupted. Entry to a critical section restricts concurrent data structure access. When a data structure must be accessed by an interrupt handler, the critical section must block that interrupt. Accordingly, interrupt latency is increased by however long that interrupt is blocked. When there are hard external constraints on system latency, developers often need tools to measure interrupt latencies and track down which critical sections cause slowdowns.Microcontroller_item_2_31
    • One common technique just blocks all interrupts for the duration of the critical section. This is easy to implement, but sometimes critical sections get uncomfortably long.Microcontroller_item_2_32
    • A more complex technique just blocks the interrupts that may trigger access to that data structure. This is often based on interrupt priorities, which tend to not correspond well to the relevant system data structures. Accordingly, this technique is used mostly in very constrained environments.Microcontroller_item_2_33
    • Processors may have hardware support for some critical sections. Examples include supporting atomic access to bits or bytes within a word, or other atomic access primitives like the LDREX/STREX exclusive access primitives introduced in the ARMv6 architecture.Microcontroller_item_2_34
  • Interrupt nesting. Some microcontrollers allow higher priority interrupts to interrupt lower priority ones. This allows software to manage latency by giving time-critical interrupts higher priority (and thus lower and more predictable latency) than less-critical ones.Microcontroller_item_2_35
  • Trigger rate. When interrupts occur back-to-back, microcontrollers may avoid an extra context save/restore cycle by a form of tail call optimization.Microcontroller_item_2_36

Lower end microcontrollers tend to support fewer interrupt latency controls than higher end ones. Microcontroller_sentence_159

Memory technology Microcontroller_section_13

Two different kinds of memory are commonly used with microcontrollers, a non-volatile memory for storing firmware and a read-write memory for temporary data. Microcontroller_sentence_160

Data Microcontroller_section_14

From the earliest microcontrollers to today, six-transistor SRAM is almost always used as the read/write working memory, with a few more transistors per bit used in the . Microcontroller_sentence_161

In addition to the SRAM, some microcontrollers also have internal EEPROM for data storage; and even ones that do not have any (or not enough) are often connected to external serial EEPROM chip (such as the BASIC Stamp) or external serial flash memory chip. Microcontroller_sentence_162

A few microcontrollers beginning in 2003 have "self-programmable" flash memory. Microcontroller_sentence_163

Firmware Microcontroller_section_15

The earliest microcontrollers used mask ROM to store firmware. Microcontroller_sentence_164

Later microcontrollers (such as the early versions of the Freescale 68HC11 and early PIC microcontrollers) had EPROM memory, which used a translucent window to allow erasure via UV light, while production versions had no such window, being OTP (one-time-programmable). Microcontroller_sentence_165

Firmware updates were equivalent to replacing the microcontroller itself, thus many products were not upgradeable. Microcontroller_sentence_166

Motorola MC68HC805 was the first microcontroller to use EEPROM to store the firmware. Microcontroller_sentence_167

EEPROM microcontrollers became more popular in 1993 when Microchip introduced PIC16C84 and Atmel introduced an 8051-core microcontroller that was first one to use NOR Flash memory to store the firmware. Microcontroller_sentence_168

Today's microcontrollers almost exclusively use flash memory, with a few models using FRAM, and some ultra-low-cost parts still use OTP or Mask-ROM. Microcontroller_sentence_169

See also Microcontroller_section_16

Microcontroller_unordered_list_3


Credits to the contents of this page go to the authors of the corresponding Wikipedia page: en.wikipedia.org/wiki/Microcontroller.