100% found this document useful (1 vote)
59 views

3 Microcontrollers

The document discusses microcontrollers, including: 1. It defines a microcontroller as a computer on a single integrated circuit dedicated to performing one task. Microcontrollers contain memory, programmable I/O, and a processor. 2. The key elements of a microcontroller are described as the processor, I/O peripherals, memory (program and data), and supporting elements like ADCs and serial ports. 3. Common types of microcontrollers are discussed like the 8051, PIC, AVR, and Renesas microcontrollers. Their applications include uses in devices like appliances, vehicles, and industrial equipment.

Uploaded by

Rynefel Elopre
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
59 views

3 Microcontrollers

The document discusses microcontrollers, including: 1. It defines a microcontroller as a computer on a single integrated circuit dedicated to performing one task. Microcontrollers contain memory, programmable I/O, and a processor. 2. The key elements of a microcontroller are described as the processor, I/O peripherals, memory (program and data), and supporting elements like ADCs and serial ports. 3. Common types of microcontrollers are discussed like the 8051, PIC, AVR, and Renesas microcontrollers. Their applications include uses in devices like appliances, vehicles, and industrial equipment.

Uploaded by

Rynefel Elopre
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

MICROCONTROLLER

Prepared by ENGR. RYNEFEL ELOPRE


Learning Objectives
At the end of the topics, the student should be able

1. To understand the working and programming of microcontroller


2. To understand how microcontroller works
3. To illustrate the different types of micro controller
4. To demonstrate how microcontroller works
Learning Topics

• What is microcontroller
• How do microcontroller works
• What are the elements of a microcontroller
• Microcontroller features
• Types of microcontroller
• Microcontroller Application
• Choosing the right microcontroller
Microcontroller
What is microcontroller?

• A microcontroller is a computer present in a single integrated circuit which


is dedicated to perform one task and execute one specific application.
• It contains memory, programmable input/output peripherals as well a
processor.
• Microcontrollers are mostly designed for embedded applications and are
heavily used in automatically controlled electronic devices such as
cellphones, cameras, microwave ovens, washing machines, etc.
• Sometimes referred to as an embedded controller or microcontroller unit
(MCU), microcontrollers are found in vehicles, robots, office machines,
medical devices, mobile radio transceivers, vending machines and home
appliances, among other devices.
Microcontroller
Arduino Microcontroller
Microcontroller
PIC Microcontroller (Programmable Intelligent Computer)
Microcontroller
8051 Microcontroller
Microcontroller
How do microcontrollers work?

• A microcontroller is embedded inside of a system to control a singular


function in a device.
• It does this by interpreting data it receives from its I/O peripherals using
its central processor.
• The temporary information that the microcontroller receives is stored in its
data memory, where the processor accesses it and uses instructions stored
in its program memory to decipher and apply the incoming data.
• It then uses its I/O peripherals to communicate and enact the appropriate
action.
• Microcontrollers are used in a wide array of systems and devices.
• Devices often utilize multiple microcontrollers that work together within
the device to handle their respective tasks.
Microcontroller
What are the elements of a microcontroller?

1. The processor (CPU) -- A processor can be thought of as the brain of the


device. It processes and responds to various instructions that direct the
microcontroller's function. This involves performing basic arithmetic, logic
and I/O operations. It also performs data transfer operations, which
communicate commands to other components in the larger embedded
system.
2. I/O peripherals -- The input and output devices are the interface for the
processor to the outside world. The input ports receive information and
send it to the processor in the form of binary data. The processor receives
that data and sends the necessary instructions to output devices that
execute tasks external to the microcontroller.
Microcontroller
What are the elements of a microcontroller?

3. Memory -- A microcontroller's memory is used to store the data that the


processor receives and uses to respond to instructions that it's been progr
ammed to carry out. A microcontroller has two main memory types:
• Program memory, which stores long-term information about the
instructions that the CPU carries out. Program memory is
non-volatile memory, meaning it holds information over time
without needing a power source.
• Data memory, which is required for temporary data storage
while the instructions are being executed. Data memory is
volatile, meaning the data it holds is temporary and is only
maintained if the device is connected to a power source.
Microcontroller
Other supporting elements of a microcontroller include:

• Analog to Digital Converter (ADC) -- An ADC is a circuit that converts


analog signals to digital signals. It allows the processor at the center of the
microcontroller to interface with external analog devices, such as sensors.
• Digital to Analog Converter (DAC) -- A DAC performs the inverse
function of an ADC and allows the processor at the center of the
microcontroller to communicate its outgoing signals to external analog
components.
• System bus -- The system bus is the connective wire that links all
components of the microcontroller together.
• Serial port -- The serial port is one example of an I/O port that allows the
microcontroller to connect to external components. It has a similar
function to a USB or a parallel port but differs in the way it exchanges bits.
Microcontroller
Features of microcontroller

• A microcontroller's processor will vary by application. Options range from


