Information about Microcontroller

Enlarge picture
The integrated circuit from an Intel 8742, an 8-bit microcontroller that includes a CPU running at 12 MHz, 128 bytes of RAM, 2048 bytes of EPROM, and I/O in the same chip.


A microcontroller (or MCU) is a computer-on-a-chip. 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). In addition to all arithmetic and logic elements of a general purpose microprocessor, the microcontroller usually also integrates additional elements such as read-only and read-write memory, and input/output interfaces.

Microcontrollers are frequently used in automatically controlled products and devices, such as automobile engine control systems, office machines, appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes.

Embedded design

The majority of computer systems in use today are embedded in other machinery, such as telephones, clocks, appliances, and vehicles. An embedded system may have minimal requirements for memory and program length. Input and output devices may be discrete switches, relays, or solenoids. An embedded conroller may lack any human-readable interface devices at all. For example, embedded systems usually don't have keyboards, screens, disks, printers, or other recognizable I/O devices of a personal computer. Microcontrollers may control electric motors, relays or voltages, and may read switches, variable resistors or other electronic devices.

Higher Integration

In contrast to general-purpose CPUs, microcontrollers may not implement an external address or data bus, because they integrate RAM and non-volatile memory on the same chip as the CPU. Because they need fewer pins, the chip can be placed in a much smaller, cheaper package.

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. (Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of a CPU + 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).

A microcontroller is a single integrated circuit, commonly with the following features: 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. 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-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 that would provide that commonly-required function.

Large Volumes

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) . 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 automobile has as many as 50 or more microcontrollers. They can also be found in almost any electrical device: washing machines, microwave ovens, telephones etc.
Enlarge picture
A PIC 18F8720 microcontroller in an 80-pin TQFP package.


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 higher cost 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 devices are normally expensive and are impractical for anything but the development phase of a project or very small production quantities.

An economical option for intermediate levels of production (usually a few score to a few thousand parts) is a one-time programmable (OTP) microcontroller. This uses the same die as the UV EPROM version of the part, and is programmed on the same equipment, but the package does not include the expensive quartz window required to admit UV light on to the chip.

The use of field-programmable devices on a microcontroller may allow field update of the firmware or permit late factory revisions to products that have been assembled but not yet shipped. Programmable memory also reduces the lead time required for deployment of a new product.

Where a large number of systems will be made (say, several thousand), the cost of a mask-programmed memory is amortized over all products sold. A simpler integrated circuit process is used, and the contents of the read-only memory are set in the last step of chip manufacture instead of after assembly and test. However, mask-programmed parts cannot be updated in the field. If product firmware updates are still contemplated, a socket may be used to hold the controller which can then be replaced by a service technician, if required.

Programming Environments

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.

Some microcontrollers such as Analog Device's Blackfin processors can be programmed using LabVIEW, which is a high level programming language.

Interrupt Latency

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

When an electronic device causes an interrupt, the intermediate results, the registers, have to be saved before the software responsible for handling the interrupt can run, and then must be put back after it is finished. If there are more registers, this saving and restoring process takes more time, increasing the latency.

Low-latency CPUs generally have relatively few registers in their central processing units, or they have "shadow registers" that are only used by the interrupt software. The Z80 is a well known (and early) microprocessor with "shadow registers".

History

First microcontroller was Intel 8048 released in 1976.

Development platforms for hobbyists



For almost every manufacturer of bare microcontrollers, there are a dozen little companies repacking its products into more hobbyist-friendly packages. 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. 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.

Arduino

Arduino is an open-source physical computing platform based on a simple input/output 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 ATmega8 or ATmega168 microcontroller from Atmel's Atmel AVR series.

Platforms from Parallax, Inc.

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.

Propeller, A multi-core microcontroller developed by Parallax, Inc. It features eight 32bit cores and 32 I/O pins in the currently released version. Each core operates independently at 80Mhz, it is programmed in a language named SPIN(tm) which was developed by Parallax to support this unique micro.

