Introduction of Microcontroller History of Microcontroller Microcontrollers Versus Microprocessors Constructions of Microcontroller Microcontroller Applications

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Introduction of Microcontroller

History of microcontroller
Microcontrollers versus Microprocessors
Constructions of Microcontroller
Microcontroller Applications
Microcontroller

2.1: Introduction of Microcontroller

Circumstances that find the users in today in the field of microcontrollers had their
beginnings in the development of technology of integrated circuits. This
development has made it possible to store hundreds of thousands of transistors into
one chip. That was a prerequisite for production of microprocessors, and the first
computers were made by adding external peripherals such as memory, input-output
lines, timers and other. Further increasing of the volume of the package resulted in
creation of integrated circuits. These integrated circuits contained both processor
and peripherals. That is how the first chip containing a microcomputer, or what
would later be known as a microcontroller came about .

Basically a microcontroller is a computing device, and is a single integrated circuit


(“silicon chip” or IC) used to form part of a product that incorporates some
software program control. As a microcontroller is basically part of a computing
system it can be used in applications requiring control, operator and user display
generation, simple sequencing and many other mundane tasks .

In the past the implementation of the control functions made available by


microcontroller would have involved the use of sizeable computers, but the
continued trend towards minimization of size and low cost has meant that
microcontroller have achieved very low unit costs and low implementation costs.
As such the microcontroller is a very flexible electronic ‘tool’ to be applied in a
very wide range of product and process application.

Microcontrollers offer a low cost computing solution. Alternative computing


solutions come in many forms, including personal computers and programmable
logic controllers.

6
Microcontroller
Personal computers (PCs) are used to process high levels of data at high speed, and
incorporate microprocessor devices. These devices can be considered a ‘cousin’ of
the microcontroller devices, but are optimized to manipulating high volumes of
data and to provide the facilities for several tasks or windows to operate at any one
time.

Defining a microcontroller device is not simple, but in general a microcontroller


unit may be considered as a computing device offering internal memory and a high
of input and output (I/O) device option. Ideally the use of a microcontroller device
minimizes the number of external devices used in the system, and integrates as
much of the external interfacing to switches, motors or other input / output devices
as is practically possible. This high level of integration means that the unit has low
cost, small size and flexibility[1] .

2.2: History

2.2.1: The First Microcontroller


In 1971, the first microcontroller was invented by two engineers at Texas
Instruments, according to the Smithsonian Institution. Gary Boone and Michael
Cochran created the TMS 1000, which was a 4-bit microcontroller with built-in
ROM and RAM. The microcontroller was used internally at TI in its calculator
products from 1972 until 1974, and was refined over the years. In 1974, TI offered
the TMS 1000 for sale to the electronics industry. The TMS 1000 was available in
various configurations of RAM and ROM sizes. As of 1983, about 100 million
TMS 1000 devices had been sold [2] .

7
Microcontroller

2.2.2: Intel Microcontrollers


In addition to producing the first microprocessor, Intel also developed many
important microcontrollers, two of which are the 8048 and 8051. Introduced in
1976, the 8048 was one of Intel's first microcontrollers and was used as the
processor in the IBM personal computer keyboard. It is estimated that over one
billion 8048 devices were sold. The 8051 followed in 1980 and became one of the
most popular microcontroller families. Variations of the 8051 architecture are still
being produced today, making the 8051 one of the most long-lived electronic
designs in history .

2.2.4: Modern Microcontrollers


In addition to general purpose devices, specialized microcontrollers are being
produced for areas such as automotive, lighting, communications and low-power
consumer devices. Microcontrollers have also become smaller and more powerful.
For example, in 2010, Atmel announced a flash microcontroller in a package
measuring 2 mm by 2 mm. These tiny microcontrollers are small enough and
cheap enough to be used in products such as toys and toothbrushes [3].

2.3 : MicroControllers versus Microprocessors

• Microprocessor is a single chip CPU, microcontroller contains, a CPU and much