the simple 4-bit, 8-bit or 16-bit processors to more complex 32-bit or 64-
bit processors.
• Microcontrollers can use volatile memory types such as random access
memory (RAM) and non-volatile memory types -- this includes flash
memory, erasable programmable read-only memory (EPROM) and
electrically erasable programmable read-only memory (EEPROM).
• Generally, microcontrollers are designed to be readily usable without
additional computing components because they are designed with
sufficient onboard memory as well as offering pins for general I/O
operations, so they can directly interface with sensors and other
components.
Microcontroller
Features of microcontroller

• Microcontroller architecture can be based on the Harvard architecture or


von Neumann architecture, both offering different methods of exchanging
data between the processor and memory.
• With a Harvard architecture, the data bus and instruction are separate, allo
wing for simultaneous transfers. With a Von Neumann architecture, one bu
s is used for both data and instructions.
Microcontroller
Features of microcontroller

• microcontrollers solely used assembly language.


• Today, the C programming language is a popular option. Other common
microprocessor languages include Python and JavaScript.
• MCUs feature input and output pins to implement peripheral functions.
• functions include analog-to-digital converters, liquid crystal display (LCD)
controllers, real-time clock (RTC), universal synchronous/asynchronous
receiver transmitter (USART), timers, universal asynchronous receiver
transmitter (UART) and universal serial bus (USB) connectivity.
• Sensors gathering data related to humidity and temperature, among other
s, are also often attached to microcontrollers.
Microcontroller
Types of microcontroller

• Microcontroller 8051
• Renesas Microcontroller
• AVR Microcontrollers
• PIC Microcontroller
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
• 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.
Microcontroller
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 microcontrol
ler 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.
Microcontroller
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.
Microcontroller
Application of Renesas Microcontroller:

• Industrial automation
• Communication applications
• Motor control applications
• Test and measurement
• Medical applications
Microcontroller
AVR Microcontrollers

• AVR microcontroller is developed by Al


f-Egil Bogen and Vegard Wollan from
Atmel Corporation.
• The AVR microcontrollers are modified
harvard RISC architecture with separat
e 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.
Microcontroller
Difference between 8051 and AVR Controllers:

• 8051s are 8-bit controllers based on CISC architecture, AVRs are 8-bit
controllers based on RISC architecture
• 8051 consumes more power than AVR microcontroller
• In 8051, we can program easily than the AVR microcontroller
• The speed of AVR is more than the 8051 microcontroller
Microcontroller
Classification of AVR Controllers:

AVR Microcontrollers are classified into three types:


• TinyAVR – Less memory, small size, suitable only for simpler applications
• MegaAVR – These are the most popular ones having good amount of
memory (up to 256 KB), higher number of inbuilt peripherals and suitable for
moderate to complex applications
• XmegaAVR – Used commercially for complex applications, which require large
program memory and high speed
Microcontroller
Features of AVR Microcontroller:
• 16KB of In-System Programmable Flash
• 512B of In-System Programmable EEPROM
• 16-bit Timer with extra features
• Multiple internal oscillators
• Internal, self-programmable instruction flash memory up to 256K
• In-system programmable using ISP, JTAG or high voltage methods
• Optional boot code section with independent lock bits for protection
• Synchronous/asynchronous serial peripherals (UART/USART)
• Serial peripheral interface bus (SPI)
• Universal serial interface (USI) for two/three-wire synchronous data transfer
• Watchdog timer (WDT)
• Multiple power-saving sleep modes
• 10-bit A/D Converters, with multiplex of up to 16 channels
• CAN and USB controller support
• Low-voltage devices operating down to 1.8v
Microcontroller
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.
Microcontroller
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
Microcontroller
Microcontroller applications

• Microcontrollers are used in multiple industries and applications, including


in the home and enterprise, building automation, manufacturing, robotics,
automotive, lighting, smart energy, industrial automation, communications
and internet of things (IoT) deployments.
• One very specific application of a microcontroller is its use as a digital
signal processor.
• The simplest microcontrollers facilitate the operation of electromechanical
systems found in everyday convenience items, such as ovens, refrigerators,
toasters, mobile devices, key fobs, video game systems, televisions and law
n-watering systems.
• They are also common in office machines such as photocopiers, scanners, f
ax machines and printers, as well as smart meters, ATMs and security syste
ms.
Microcontroller
Choosing the right microcontroller

There are a number of technology and business considerations to keep in


mind when choosing a microcontroller for a project.

Beyond cost, it is important to consider the maximum speed, amount of RAM


or ROM, number or types of I/O pins on an MCU, as well as power
consumption and constraints and development support.
Learning Resources

1. https://internetofthingsagenda.techtarget.com/definition/microcontroller#:
~:text=A%20microcontroller%20is%20a%20compact,peripherals%20on%20
a%20single%20chip.
2. https://www.elprocus.com/microcontrollers-types-and-applications/
3. https://www.techopedia.com/definition/3641/microcontroller

You might also like