PICAXE

This PICAXE range of controllers from Revolution Education Limited[1] 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.

A-WIT Technologies, Inc.

A-WIT Technologies, Inc.[2] 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 KiB 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.

Comfile Technology Inc.

Comfile Technology Inc.[3] 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 features such as Ladder Logic in addition to BASIC, a 80 kB program memory, and hardware pulse width modulation. Their focus is 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.

Coridium ARMexpress

ARMexpress[4] 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.

ZX-24, ZX-40, ZX-44

The ZX series[5] 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.

Errors of ATmega32
  • Interrupts abort TWI Power-down
  • TWI master does not Accept spikes on Bus Lines
  • TECR Write operations Ignored when immediately repeated
1-Interrupts abort TWI Power-down: TWIpoer-down operation may wake up by other interrupts.If an interrupt (e.g.,INTO) occurs during TWI poower-down address watch and wakes up the CPU,the TWI aborts operation and returns t its idle state. if the interrupt occurs in the middle of a power-down address match,the received address will be lost and the slave will not return an ACN. problm fix/workaround ensure that the TWI Address match is the only enabled interrupt when entering power-down. The master can handle this by resending the request if NACH is received.

2- TWI master does not Accept spikes on Bus Lines: When the part operates as Master, and the bus is idle(SDA=1;SCL=1),generating a short spike on SDA (SDA=0 for a short interval), no interrupt is generated, and the status code is still $F8(idle). But when the software initiates a new start condition and clears TWINT, nothing happens on SDA or SCL, and TWINT is never set again. problm fix/workaround Either of the following: 1)Ensur no spikes occur on SDA or SCL lines. 2)Generate a valid START condition followed by a STOP condition on the bus. This provokes a bus error reported as a TWI interrupt with status code $00. 3)In a single-master system, the user should write the TWSTO bit immediately befor writing the TWSTA bit.

3-TWCR Write operations Ignored when immediately repeated: repeated write to RWCR must be delayed. If a write operation to TWCR is immediately followed by another write operation to TWCR, the first write operation may be ignored. problm fix/workaround ensure at least one instruction (e.g.,INTO) is executed between two writes to TWCR

See also

Notes

External links

computer is a machine which manipulates data according to a list of instructions.

Computers take numerous physical forms. The first devices that resemble modern computers date to the mid-20th century (around 1940 - 1941), although the computer concept and various machines
..... Click the link for more information.
integrated circuit (also known as IC, microcircuit, microchip, silicon chip, or chip) is a miniaturized electronic circuit (consisting mainly of semiconductor devices, as well as passive components) that has been manufactured in the surface of a
..... Click the link for more information.
Microprocessor

Die of an Intel 80486DX2 microprocessor (actual size: 12×6.75 mm) in its packaging
Date Invented: Late 1960s/Early 1970s (see article for explanation)

Connects to:
..... Click the link for more information.
personal computer (PC) is a computer whose original sales price, size, and capabilities make it useful for individuals.

It is unknown who coined the phrase with the intent of a small affordable computing device but John W.
..... Click the link for more information.
ROM, Rom, or rom is an abbreviation and name that may refer to:

In Computers and Mathematics:
  • Read-only memory, a class of storage media used in computers and other electronic devices. This tells the computer how to load the operating system.

..... Click the link for more information.

Ram, ram, or RAM as a non-acronymic word

As a non-acronymic word Ram, ram, or RAM may refer to:

Animals

  • Sheep, an uncastrated male of which is called a ram
  • Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela

..... Click the link for more information.
An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions.[1] It is usually embedded as part of a complete device including hardware and mechanical parts.
..... Click the link for more information.
relay is an electrical switch that opens and closes under the control of another electrical circuit. In the original form, the switch is operated by an electromagnet to open or close one or many sets of contacts. It was invented by Joseph Henry in 1835.
..... Click the link for more information.
personal computer (PC) is a computer whose original sales price, size, and capabilities make it useful for individuals.

