AKUNGBA AKOKO
SEMINAR REPORT
ON
MICROCONTROLLER
SUBMITTED TO
BY
LAWALAHMEDJOHN
MATRIC NO: 150409034
1
CERTIFICATION
This is to certify that this seminar report was carried out and submitted by LAWAL
AHMED JOHN with the matriculation number 150409034 Faculty of Science,
Department of Physics and Electronics, Adekunle Ajasin University, Akungba-Akoko,
Ondo State, Nigeria, Under my supervision.
…………………………………… ………………………………..
Supervisor Sign/Date
……………………………………… …………………………………
2
DEDICATION
This seminar report is dedicated to almighty GOD and to all my family at large.
3
ACKNOWLEDGMENT
Praise, Gratitude and Adoration to Almighty GOD the most beneficent and merciful who
by His grace and providence sustained my life to complete this seminar report
took time to read my various write-ups despite his tight schedule of duties as a lecturer. I
thank and appreciate him for his tolerance, pedantic advice and the optimistic degree of
inspiration and motivation. God will continue to increase him intellectually, honorably,
Lawal, for his guidance and constant supervision as well, provision in all ramifications I
wish you good health and long life and may you reap the fruit of your labour.
4
TABLE OF CONTENTS
CHAPTER ONE …………………………………………..………………………………….6
HISTORY OF MICROCONTROLLER ……………………..………………………………..6
INTRODUCTION ……………………………………………..……………………………….7
CHAPTER TWO………………………………………………..……………………………..8
MICROCONTROLLER…………………………………………...……………………….…...8
MICROCONTROLLER ARCHITECTURE………………………..…………………………….8-9
ADVANTAGES……………………………………………………………………………………..9
DISADVANTAGES…………………………………………………………………………………9
CLASSIFICATION OF MICROCONTROLLER…………..……………………………………..9-10
CHAPTER THREE……………………………………...……………………………………...11
TYPE OF MICROCONTROLLER………………………...…………………………………….11
MICROCONTROLLER 8051……………………………...…………………………………….11-12
RENESAS MICROCONTROLLER………………………...…………………………………...13-14
AVR MICROCONTROLLER……………………………………………………………………15-17
PIC MICROCONTROLLER……………………………………………………………………..18-22
APPLICATION OF MICROCONTROLLER……………….………………………………………23
CHAPTER FOUR……………………………………….…………………………………….....24
CONCLUSION………………………………………………………………………………………...24
REFERENCE………………………………………..…….…………………………………………..25
5
CHAPTER ONE
History of Microcontroller
In the world of computers and microelectronics, much fan fare goes to the microprocessor. But there’s
another important invention that deserves some glory of its own: the microcontroller. The
microcontroller is the computer chip that controls most of the complex electronic devices people use
every day, from washing machines and coffee makers to the air bags and anti-lock brakes in cars.
In 1970 and 1971, about the same time Intel was inventing its microprocessor, Gary Boone, an engineer
at Texas Instruments was working on a similar idea. At that time Texas Instruments was interested in
making pocket calculators and Boone designed a single integrated circuit chip that held nearly all of the
necessary circuits to make a calculator (except for the keypad and display). This extraordinary
breakthrough was given the rather humdrum name of the TMS1802NC, but there was nothing humdrum
about the device. Five thousand transistors provided 3000 bits of program memory, 128 bits of random
access memory, and could be programmed to perform different functions. While Texas Instruments
believed that most sales would initially go to makers of calculators, it saw far-reaching possibilities for
the new chip. With a little programming, it could be used to power electronic clocks, scales, and various
types of meters. Although the microprocessor could be the basis of a much more powerful computer, it
had to have a whole group of additional chips and circuits to make it work; at a minimum in needed
memory chips, to use it with a printer, color monitor, sound card, or disc drive required even more chips.
The microcontroller, on the other hand, was an independent device—a computer on a chip that
performed a more limited range of functions but needed only minimal help from other chips and
devices.
For that reason, the development of the microprocessor and microcontroller parted ways. Both were
successful, but in terms of sheer numbers it was the microcontroller that sold the most. Even in the late
1970s, when the personal computer was still just a gleam in the eyes of a few guys who spent a lot of
time in their garages and basements, sales of microcontrollers were rapidly accelerating. The low-cost of
the microcontroller and its all-in-one approach made it economical to develop what are now known as
“embedded” computer applications. Tiny computers could be built-in to nearly any kind of system or
machine to give it added features. Some of those applications included microwave ovens, where the
keypad, clock, and oven settings were monitored by a microcontroller, and gas pumps, where metering
of the gasoline and the starting of the pump were handled by the embedded computer system. Today,
microcontrollers are nearly everywhere—your home probably contains 20 or more. The latest
automobiles may contain over a dozen. By the early twenty-first century, the microcontroller was by far
the top-selling chip of any kind, with well over 4 billion sold per year.
6
INTRODUCTION TO MICROCONTROLLER
A microcontroller is an electronic device belonging to the microcomputer family. These are fabricated
using the VLSI technology on a single chip. There are microcontrollers available in the present market
with different word length starting from 4 bit, 8 bit, 64 bit to 128 bit. This chapter is about
microcontrollers, their architecture, and various features.
In a broader sense, the components which constitute a microcontroller are the memory, peripherals and
most crucially a processor. Microcontrollers are present in devices where the user has to exert a degree
of control. They are designed and implemented to execute a specific function such as displaying integers
or characters on an LCD display module of a home appliance. Application of microcontrollers is myriad.
In simpler terms, any gadget or equipment which has to deal with the functions such as measuring,
controlling, displaying and calculating the values consist of a microcontroller chip inside it. They are
present in almost all the present day home appliances, toys, traffic lights, office instruments and various
day-to-day appliances.
7
CHAPTER TWO
MICROCONTROLLER
A microcontroller is a small, low-cost and self contained computer-on-a-chip that can be used as an
embedded system. A few microcontrollers may utilize four-bit expressions and work at clock rate
frequencies, which usually include:
An 8 or 16 bit microprocessor.
A little measure of RAM.
Programmable ROM and flash memory.
Parallel and serial I/O.
Timers and signal generators.
Analog to Digital and Digital to Analog conversion
Microcontrollers usually must have low-power requirements since many devices they control are
battery-operated. Microcontrollers are used in many consumer electronics, car engines, computer
peripherals and test or measurement equipment.
And these are well suited for long lasting battery applications. The dominant part of microcontrollers
being used now a days are implanted in other apparatus.
MICROCONTROLLER ARCHITECTURE
The most important part of a microcontroller is a central processing unit with a word length ranging
from 4-bit to 64-bit and in some modern microcontrollers the word length goes even beyond the limit of
64-bit. A timer is one other constituent of a microcontroller. There is a watchdog timer. Memory spaces
such as RAM, ROM, EEPROM, EPROM are there to store data and programs. For data storage, volatile
memory RAM is used while for the program and operating parameter storage ROM and other memory
spaces are used.
CPU: Being regarded as the brain of the microcontroller, central processing unit fetches, decodes and
executes the instructions. It coordinates various activities taking place in the microcontroller.
I/O ports: There are several parallel input/output ports in a microcontroller. They are used to interface
various peripherals such as printers, external memories, LEDs and LCDs to the microcontroller. Apart
from parallel ports, there are serial ports to interface serially connected peripherals with the
microcontroller.
Memory: As in the case of a microprocessor, a microcontroller has spaces for memories such as RAM,
ROM including EEROM and EPROM. It also allocates a certain amount of flash memory to store
program source code.
Timers and counters: These are the fascinating constituent parts of a microcontroller. Timers and
counters are used in operations which include modulation, clock functions, frequency generation and
measuring and pulse generation.
Analog to digital converters (ADCs): Such converters are useful while converting the output of a
sensor which would be in analog form.
8
Digital to analog converter (DAC): The working of a DAC is just the reverse of an analog to digital
converter. As it is obvious, the output will be an analog signal which can be used to control the analog
peripherals such a motor.
ADVANTAGES
The main advantage of a microcontroller is that the low cost with all the integral parts mounted together
on a single chip. The design makes it more compact and easy to use. The easiness of using a
microcontroller and the relatively easy maintenance process also make it more reliable. Almost all the
pins in a microcontroller are programmable and it makes the microcontroller a lot user-friendly.
Simplicity while interfacing ROM, RAM, and I/O ports. Easiness of troubleshooting and a minimal time
requirement for various operations are other crucial advantages.
DISADVANTAGES
Since it contains all the components on a single chip, microcontrollers are having relatively complex
architecture. Microcontrollers are not suitable to interface high power devices directly and they can only
perform the limited number of operations simultaneously.
CLASSIFICATION OF MICROCONTROLLER
The microcontrollers are characterized regarding bus-width, instruction set, and memory structure. For
the same family, there may be different forms with different sources. This article is going to describe
some of the basic types of the Microcontroller that newer users may not know about.
The types of microcontroller is shown in figure, they are characterized by their bits, memory
architecture, memory/devices and instruction set. Let’s discuss briefly about it.
9
Classification According to Memory Devices
The memory devices are divided into two types, they are
Embedded memory microcontroller
External memory microcontroller
Embedded memory microcontroller: When an embedded system has a microcontroller unit that has
all the functional blocks available on a chip is called an embedded microcontroller. For example, 8051
having program & data memory, I/O ports, serial communication, counters and timers and interrupts on
the chip is an embedded microcontroller.
External Memory Microcontroller: When an embedded system has a microcontroller unit that has not
all the functional blocks available on a chip is called an external memory microcontroller. For example,
8031 has no program memory on the chip is an external memory microcontroller.
From above example, RISC systems shorten execution time by reducing the clock cycles per instruction
and CISC systems shorten execution time by reducing the number of instructions per program. The
RISC gives a better execution than the CISC.
10
CHAPTER THREE
TYPE OF MICROCONTROLLER
Microcontroller 8051
It is a 40pin microcontroller with Vcc of 5V connected to pin 40 and Vss at pin 20 which is kept 0V.
And there are input and output ports from P1.0 – P1.7 and which having open drain feature. Port3 has
got extra features. Pin36 has open drain condition and pin17 has internally pulled up transistor inside the
microcontroller. When we apply logic 1 at port1 then we get logic 1 at port21 and vice versa. The
programming of microcontroller is dead complicate. Basically we write a program in C-language which
is next converted to machine language understand by the microcontroller. A RESET pin is connected to
pin9, connected with a capacitor.
When the switch is ON, the capacitor starts charging and RST is high. Applying a high to the reset pin
resets the microcontroller. If we apply logic zero to this pin, the program starts execution from the
beginning.
11
Pin Description of 8051 Microcontroller
Pin-40: Vcc is the main power source of +5V DC.
Pin 20: Vss – it represents ground (0 V) connection.
Pins 32-39: Known as Port 0 (P0.0 to P0.7) to serving as I/O ports.
Pin-31: Address Latch Enable (ALE) is used to demultiplex the address-data signal of port 0.
Pin-30: (EA) External Access input is used to enable or disable external memory interfacing. If there is
no external memory requirement, this pin is always held high.
Pin- 29: Program Store Enable (PSEN) is used to read signal from external program memory.
Pins- 21-28: Known as Port 2 (P 2.0 to P 2.7) – in addition to serving as I/O port, higher order address
bus signals are multiplexed with this quasi bi directional port.
Pins 18 and 19: Used to interfacing an external crystal to provide system clock.
Pins 10 – 17: This port also serves some other functions like interrupts, timer input, control signals for
external memory interfacing Read and Write. This is a quasi bidirectional port with internal pull up.
Pin 9: It is a RESET pin, used to set the 8051 microcontroller to its initial values, while the
microcontroller is working or at the initial start of application. The RESET pin must be set high for 2
machine cycles.
Pins 1 – 8: This port does not serve any other functions. Port 1 is a quasi bi directional I/O port.
12
Renesas Microcontroller
Renesas is latest automotive microcontroller family that offers high performance feature with
exceptionally low power consumption over a wide and versatile extend of items. This microcontroller
offers rich functional security and embedded safety characteristics required for new and advanced
automotive applications. The core structure of microcontroller CPU support high reliability and high
performance requirements.
The Renesas microcontroller offering low power, high performance, modest packages and the largest
range of memory sizes combined together with characteristics rich peripherals.
Renesas offers the most versatile microcontroller families in the world for example our RX family offers
a many types devices with memory variants from 32K flash/4K RAM to an incredible 8M flash/512K
RAM.
The RX Family of 32-bit microcontrollers is a feature rich, general purpose MCU covering a wide range
of embedded control applications with high speed connectivity, digital signal processing and inverter
control.
The RX microcontroller family uses a 32-bit enhanced Harvard CISC architecture to achieve very high
performance.
Pin Description:
Pin arrangement of Renesas microcontroller is shown in figure:
13
It is a 20 pin microcontroller. The pin 9 is Vss, ground pin and Vdd, power supply pin. It has three
different kinds of interrupt, which are normal interrupt, fast interrupt, high speed interrupt.
Normal interrupts store the significant registers on stack by using push and pop instructions. The fast
interrupts are automatically store program counter and processor status word in special backup registers,
so response time is faster. And high speed interrupts allocate up to four of the general registers for
dedicated use by the interrupt to expand speed even further. The internal bus structure gives 5 internal
busses to ensure data handling is not slowed down. Instruction fetches occur via a wide 64-bit bus, so
that due to the variable length instructions used in CISC architectures.
14
AVR Microcontrollers
AVR microcontroller is developed by Alf-Egil Bogen and Vegard Wollan from Atmel Corporation. The
AVR microcontrollers are modified harvard RISC architecture with separate memories for data and
program and speed of AVR is high when compare to 8051 and PIC. The AVR is stands for Alf-Egil
Bogen and Vegard Wollan’s RISC processor.
There are many AVR family microcontrollers, such as ATmega8, ATmega16 and so on. In this article
we discussing about the ATmega328 microcontroller. The ATmega328 and ATmega8 are pin
compatible ICs but functionally they are different. The ATmega328 has flash memory of 32kB, where
the ATmega8 has 8kB. Other differences are extra SRAM and EEPROM, addition of pin change
interrupts and timers. Some of the features of ATmega328 are:
15
Features of ATmega328:
28-pin AVR microcontroller
Flash program memory of 32kbytes
EEPROM data memory of 1kbytes
SRAM data memory of 2kbytes
I/O pins are 23
Two 8-bit timers
A/D converter
Six channel PWM
In built USART
External Oscillator: up to 20MHz
16
Typical Circuit of AVR Microcontroller:
17
PIC Microcontroller
PIC is a peripheral interface controller, developed by general instrument’s microelectronics, in the year
of 1993. It is controlled by the software. They could be programmed to complete many task and control
a generation line and many more. PIC microcontrollers are finding their way into new applications like
smart phones, audio accessories, video gaming peripherals and advanced medical devices.
There are many PICs, started with PIC16F84 and PIC16C84. But these were the only affordable flash
PICs. Microchip has recently introduced flash chips with types that are much more attractive, such as
16F628, 16F877 and 18F452. The 16F877 is around twice the price of the old 16F84, but has eight times
the code size, much more RAM, much more I/O pins, a UART, A/D converter and a lot more.
Features of PIC16F877
Core Features:
High-performance RISC CPU
Up to 8K x 14 words of FLASH program memory
35 Instructions (fixed length encoding-14-bit)
368×8 static RAM based data memory
Up to 256 x 8 bytes of EEPROM data memory
Interrupt capability (up to 14 sources)
Three addressing modes (direct, indirect, relative)
Power-on reset (POR)
Harvard architecture memory
Power saving SLEEP mode
Wide operating voltage range: 2.0V to 5.5V
High sink / source current: 25mA
Accumulator based machine
Peripheral Features:
3 Timer/counters (programmable pre-scalars)
– Timer0, Timer2 are 8-bit timer/counter with 8-bit pre-scalar
– Timer1 is 16-bit, can be incremented during sleep via external crystal/clock
18
Two capture, compare, PWM modules
– Input capture function records the Timer1 count on a pin transition
– A PWM function output is a square wave with a programmable period and duty cycle.
10-bit 8 channel analog-to-digital converter
USART with 9-bit address detection
Synchronous serial port with master mode and I2C Master/Slave
8-bit parallel slave port
Analog Features:
10-bit, up to 8-channel Analog-to-Digital Converter (A/D)
Brown-out Reset (BOR)
Analog Comparator module (Programmable input multiplexing from device inputs and
comparator outputs are externally accessible)
19
20
21
Advantages of PIC:
It is a RISC design
Its code is extremely efficient, allowing the PIC to run with typically less program memory than
its larger competitors
It is low cost, high clock speed
The circuit below consists of a lamp whose switching is controlled using a PIC microcontroller. The
Microcontroller is interfaced with an external crystal which provides clock input. The PIC is also
interfaced with a push button and on pressing the push button, the Microcontroller accordingly sends a
high signal to the base of the transistor, so as to switch on the transistor and thus give proper connection
to the relay to switch it on and allow passage of AC current to the lamp and thus the lamp glows. The
status of the operation is displayed on the LCD interfaced to the PIC microcontroller.
22
Microcontroller Applications
Microcontrollers are intended for embedded devices, in comparison to the micro-processors which are
used in PCs or other all-purpose devices. Microcontrollers are employed in automatically managed
inventions and appliances like- power tools, implantable medical devices, automobile engine control
systems, , office machines, remote controls appliances, toys and many more embedded systems. By
dipping the size and expenditure in comparison to a design that make use of a different micro-processor,
I/O devices and memory, micro-controllers formulate it inexpensive to digitally control more & more
appliances and operations. Mixed signal micro-controllers are general; putting together analog
constituents required controlling non-digital electronic structures.
23
CHAPTER FOUR
CONCLUSION
The basic architecture and function of a microcontroller is discussed. With examples, the need for low
power microcontroller is illustrated.
Microcontrollers are of prime importance for electronics control and communication of any modern
appliance. Any household appliances e.g. electronic printer, photostart copier, fax machine contains one
or more microcontroller. Because of its bulk usage a marginal saving in power for one 8051 results to
enormous saving as a whole.
24
REFERENCE
1. The identification the first microprocessor depends heavily on the precise definition of the term
"microprocessor", on which there is not consensus.
2. 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. Retrieved 2009-12-23.
3. "Trends in the Semiconductor Industry". Semiconductor History Museum of Japan.
4. Jump up to:a b "Oral History Panel on the Development and Promotion of the Intel 8048
Microcontroller" (PDF). Computer History Museum Oral History, 2008. p. 4. Retrieved 2016-
04-04.
5. Jump up to:a b "Chip Hall of Fame: Microchip Technology PIC 16C84 Microcontroller". IEEE.
2017-06-30. Retrieved September 16, 2018.
6. Jump up to:a b Motorola. Advance Information, 8-Bit Microcomputers MC68HC05B6,
MC68HC05B4, MC68HC805B6, Motorola Document EADI0054RI. Motorola Ltd., 1988.
7. Jump up to:a b c "Atmel's Self-Programming Flash Microcontrollers" (PDF). 2012-01-24.
Retrieved 2008-10-25. by Odd Jostein Svendsli 2003
8. U-M researchers create world's smallest 'computer', University of Michigan, 2018-06-21
9. University of Michigan outdoes IBM with world's smallest 'computer', CNET, 2018-06-22
10. IBM fighting counterfeiters with world's smallest computer, CNET, 2018-03-19
25