Microcontroller
From Wikipedia, the free encyclopedia
A microcontroller (or MCU) is a computer-on-a-chip used to control electronic devices. It is a type of microprocessor emphasizing self-sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). A typical microcontroller contains all the memory and interfaces needed for a simple application, whereas a general purpose microprocessor requires additional chips to provide these functions. A microcontroller is a single integrated circuit, commonly with the following features:
- central processing unit - ranging from small and simple 4-bit processors to sophisticated 32- or 64-bit processors
- input/output interfaces such as serial ports
- peripherals such as timers and watchdog circuits and signal conversion circuits.
- RAM for data storage
- ROM, EPROM, EEPROM or Flash memory for program storage
- clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit
This integration drastically reduces the number of chips and the amount of wiring and PCB space that would be needed to produce equivalent systems using separate chips and have proved to be highly popular in embedded systems since their introduction in the 1970's.
Microcontrollers take the largest share of sales in the wider microprocessor market. Over 50% are "simple" controllers, and another 20% are more specialized digital signal processors (DSPs) [citation needed]. A typical home in a developed country is likely to have only one or two general-purpose microprocessors but somewhere between one and two dozen microcontrollers. A typical mid range vehicle has as many as 50 or more microcontrollers. They can also be found in almost any electrical device: washing machines, microwave ovens, telephones etc.
Manufacturers have often produced special versions of their microcontrollers in order to help the hardware and software development of the target system. These have included EPROM versions that have a "window" on the top of the device through which program memory can be erased by ultra violet light, ready for reprogramming after a programming ("burn") and test cycle. Other versions may be available where the ROM is accessed as an external device rather than as internal memory. A simple EPROM programmer, rather than a more complex and expensive microcontroller programmer, may then be used, however there is a potential loss of functionality through pin outs being tied up with external memory addressing rather than for general input/output. These kind of devices usually carry a cost up in part prices but if the target production quantities are small, certainly in the case of a hobbyist, they can be the most economical option compared with the set up charges involved in mask programmed devices. A more rarely encountered development microcontroller is the "piggy back" version. This device has no internal ROM memory, instead pin outs on the top of the microcontroller form a socket into which a standard EPROM program memory device may be installed. The benefit of this approach is the release of microcontroller pins for input and output use rather than program memory. These kinds of device are normally expensive and are impractical for anything but the development phase of a project.
Contents |
[edit] Description
In addition to the key features listed above, most microcontrollers today take further advantage of not needing external pins for memory buses. They can afford to use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently.
Microcontrollers also usually have a variety of input/output interfaces. Serial I/O (UARTs) are very common, and many include analog-to-digital converters, timers, or specialized serial communications interfaces like I²C, Serial Peripheral Interface and Controller Area Network.
Originally, microcontrollers were only programmed in assembly language, or later in C code. Recent microcontrollers integrated with on-chip debug circuitry accessed by In-circuit emulator via JTAG enables a programmer to debug the software of an embedded system with a debugger.
Some microcontrollers have begun to include a built-in high-level programming language interpreter for greater ease of use. The Intel 8052 and Zilog Z8 were available with BASIC very early on, and BASIC is more recently used in the popular BASIC Stamp MCUs.
Microcontrollers trade speed and flexibility against ease of equipment design and low cost. Manufacturers have to balance the need to minimize the chip size against additional functionality.
Finally, it must be mentioned that microcontroller architectures are available from many different vendors in so many varieties that they could rightly belong to a category of their own. Chief among these are the 8051, Z80 and ARM derivatives.[citation needed]
[edit] Development platforms for hobbyists
For almost every bare microcontroller manufacturer, there are a dozen little companies repacking them into a more hobbyist friendly package. Their product is often an MCU preloaded with a BASIC or similar interpreter, soldered onto a Dual Inline Pin board along with a power regulator and other goodies. PICmicros seem to be very popular here, possibly due to good static protection. More powerful examples (e.g. faster execution, more RAM and code space) seem to be based on Atmel AVR or Hitachi chips and now ARM.
[edit] Arduino
Arduino is an open-source physical computing platform based on a simple i/o board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing, MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free. Arduino uses an Atmega-8 microcontroller from Atmel's Atmel_AVR series.
[edit] BASIC Stamp
BASIC Stamp by Parallax, is the 'big name' in BASIC microcontrollers. They are Microchip PIC micros programmed with an interpreter that processes the program stored in an external EEPROM. Several different modules are available of varying processing speeds, RAM, and EEPROM sizes. Most popular is the original BASIC Stamp 2 module. The BASIC Stamp is used by Parallax as a platform for introductory programming and robotic kits.
SX-Key, Parallax's development tool for the SX line of microcontrollers, supporting every SX chip commercially available. Using free SX-Key software (Assembly language), or the SX/B Compiler (BASIC-style language) from Parallax, the SX-Key programming tool can program SX chips in-system and perform in-circuit source-level debugging.
[edit] PICAXE
This PICAXE range of controllers from Revolution Education Limited<ref>Revolution Education Limited</ref> are based upon Microchip PICmicro's programmed with a BASIC interpreter. Using internal EEPROM or Flash to store the user's program they deliver a single-chip solution and are quite inexpensive. A PICAXE programmer is simply a serial plug plus two resistors. Complete development software, comprehensive documentation and application notes are all available free of charge.
The BASIC-like programming language is almost identical to that used by Parallax's Basic Stamp 1 (BS1) but has been enhanced to support on-chip hardware and additional functionality. In common with the BS1 programming language, the PICAXE has support only for a limited number of variables, but allows access to internal RAM for storage which helps overcome that limitation.
The 5.0.X versions of the Visual IDE ( the Programming Editor ) introduced 'enhanced compilers' which support block-structured programming constructs plus conditional compilation and other directives.
Initially targeted at the UK educational sector, use of the PICAXE has spread to hobbyists, semi-professionals and it can also be found inside commercial products. With its user base in many countries, the PICAXE has steadily gained a good international reputation.
[edit] A-WIT Technologies, Inc.
A-WIT Technologies, Inc.<ref>A-WIT Technologies, Inc.</ref> has a microcontroller module named the C STAMP, along with support boards, kits, and software tools and infrastructure. The C STAMP is designed around a PIC microcontroller, and is programmed in a very user friendly subset of the standard C language called WC that is easy and powerful, because it relies on A-WIT's supplied software infrastructure. This microcontroller module is very affordable, and it has 48 pins, 35 KB of memory, and runs at 40 MHz. The C STAMP also has a vast array of accessories and components, which are supported by A-WIT's software interfaces that enables seamless connectivity. This, in turn, enhances the ease of complete system development.
[edit] Comfile Technology Inc.
Comfile Technology Inc.<ref>Comfile Technology Inc.</ref> produces a series of microcontrollers branded as CUBLOC and CuTOUCH, using the Atmel ATmega128 processor. They are very price competitive, being aimed at industrial applications, and include some nice features such as Ladder Logic in addition to BASIC, a huge 80Kbyte program memory, and hardware pulse width modulation. Their focus in on developing industrial controllers which are fast, easy-to-use, and versatile. Comfile Technology's CuTOUCH is a visual Touch-screen controller that can be programmed in BASIC and Ladder Logic. This product is the first of its kind in the world yet.
[edit] Coridium ARMexpress
ARMexpress<ref>ARMexpress</ref> is the first of a new family of DIP-24 (stamp-sized) controllers that combine a 60 MHz ARM CPU with a builtin BASIC compiler to achieve new levels of performance in this form factor. This combination makes this simple to use but very fast controller a good choice for the prototype builder or system integrator. 40K of code and 40K of data are available to the user, and code speed rivals that of programs written in C. The dialect of BASIC conforms more to Visual BASIC, but has hardware extensions like PBASIC.
[edit] ZX-24, ZX-40, ZX-44
The ZX series<ref>Official ZBasic and ZX website</ref> MCUs are based on the Atmel ATmega32 and ATmega644 processors. The devices run a field-upgradable Virtual Machine that features built-in multi-tasking, 32-bit floating point math and 1.5K to 3.5K of RAM for user's programs. Multi-tasking facilitates a more structured approach to coding for interface devices that require prompt service, e.g. serial devices, infrared remotes, etc.
The programming language for the ZX series is ZBasic, a modern dialect of Basic modeled after Microsoft's Visual Basic. The biggest improvement over the typical MCU Basic dialect is the availability of parameterized subroutines/functions that support local variables. Strong type checking is another improvement that aids in writing correct programs more quickly. User-defined types (structures) are also supported along with aliases, based variables, sub-byte data types (Bit and Nibble) and other advanced capabilities.
[edit] Notes
<references/>
[edit] See also
- Embedded systems
- Embedded computer
- In-circuit emulator (ICE)
- List of common microcontrollers
- Microbotics
- Contiki – A small-footprint open source, yet fully featured, operating system developed for use on a number of smallish to large industrial systems ranging from 8-bit computers to embedded microcontrollers.
[edit] External links
[edit] Microcontroller Industry Information and News
- Microcontroller.com – Industry Website. Lists microcontroller manufacturers, types, speeds, comparisons.
- Embedded.com – Embedded Systems Programming Magazine
[edit] Tutorials
- A-WIT's C STAMP Program Development 101
- Introduction to the MAXQ Architecture
- Microcontroller Tutorials Resource
- Microcontrollers for Robotics, an Introduction
- PIC Microcontroller Programming
- Understanding DC Electrical Characteristics of Microcontrollers
[edit] Projects
- AVRGuide Atmel microcontroller project collection
- PicGuide MCU Projects database and resource page
- SatSleuth Microcontroller projects with code and circuit schematics
- K9spud.com – Microcontroller electronics projects and kits
- Free Microchip PIC resources and projects with descriptions, schematics and source code
[edit] Others
- FreeRTOS – An open source RTOS with projects for many microcontrollers
- DeviceTools.com Tools and silicon for embedded device developers
- Technical information on microcontrollersaf:Mikrobeheerder
ca:Microcontrolador da:Mikrocontroller de:Mikrocontroller es:Microcontrolador fr:Microcontrôleur gl:Microcontrolador id:Mikrokontroler is:Örtölva it:Microcontrollore hu:Mikrokontroller ms:Mikropengawal nl:Microcontroller ja:マイクロコントローラ no:Mikrokontroller nn:Mikrokontroller pl:Mikrokontroler pt:Microcontrolador ru:Микроконтроллер sk:Mikrokontrolér sl:Mikrokontroler fi:Mikrokontrolleri sv:Mikrokontroller vi:Vi điều khiển tr:Mikrodenetleyici uk:Мікроконтролер zh:单片机