It is unknown who coined the phrase with the intent of a small affordable computing device but John W.
..... Click the link for more information.
integrated circuit (also known as IC, microcircuit, microchip, silicon chip, or chip) is a miniaturized electronic circuit (consisting mainly of semiconductor devices, as well as passive components) that has been manufactured in the surface of a
..... Click the link for more information.
central processing unit (CPU), or sometimes simply processor, is the component in a digital computer capable of executing a program.(Knott 1974) It interprets computer program instructions and processes data.
..... Click the link for more information.
BIT is an acronym for:
  • Bannari amman Institute of Technology
  • Bangalore Institute of Technology
  • Beijing Institute of Technology
  • Benzisothiazolinone
  • Bilateral Investment Treaty
  • Bhilai Institute of Technology - Durg

..... Click the link for more information.

..... Click the link for more information.
serial port is a serial communication physical interface through which information transfers in or out one bit at a time (contrast parallel port). Throughout most of the history of personal computers, data transfer through serial ports connected the computer to devices such as
..... Click the link for more information.
universal asynchronous receiver/transmitter (usually abbreviated UART and pronounced IPA: /ˈjuːɑrt/
..... Click the link for more information.
In telecommunications and computer science, serial communications is the process of sending data one bit at one time, sequentially, over a communications channel or computer bus. This is in contrast to parallel communications, where all the bits of each symbol are sent together.
..... Click the link for more information.
In telecommunications and computer networking, a network interface is one of:
  1. The point of interconnection between a user terminal and a private or public network.
  2. The network card on a computer (in casual usage).

..... Click the link for more information.
I²C is a multi-master serial computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard, embedded system, or cellphone. The name stands for Inter-Integrated Circuit and is pronounced I-squared-C and also, incorrectly,
..... Click the link for more information.
The Serial Peripheral Interface Bus or SPI (often pronounced "es-pē-ī" or "spy") bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode.
..... Click the link for more information.

..... Click the link for more information.
peripheral is a piece of computer hardware that is added to a host computer ,i.e any hardware except the computer, in order to expand its abilities. More specifically, the term is used to describe those devices that are optional in nature, as opposed to hardware that is either
..... Click the link for more information.
A timer is a specialized type of clock. A timer can be used to control the sequence of an event or process.

Timers can be mechanical, electromechanical, digital, or even software, since most computers include digital timers of one kind or another.
..... Click the link for more information.
watchdog timer is a computer hardware timing device that triggers a system reset if the main program, due to some fault condition, such as a hang, neglects to regularly service the watchdog (writing a “service pulse” to it, also referred to as “petting the
..... Click the link for more information.

Ram, ram, or RAM as a non-acronymic word

As a non-acronymic word Ram, ram, or RAM may refer to:

Animals

  • Sheep, an uncastrated male of which is called a ram
  • Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela

..... Click the link for more information.
The notion of read-only data can also refer to file system permissions.


Read-only memory (usually known by its acronym, ROM) is a class of storage media used in computers and other electronic devices.
..... Click the link for more information.
EPROM, or erasable programmable read-only memory, is a type of computer memory chip that retains its data when its power supply is switched off. In other words, it is non-volatile.
..... Click the link for more information.
Flash memory is non-volatile computer memory that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards, and USB flash drives (thumb drives, handy drive, memory stick, flash stick, jump drive) for general storage and transfer of data
..... Click the link for more information.
A computer program is one or more instructions that are intended for execution by a computer. Specifically, it is a symbol or combination of symbols forming an algorithm that may or may not terminate, and that algorithm is written in a programming language.
..... Click the link for more information.
clock generator is a circuit that produces a timing signal (known as a clock signal and behaves as such) for use in synchronizing a circuit's operation. It can range from a simple symmetrical square wave to more complex arrangements.
..... Click the link for more information.
A resistor-capacitor circuit (RC circuit), or RC filter or RC network, is an electric circuit composed of resistors and capacitors driven by a voltage or current source.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter