You are on page 1of 22

MICROCONTROLLER

ARCHITECTURE
MICROCONTROLLER

 is a compact integrated circuit designed to govern a specific operation


in an embedded system. A typical microcontroller includes a
processor, memory and input/output (I/O) peripherals on a single chip

ADVANTAGES

 Dependable
 Reusable
  Energy-efficient
 Cost-effective
 It requires less time to operate
APPLICATIONS

 Microcontrollers are mainly used for embedded devices, in contrast


to the microprocessors which are utilized in personal computers
otherwise other devices. These are mainly used in different
appliances like implantable medical devices, power tools, engine
control systems in automobiles, machines used in offices,
appliances controlled through remote, toys, etc. The main
applications of microcontrollers types include the following.
Applications of microcontrollers
•Light Sensing
• Automobiles •Used in metering & •Safety devices
• Mobile Phones measurement devices, •Process control devices
• Computer Systems voltmeter, measuring •Controlling devices
• Security Alarms rotating objects •Fire detection
• Appliances •Controlling Devices •Temperature sensing
• Current meter •Industrial instrumentation •Mobile Phones
• Cameras devices •Auto Mobiles
• Micro Oven •Instrumentation devices in •Washing Machines
• Measurement Industries •Cameras
Instruments
•Security Alarms
ADVANTAGES OF MICROCOTROLLER
 These are flexible & very small
 Because of their high integration, its size & cost of the system can
be decreased.
 Interfacing of the microcontroller is easy with additional ROM,
RAM & I/O ports.
 Many tasks can be performed, so the human effect can be reduced.
 It is simple to use, troubleshooting & maintaining the system is
simple.
 It works like a microcomputer
Microcontrollers Types According to the Number of Bits

  8-bits,
 16-bits,
 32-bits microcontroller.
Microcontrollers Types According to Instruction Set

 CISC: CISC is a Complex Instruction Set Computer. It allows the programmer to use one
instruction in place of many simpler instructions.
 RISC: The RISC stands for Reduced Instruction set Computer, this type of instruction sets
reduces the design of microprocessor for industry standards. It allows each instruction to
operate on any register or use any addressing mode and simultaneous access of program
and data.
 From the 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.
Microcontrollers Types According to Memory Architecture

 Harvard Memory Architecture Microcontroller: The point when a microcontroller unit


has a dissimilar memory address space for the program and data memory, the
microcontroller has Harvard memory architecture in the processor.
 Princeton Memory Architecture Microcontroller: The point when a microcontroller has
a common memory address for the program memory and data memory, the
microcontroller has Princeton memory architecture in the processor.
ATmega328
 The Arduino boards are equipped
with sets of digital and analog
input/output (I/O) pins that may be
interfaced to various expansion
boards (shields) or Breadboards
(other circuits on them).
ATmega328
 Arduino Uno is a microcontroller board based on the ATmega328 .
It has digital input/output pins of which 6 can be used as PWM
outputs, 6 analog inputs, a 16 MHz quartz crystal, a USB
connection, a power jack, an ICSP header and a reset button.
 It contains everything needed to support the microcontroller, simply
connect it to a computer with a USB cable or power it with a AC-to-
DC adapter or battery to get started.
 It is programmable through the Arduino IDE.
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
 Inbuilt USART
 External Oscillator: up to 20MHz
“E-E-PROM”) stands
for Electrically Erasable
Programmable 
Read-Only Memory.
 The input voltage (7 – 12 V) to the Arduino board when it’s using an
external power source (as opposed to 5 volts from the USB
connection or other regulated power source). You can supply
voltage through the Vin pin, or, if supplying voltage via the power
jack, access it directly through Vin pin.
ATmega328P Architecture:
 Architecture: means the complex or carefully designed structure of
something.
 he  ATmega328/P is a low-power CMOS 8-bit microcontroller based on
the AVR® enhanced RISC (reduced instruction set computer)
architecture.
 The clock is controlled by an external 16MHz Crystal Oscillator.
 The basic working of  CPU of  ATmega328:-
1. The data is uploaded in serial via the port (being uploaded from the
computer’s Arduino IDE). The data is decoded and then the instructions are
sent to instruction register and it decodes the instructions on the same
clock pulse.
2. On the next clock pulse the next set of instructions are loaded in
instruction register.
3. In general purpose registers the registers are of 8-bit but there are 3 16-
bit registers also.
a. 8-bit registers are used to store data for normal calculations and results.
b. 16-bit registers are used to store data of timer counter in 2 different
register. They are fast, and are used to store specific hardware functions.
 4. EEPROM stores data permanently even if the power is cut out.
Programming inside a EEPROM  is slow.
5. Interrupt Unit checks whether there is an interrupt for the
execution of instruction to be executed in ISR (Interrupt Service
Routine).
6. Serial Peripheral Interface (SPI) is an interface bus commonly
used to send data between microcontrollers and small peripherals
such as Camera, Display, SD cards, etc. It uses separate clock and
data lines, along with a select line to choose the device you wish to
talk to.
 7.Watchdog timer is used to detect and recover from MCU
malfunctioning.
8. Analog comparator compares the input values on the positive
and negative pin, when the value of positive pin is higher the output
is set.
9. Status and control is used to control the flow of execution of
commands by checking other blocks inside the CPU at regular
intervals.
10. ALU (Arithmetic and Logical unit)The high performance AVR
ALU operates in direct connection with all the 32 general purpose
working registers. Within a single clock cycle, arithmetic operations
in general purpose registers are executed. The ALU operations are
divided into 3 main categories – arithmetic, logical and bit-function.
 11. I/O pins The digital inputs and outputs (digital I/O) on the
Arduino are what allow you to connect the Arduino sensors,
actuators, and other ICs. Learning how to use them will allow you
to use the Arduino to do some really useful things, such as reading
switch inputs, lighting indicators, and controlling relay outputs.
NOTE  Automatic (Software) Reset: Rather than requiring a physical
press of the reset button before an upload, the Arduino is designed
in a way that allows it to be reset by software running on a
connected computer. The Arduino Software (IDE) uses this
capability to allow you to upload code by simply pressing the
upload button in the Arduino environment. This means that the
bootloader can have a shorter timeout, as the lowering of DTR
(Data Terminal Ready) can be well-coordinated with the start of the
upload.
 Firmware: Firmware is a software program or set of instructions
programmed on a hardware device. It provides the necessary instructions for
how the device communicates with the other computer hardware. Firmware is
held in non-volatile memory devices such as ROM.
 3.To check whether the firmware is installed in your Arduino or not just press
the reset button and if the inbuilt LED flickers (on pin 13) the firmware is
present.

 https://www.youtube.com/watch?v=BiCSW6QR6HA

You might also like