What is a microcontroller ?
Do you ever wonder how all the devices you use in everyday
life work?
A microcontroller is the answer.
Each of these systems will use a microcontroller as their main control
unit:
* Car lock remote key fob.
* TV Remote control.
* Security system.
* Electronic safe.
* Car anti lock braking system.
* Satelite decoder.
* DVD player.
* Toaster.
A microcontroller is an all in one electronic integrated circuit with
built in processor memory and peripherals that is also re-programmable.
You may not be able to recognize the microcontroller as for cost
savings its cheaper to build an ASIC (Application Specific Integrated
Circuit). This is a custom chip designed only for the product
which is mass produced in milliions making the cost of the device far
cheaper than using an individual microcontroller.
Nevertheless each system is based on a microcontroller.
Electronic Circuit design has progressed from individual transistors
which are based on silicon to placing thousands and then millions of
transistors on a single silicon wafer. The transistors,
arranged in the correct configuration, perform different functions such
as time delays, boolean logic, memory etc.
7400 series
logic
Still available today are the older 74 series devices. These
are ICs encased in plastic with connection pins on the outside and each
one performs a different well defined function.
By grouping these devices together you can make up circuits by
connecting the pins of the device to pins of other devices.
About 20 years ago this was the only way of making digital
electronic systems and you would typically have racks of circuit boards
each with 50 of these devices wired up.
More
transistors
Of course the disadvantage of these racks of
circuit boards is that once you have designed the board you can not
change it so you had to be absolutely sure that the design was perfect.
If it was not then you had to start over - and for a complex
system that means spending money on a new circuit board and spending
time re-designing it.
With the advance of manufacturing techniques more transistors can be
put on the silicon wafer - and if you can get more transistors on a
wafer there are two advantages.
1. Increased functionalty.
2. Higher speed.
Smaller transistors means smaller physical problems (capacitance slows
down a devcie - so a smaller device has less) and they
also use less current. Less current means less power
and less power means less heat and less heat means that the device can
operate faster.
Given enough transistors you can design a circuit (or Integrated
Circuit - ICs) to perform virtually any function you can think and
using a special form of transistor (flash memory) means that the device
can store information for years - this memory is also re-programmable.
Processor
The next stage in development was creating the processor which is a
specialised circuit in which the function of the device is not set at
all. Instead the device is capable of performing different functions
when it is given different inputs and not only that - it has a small
amount of ram inside used for internal temporary storage (registers) -
and this lets it remember a sequence of events.
When you combine this device with two types external memory (other ICs)
you can make a system that can follow a defined sequence of events. By
reading instructions from the memory (ROM) the processor knows what it
should be doing as its next event sequence and it can store data in
external RAM memory.
ROM - Read Only Memory (permament)
RAM - Random access memory (temporary - when power goes info is lost).
In addition the processor can read the state of input pins and set the
state of output pins so it can react to the outside world e.g. turn on
a light or read a key press.
You can see where this is going - it's a device that has
re-programmable memory and has many of the building blocks (7400
series) although now greatly refined and adapted inside the
device - it's the microcontroller.
Microcontrollers
A microcontroller is a specialized integrated circuit which combines a
processor and external memory inside the silicon wafer itself.
You now have a customizable device that you can
change its function just by re-programming it.
In addition as microcontrollers have been refiined you will find
devices that have many other peripherals inside them. Where
once you had to buy a UART IC (an RS232 communication device - to talk
to a PC) and place it on the processor bus in addition to the RAM and
the ROM; this device is now part of the microcontroller itself.
Here are the internal peripherals of the 16F88 a modern PIC
microcontroller - this is just an example there are many more
microcontroller manufacturers e.g. Atmel, Motorola, Zilog.
RAM 386 Bytes.
ROM 4096 words.
EEPROM 256 Bytes.
I/O 16 pins.
Internal oscillator.
Timer 1.
Timer 2.
Timer 3.
USART.
SSP - Synchronous Serial port I2C, SPI protocols.
CCP - Capture Compare PWM.
Analogue comparator 1.
Analogue comparator 2.
ADC multiplexed inputs from 7 pins.
This an 18 pin IC which is as big as some of the original 7400 devices
but it can do much more that those single chips. For instance
you can make the following types of projects using it:
Universal Infrared decoder/encoder.
Ultrasonic tape measure.
Frequency counter.
A metal detector.
Note: All of these projects can be made using the same device because
you can re-program the microcontroller to do a different job.
You can find more information
here microcontroller information.
Copyright © John Main
2006
Free to distribute if the article is kept complete.
http://www.best-microcontroller-projects.com
Jump
to Best Microcontroller Projects Home Page.
|