You are on page 1of 16

Lecture 11

Microcontroller and
Microprocessor

1
Microcontroller 8051
• It is a small computer on a single integrated circuit
• Why 8051
- evolution of the 8000 series
- term 8051 refers to MCS 51 family of microcontroller IC’s
- 8 is derived from being 8-bit microcontroller.
• Examples:
- energy management i.e. controlling energy in homes and
industrial applications
- touch screens i.e. cell phones, gaming devices
- automobiles i.e. anti lock brake system, cruise control
- medical devices i.e. blood pressure, glucose monitors
2
Microcontroller 8051
• Microcontroller(MCU)
Integrated electronic computing device that includes three major
components on a single chip
- Microprocessor (MPU)
- Memory
- I/O (Input/Output) ports
• Support devices
- Timers
- A/D converter
- Serial I/O
• Common communication lines
- System bus 3
Microcontroller Block Diagram

4
Microprocessor (MPU)
• Microprocessor (MPU)
- Read instructions
- Process binary data
• Arithmetic Logic Unit (ALU)
- arithmetic operations i.e. +,-,*,/
- logical operations i.e. AND, OR etc
• Control Unit (CU)
- decodes instructions
- controls all other internal components of CPU
• Registers
- hold an instruction
- storage address
5
Memory

• Storage Device
- Addresses
- Registers
• Major Categories
- Read/Write Memory (R/W)
- Read-only-Memory (ROM)

6
Input/output (I/O)

• Input Devices
- Switches and Keypads
- Provide binary information to the MPU
• Output devices
- LEDs and LCDs
- Receive binary information from the MPU

7
Microprocessor

8
Microprocessor Architecture
• MPU communicates with Memory and I/O using the
System Bus
Address bus
- Unidirectional
- addressing to specific memory and I/O addresses
Data bus
- Bidirectional
- Read and write data to the memory
Control lines
- Read and Write timing signals 9
Microcontroller vs. Microprocessor
Microprocessor Microcontroller
CPU is stand-alone, RAM, CPU, RAM, ROM, I/O and
ROM, I/O, timer are separate timer are all on a single chip
designer can decide on the fixed amount of on-chip ROM,
amount of ROM, RAM and I/O RAM, I/O ports
ports
general-purpose single-purpose (control-
oriented)
High processing power Low processing power

High power consumption Low power consumption


Typically 32/64 – bit Typically 8/16 bit
Cost of entire system increases Cost of entire system is low
10
Examples: PC’s, laptops, Examples: ATM, automobiles,
notepads, etc washing machine, etc
8051 Basic component
• 4K bytes internal ROM
• 128 bytes internal RAM
• Four 8-bit I/O ports (P0 - P3).
• Two 16-bit timers/counters
• One serial interface

CPU RAM ROM


A single chip
I/O Serial Microcontroller
Timer COM
Port 11
Port
8051 Microcontroller Schematics

12
8051 Pins (I/O Ports)
Port pins Feature
P0.0 ~ P0.7
P1.0 ~ P1.7
8-bit R/W - General Purpose I/O
P2.0 ~ P2.7
P3.0 ~ P3.7
P40 V provides supply voltage
P20 GND is ground
P19 ~ P18 XTAL1 & XTAL2 provide external clock
P9 RST is reset
P31 EA is external excess
P29 PSEN is program store enable
P30 AlE is address latch enable 13
8086 Basic component
• It is a 16 bit µp.
• 8086 has a 20 bit address bus can access up to 2
memory locations ( 1 MB) .
• It can support up to 64K I/O ports.
• It provides 14, 16-bit registers.
• It has multiplexed address and data bus - and
– .
• Operates in minimum (high 1) and maximum mode (low 0)

14
8086 microprocessor schematics

15
8086 Pins
Port pins Feature
AD0 ~ AD15 Address/Data bus
A16/S3~ A19/S6 Address bus/Status signal
TEST Wait
INTR Interrupt
BHE/s7 Bus high enable/output
MN/MX Minimum/maximum
RD Read
RESET Terminate program
DT/R Data transmit/Receive
DEN Data enable
ALE Address latch enable
M/IO Memory access/IO 16
WR Write control signal
INTA Interrupt acknowledge

You might also like