FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Microcontroller

Microcontroller

Contents
Programming environments
Types
Interrupt latency
Memory technology
    Data
    Firmware
See also
References

Microcontroller
Component typeIntegrated circuit (IC)
Working principleDigital semiconductor logic and stored-program execution
InventorGary Boone and Michael Cochran
Invention year1971
First produced1974 (via the TMS 1000)
Pin names6 to 100+ typical (dependent on packaging)
The die from an Intel 8742, an 8-bit microcontroller that includes a CPU running at 2048 bytes of EPROM, and I/O in the same chip Two ATmega microcontrollers

A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more processor cores along with memory and programmable input/output peripherals. Program memory in the form of NOR flash, OTP ROM, or ferroelectric RAM is also often included on the chip, as well as a small amount of RAM. 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.

In modern terminology, a microcontroller is similar to, but less sophisticated than, a system on a chip (SoC). A SoC may include a microcontroller as one of its components but usually integrates it with advanced peripherals like a graphics processing unit (GPU), a Wi-Fi module, or one or more coprocessors.

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. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make digital control of more devices and processes practical. Mixed-signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. 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.

Some microcontrollers may use four-bit words and operate at frequencies as low as US$0.03 in 2018, and some 32-bit microcontrollers around US$0.69 for 4-/8-bit, US$4 billion, while 4-bit microcontrollers also saw significant sales.

In 2015, 8-bit microcontrollers could be bought for US$0.378 (1,000 units, but at US$0.393 (1,000 units, but at US$0.503 (1,000 units, but at US$0.464 (1,000 units) or 21% higher, and the 32-bit one for 0.3 mm to a side—dwarfed by a grain of rice. [...] In addition to the RAM and photovoltaics, the new computing devices have processors and wireless transmitters and receivers. Because they are too small to have conventional radio antennae, they receive and transmit data with visible light. A base station provides light for power and programming, and it receives the data." 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  – often an oscillator for a quartz timing crystal, resonator or RC circuit

  • many include analog-to-digital converters, some include digital-to-analog converters
  • in-circuit programming and in-circuit debugging support
  • 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. Furthermore, on low pin count devices in particular, each pin may interface to several internal peripherals, with the pin function selected by software. This allows a part to be used in a wider variety of applications than if pins had dedicated functions.

    Microcontrollers have proved to be highly popular in embedded systems since their introduction in the 1970s.

    Some microcontrollers use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently. 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.

    The decision of which peripheral to integrate is often difficult. The microcontroller vendors often trade operating frequencies and system design flexibility against time-to-market requirements from their customers and overall lower system cost. Manufacturers have to balance the need to minimize the chip size against additional functionality.

    Microcontroller architectures vary widely. Some designs include general-purpose microprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the package. Other designs are purpose-built for control applications. A microcontroller instruction set usually has many instructions intended for bit manipulation (bit-wise operations) to make control programs more compact. 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 microcontroller could have a single instruction to provide that commonly required function.

    Microcontrollers historically have not had math coprocessors, so floating-point arithmetic has been performed by software. However, some recent designs do include FPUs and DSP-optimized features. An example would be Microchip's PIC32 MIPS-based line.

    Programming environments

    edit

    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. Compilers for general-purpose languages will typically have some restrictions as well as enhancements to better support the unique characteristics of microcontrollers. Some microcontrollers have environments to aid developing certain types of applications. Microcontroller vendors often make tools freely available to make it easier to adopt their hardware.

    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. 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.

    Interpreter firmware is also available for some microcontrollers. For example, BASIC on the early microcontroller Intel 8052; BASIC and FORTH on the Zilog Z8 as well as some modern devices. Typically these interpreters support interactive programming.

    Simulators are available for some microcontrollers. These allow a developer to analyze what the behavior of the microcontroller and their program should be if they were using the actual part. A simulator will show the internal processor state and also that of the outputs, as well as allowing input signals to be generated. 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.

    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. A real-time ICE may allow viewing and/or manipulating of internal states while running. A tracing ICE can record executed program and MCU states before/after a trigger point.

    Types

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

    Sumup AIR1 E205: MAX32550 MikroTik RB260GS r2: STM32F107RBT6

    Many others exist, some of which are used in very narrow range of applications or are more like applications processors than microcontrollers. The microcontroller market is extremely fragmented, with numerous vendors, technologies, and markets. Note that many vendors sell or have sold multiple architectures.

    Interrupt latency

    edit

    In contrast to general-purpose computers, microcontrollers used in embedded systems often seek to optimize interrupt latency over instruction throughput. Issues include both reducing the latency, and making it be more predictable (to support real-time control).

    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. They must also be restored after that interrupt handler is finished. If there are more processor registers, this saving and restoring process may take more time, increasing the latency. (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.) 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"). 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.

    Other factors affecting interrupt latency include:

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

    Memory technology

    edit

    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.

    Data

    edit

    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 register file.

    In addition to the SRAM, some microcontrollers also have internal EEPROM and/or NVRAM for data storage; and ones that do not have any (such as the BASIC Stamp), or where the internal memory is insufficient, are often connected to an external EEPROM or flash memory chip.

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

    Firmware

    edit

    The earliest microcontrollers used mask ROM to store firmware. 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). Firmware updates were equivalent to replacing the microcontroller itself, thus many products were not upgradeable.

    Motorola MC68HC805 was the first microcontroller to use EEPROM to store the firmware. 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. Today's microcontrollers almost all use flash memory, with a few models using FRAM and some ultra-low-cost parts still using OTP or mask ROM.

    See also

    edit

    References

    edit
    Augarten, Stan (1983). "The Most Widely Used Computer on a Chip: The TMS 1000". State of the Art: A Photographic History of the Integrated Circuit. New Haven and New York: Ticknor & Fields. ISBN 978-0-89919-195-9. Archived from the original on 2010-02-17. Retrieved 2009-12-23.
  • ↑ "OKI Intel M85C154 Piggyback Microcontroller". industrialalchemy.org. Archived from the original on 2024-11-09. Retrieved 2024-12-08.
  • ↑ "Chip Hall of Fame: Microchip Technology PIC 16C84 Microcontroller". IEEE. 2017-06-30. Archived from the original on 2021-10-26. Retrieved September 16, 2018.
  • 1 2 Cantrell, Tom (1998). "Microchip on the March". Circuit Cellar. Archived from the original on 2007-09-27. Retrieved 2018-07-11.
  • ↑ "MCU Market on Migration Path to 32-bit and ARM-based Devices". April 25, 2013. Archived from the original on July 7, 2014. It typically takes a global economic recession to upset the diverse MCU marketplace, and that's exactly what occurred in 2009, when the microcontroller business suffered its worst-ever annual sales decline of 22% to $11.1 billion.
  • 1 2 "EFM8BB10F2G-A-QFN20 Silicon Labs | Mouser". Archived from the original on 2015-11-07. Retrieved 2018-07-11.
  • 1 2 "MSP430FR2000IPW16R Texas Instruments | Mouser". Archived from the original on 2023-10-02. Retrieved 2018-07-11.
  • ↑ ISBN 0123944244.
  • ↑ Jan Axelson (1994). "8052-Basic Microcontrollers". Archived from the original on 2014-02-09. Retrieved 2008-10-15.
  • ↑ MainArchitecturesWord length
    4-bit
    8-bit
    16-bit
    32-bit
    64-bit
    Interfaces
    Programming
    Debugging
    ListsSee also
  • Processor technologies
    Models
    Architecture
    Instruction set
    architectures
    Types
    Instruction
    sets
    Execution
    Instruction pipelining
    Hazards
    Out-of-order
    Speculative
    Parallelism
    Level
    Multithreading
    Flynn's taxonomy
    Processor
    performance
    Types
    By application
    Systems
    on chip
    Hardware
    accelerators
    Word size
    Core count
    Components
    Functional
    units
    Logic
    Registers
    Control unit
    Datapath
    Circuitry
    Power
    management
    Related
    Computer sizes and classes
    Micro
    Static
    Appliances
    Computers
    By use
    By size
    Mobile
    Laptop
    Tablet
    Handheld
    Calculator
    Wearable
    Midrange
    Large
    Others

    View original on Wikipedia | Back | FazBrowse Home