of the remaining circuitry of a complete microcomputer system in a single chip.
• Microcontroller includes RAM, ROM, serial and parallel interface, timer,
interrupt schedule circuitry (in addition to CPU) in a single chip.
–RAM is smaller than that of even an ordinary microcomputer, but enough
for its applications.

8
Microcontroller
–Interrupt system is an important feature, as microcontrollers have to respond
to control oriented devices in real time. E.g., opening of microwave oven’s
door cause an interrupt to stop the operation. (Most microprocessors can also
implement powerful interrupt schemes, but external components are usually
needed).
• Microprocessors are most commonly used as the CPU in microcomputer systems.
Microcontrollers are used in small, minimum component designs performing
control-oriented activities.
• Microprocessor instruction sets are _processing intensive_, implying powerful
addressing modes with instructions catering to large volumes of data. Their
instructions operate on nibbles, bytes, etc. Microcontrollers have instruction
sets catering to the control of inputs and outputs. Their instructions operate
also on a single bit. E.g., a motor may be turned ON and OFF by a 1-bit
output port

2.4: Constructions of Microcontroller

2.4.1:Memory unit

Memory is part of the microcontroller whose function is to store data. 


The easiest way to explain it is to describe it as one big closed with lots of drawers
If supposed that it is marked the drawers in such a way that they can not be
confused, any of their contents will then be easily accessible. It is enough to know
the designation of the drawer and so its contents will be known to the user for sure.

9
Microcontroller

Fig (2.1) Example of simplified model of a memory unit. For a specific input we get a
corresponding output .line R/W determines whether we are reading from or writing to memory.

Memory components are exactly like that. For a certain input get the contents of a
certain addressed memory location and that's all. Two new concepts are brought to:
addressing and memory location. Memory consists of all memory locations, and
addressing is nothing but selecting one of them. This means that we need to select
the desired memory location on one hand, and on the other hand need to wait for
the contents of that location. Beside reading from a memory location, memory
must also provide for writing onto it. This is done by supplying an additional line
called control line. So will designate this line as R/W (read/write).

Program memory: has been realized in FLASH technology which makes it


possible to program a microcontroller many times before it's installed into a device,
and even after its installment if eventual changes in program or process parameters

10
Microcontroller
should occur. The size of program memory is 1024 locations with 14 bits width
where locations zero and four are reserved for reset and interrupt vector.

2.4.2: Central Processing Unit

Let add 3 more memory locations to a specific block that will have a built in
capability to multiply, divide, subtract, and move its contents from one memory
location onto another. The part which have been just added in is called "central
processing unit" (CPU). Its memory locations are called registers.

Fig (2.2) Example of simplified central processing unit with three registers.

Registers are therefore memory locations whose role is to help with performing
various mathematical operations or any other operations with data wherever data
can be found. Look at the current situation. There are two independent entities
(memory and CPU) which are interconnected, and thus any exchange of data is
hindered, as well as its functionality. If, for example, adding the contents of two
memory locations and return the result again back to memory, that means need a
connection between memory and CPU. Simply stated, must have some "way"
through data goes from one block to another .

11
Microcontroller

2.4.3: Bus

That "way" is called "bus". Physically, it represents a group of 8, 16, or more


wires. There are two types of buses: address and data bus. The first one consists of
as many lines as the amount of memory wish to be address, and the other one is as
wide as data, in our case 8 bits or the connection line. First one serves to transmit
address from CPU memory, and the second to connect all blocks inside the
microcontroller .

Fig (2-3) Connecting memory and central unit using busses in order to gain on functionality

As far as functionality, the situation has improved, but a new problem has also
appeared: we have a unit that's capable of working by itself, but which does not
have any contact with the outside world, or with us! In order to remove this
deficiency, let's add a block which contains several memory locations whose one
end is connected to the data bus, and the other has connection with the output lines
on the microcontroller which can be seen  as pins on the electronic component.

12
Microcontroller

2.4.4: Input-output unit

Those locations are called "ports". There are several types of ports : input, output
or bidirectional ports. When working with ports, first of all it is necessary to
choose which port That to be need to work with, and then to send data to, or take it
from the port.

Fig (2-4) Example of simplified input-output unit that provides communication with external
world.

When working with it the port acts like a memory location. Something is simply
being written into or read from it, and it could be noticed on the pins of the
microcontroller.

Ports: Port refers to a group of pins on a microcontroller which can be accessed


simultaneously, or on which we can set the desired combination of zeros and ones, or read
from them an existing status. Physically, port is a register inside a microcontroller which
is connected by wires to the pins of a microcontroller.

PORTB/ has 8 pins joined to it. The appropriate register for direction of data is
TRISB at address 86h. Setting a bit in TRISB register defines the corresponding port
pin as an input pin, and resetting a bit in TRISB register defines the corresponding port
13
Microcontroller
pin as the output pin.

PORTA/ has 5 pins joined to it. The corresponding register for data direction is
TRISA at address 85h. Like with port B, setting a bit in TRISA register defines also
the corresponding port pin as an input pin, and clearing a bit in TRISA register defines
the corresponding port pin as an output pin.

2.4.5: Timer unit

Fig (2-5) Timer unit generates signals in regular time intervals.

Another parts need to be in Microcontroller a few additionally blocks. One of


those is the timer block which is significant to us because it can give user
information about time, duration, etc. The basic unit of the timer is a free-run
counter which is in fact a register whose numeric value increments by one in even
intervals, so that by taking its value during periods T1 and T2 and on the basis of
their difference we can determine how much time has elapsed. This is a very
important part of the microcontroller whose understanding requires most of our
time.

14
Microcontroller

2.4.6: Watchdog

One more thing is requiring our attention is a flawless functioning of the


microcontroller during its run-time. Suppose that as a result of some interference
(which often does occur in industry) our microcontroller stops executing the
program, or worse, it starts working incorrectly.

Fig(2-6)

Of course, when this happens with a computer, simple to reset it and it will keep
working. However, there is no reset button we can push on the microcontroller and
thus solve problem. To overcome this obstacle, just need to introduce one more
block called watchdog. This block is in fact another free-run  counter where our
program needs to write a zero in every time it executes correctly. In case that
program gets "stuck", zero will not be written in, and counter alone will reset the
microcontroller upon achieving its maximum value. This will result in executing
the program again, and correctly this time around.

2.4.7: Analog to Digital Converter

As the peripheral signals usually are substantially different from the ones that
microcontroller can understand (zero and one), they have to be converted into a
pattern which can be comprehended by a microcontroller. This task is performed

15
Microcontroller
by a block for analog to digital conversion or by an ADC. This block is responsible
for converting an information about some analog value to a binary number and for
follow it through to a CPU block so that CPU block can further process it [3].

Fig (2-7) Block for converting an analogue to a digital form.

Fig(2-8)Microcontroller outline with its basic elements and internal connections.

16
Microcontroller
For a real application, a microcontroller alone is not enough. Beside a
microcontroller, we need a program that would be executed, and a few more
elements which make up a interface logic towards the elements of regulation [1].

2.5 Microcontroller Applications

In addition to control applications such as the home monitoring system,


microcontrollers are frequently found in embedded applications. Among the many
uses that you can find one or more microcontrollers: automotive applications,
appliances (microwave oven, refrigerators, television and VCRs, stereos),
automobiles (engine control, diagnostics, climate control), environmental control
(greenhouse, factory, home), instrumentation, aerospace, and thousands of other
uses.
Microcontrollers are used extensively in robotics. In this application, many specific
tasks might be distributed among a large number of microcontrollers in onesystem.
Communications between each microcontroller and a central, more powerful
microcontroller (or microcomputer, or even large computer) would enable
information to be processed by the central computer, or to be passed around to
other microcontrollers in the system.
A special application that microcontrollers are well suited for is data logging. By
stick one of these chips out in the middle of a corn field or up in a balloon, one can
monitorand record environmental parameters (temperature, humidity, rain, etc).
Small size, low power consumption, and flexibility make these devices ideal for
unattended data monitoring and recording.

17

You might also like