SlideShare a Scribd company logo
1 of 22
Lecture 1
Course Overview and
The 8051 Architecture
2
MCUniversity Program Lectures
 8051 architecture
 System overview of C8051F020
 8051 instruction set
 System clock, crossbar and GPIO
 Assembler directives
 Programming using C language
 Interrupts
 Timer operations and programming
 Serial communication
 DAC and comparator
 ADC
3
Course Syllabus
Lecture
Topic
Tutorial
Questions Lab number and Topic Language
1 Course overview and 8051 architecture 1
2 System overview of C8051F020 2 0. Prelab: Working with the tools
3 Toolstick Platform Overview
4 8051 Instruction Set 3
5 System Clock, Crossbar, and GPIO 4 1. Blinky (no timers) Assembly
6 Assembler Directives 5 2. 16x16 Multiply Assembly
7 Programming using C Language 6 3. Blinky (no timers) C
8 Interrupts 7
9 Timer Operations and Programming 8 4. Blinky (timer with ISR) Assembly
5. Blinky (timer with ISR) and
other timer operations C
6. Switch debouncing C
10 Serial Communication 9 7. Serial Communication and LCD C
11 DAC and Comparator 8. Analog Comparators C
9. DAC C
12 ADC 10 10. ADC C
 Lectures and Tutorial questions are based on the
“Embedded Programming with Field-Programmable
Mixed-Signal Microcontrollers” Textbook
4
Course Goals
 At the end of this course, you should be able to:
 Understand the architecture of one of the most popular
microcontroller (MCU) families
 Use an integrated development environment (IDE) to program and
debug an MCU
 Program an MCU using Assembly and C languages
 Understand and use peripherals integrated into an MCU
 Interface an MCU to simple external components
 Understand and use interrupts
 Use timers in various modes
 Communicate using a serial interface
 Understand and use analog to digital converters (ADC), digital to
analog converters (DAC) and comparators
5
Course Prerequisites
 A course in Electric Circuits that includes understanding
basic electronic components such as resistors, capacitors,
diodes and transistors
 A course in basic digital logic design that includes logic
gates and Boolean arithmetic
 Ability to program in a high-level programming language
such as C or C++
6
The 8051 Architecture
 Microprocessors and microcontrollers
 The 8051 microcontroller: a brief history
 Block diagram of the original 8051
 Is 8-bit still relevant?
 Harvard and von Neumann architectures
 Memory organization
 Special function registers
7
Microprocessors and Microcontrollers
 Microprocessor: general-purpose CPU
 Emphasis is on flexibility and performance
 Generic user-interface such as keyboard, mouse, etc.
 Used in a PC, PDA, cell phone, etc.
 Microcontroller: microprocessor + memory on a single chip
 Emphasis is on size and cost reduction
 The user interface is tailored to the application, such as the buttons
on a TV remote control
 Used in a digital watch, TV remote control, car and many common
day-to-day appliances
8
Terminology
 Integrated Circuit (IC): A miniaturized electronic circuit that
consists of semiconductor devices and passive components
contained in a package
 Central Processing Unit (CPU): This refers to the core of the
MCU that executes code
 Microcontroller Unit (MCU): This is the standard acronym
used for microcontrollers, and refers to the full IC that
contains the CPU and peripherals.
 “n-bit” – the “n” refers to the data bus width of the CPU, and
is the maximum width of data it can handle at a time
 Examples: 8-bit MCU, 32-bit MCU
9
Microcontroller Architectures
 Microcontroller architecture refers to the internal hardware
organization of a microcontroller
 Each hardware architecture has its own set of software
instructions called assembly language that allows
programming of the microcontroller
 Some of the popular microcontroller architectures
 Intel 8051
 Zilog Z80
 Atmel AVR
10
The 8051 Microcontroller—A Brief History
 In 1980, Intel introduced the 8051, relevant today after more
than two decades
 First device in the MCS-51® family of 8-bit microcontrollers
 In addition to Intel there are other second source suppliers
of the ICs, who make microcontrollers that are compatible
with the 8051 architecture.
 In recent years some companies have incorporated many
different and additional features into 8051
 In 2000, Silicon Laboratories introduced a field
programmable, mixed-signal chip (C8051F020) based on
the 8051 core CPU
 This will be the platform for this course.
11
Is 8-bit Still Relevant?
 “n-bit” – the “n” refers to the data bus width of the CPU, and
is the maximum width of data it can handle at a time
 PCs with 64-bit microprocessors are becoming common
 Over 55% of all processors sold per year are 8-bit
processors, which comes to over 3 billion of them per year!*
 8-bit microcontrollers are sufficient and cost-effective for
many embedded applications
 More and more advanced features and peripherals are
added to 8-bit processors by various vendors
 8-bit MCUs are well-suited for low-power applications that
use batteries
*Note: Statistics from Embedded.com Article ID# 9900861, Dec 2002
12
Example System: RC Car
Forward
Reverse
Left
Right
Microcontroller
Controls
RF
Transmitter
Batteries
Voltage Regulator
Antenna
Power
RF Receiver
Antenna
Microcontroller
Front Electric
Motor (Left/Right)
Rear Electric Motor
(Fwd/Reverse)
Car lights (LEDs)
Batteries
Voltage Regulator
Power
13
Block Diagram of the Original 8051
Timer/Counter
(Timer 0 &
Timer 1)
4K byte Program
Memory (ROM)
128 bytes
Data Memory
(RAM)
I/O ports Serial Port
64 K Bus
Expansion Control
8051 CPU
Oscillator
&Timing
P3 P2 P1 P0
(Address/data)
TxD RxDALE /PSEN
From Crystal
Oscillator or RC
network
/INT0 /INT1
Other
interrupts
T0 T1
14
Block Diagram of the Silicon Labs 8051
15
Harvard and von Neumann Architectures
 Harvard Architecture—a type of computer architecture
where the instructions (program code) and data are stored
in separate memory spaces
 Example: Intel 8051 architecture
 von Neumann Architecture—another type of computer
architecture where the instructions and data are stored in
the same memory space
 Example: Intel x86 architecture (Intel Pentium, AMD Athlon, etc.)
16
MCU Fetch-Execute Cycle
 Fetch operation—retrieves
an instruction from the
location in code memory
pointed to by the program
counter (PC)
 Execute operation—
executes the instruction
that was fetched during the
fetch operation. In addition
to executing the instruction,
the CPU also adds the
appropriate number to the
PC to point it to the next
instruction to be fetched.
Program
Counter
(PC)
Code Memory
F
e
t
c
h
CPU
+
To other
peripherals
17
8051 and 8052
 The feature set of the 8052 is the superset of the 8051
 In addition to all the features of the 8051, the 8052 includes
 128 bytes internal RAM (total of 256 bytes)
 A third 16-bit timer, with new modes of operation
 Additional SFRs to support the third timer
 The Silicon Labs C8051F020 builds upon the 8052, and
adds further features
 The term “8051” is typically used in place of “8052”, and also
refers to the 8051 architecture
18
C8051F020 Data Memory (RAM)
 Internal Data Memory space is
divided into three sections
 Lower 128
 Upper 128
 Special function register (SFR)
 There are 384 bytes of memory
space physically, though the
Upper 128 and SFRs share the
same addresses from location
80H to FFH.
 Appropriate instructions should
be used to access each memory
block
19
Lower 128—Register Banks and RAM
Bit-addressable
Area (16 bytes)
Register Banks
(8 bytes per
bank; 4 banks)
General
Purpose RAM
(80 bytes)
20
Special Function Registers (SFRs)
 SFRs provide control and
data exchange with the
microcontroller’s resources
and peripherals
 Registers which have their
byte addresses ending with
0H or 8H are byte- as well as
bit- addressable
 Some registers are not bit-
addressable. These include
the stack pointer (SP) and
data pointer register (DPTR)
21
Summary of SFRs
 Accumulator (ACC) and B register
 ACC (also referred to as A) is used implicitly by several instructions
 B is used implicitly in multiply and divide operations
 These registers are the input/output of the arithmetic and logic unit (ALU)
 Program status word—PSW
 Shows the status of arithmetic and logical operations using multiple bits such as Carry
 Selects the Register Bank (Bank 0 - Bank 3)
 Stack pointer—SP
 Data pointer—DPTR (DPH and DPL)
 16-bit register used to access external code or data memory
 Timer Registers—TH0, TL0, TH1, TL1, TMOD, TCON
 Used for timing intervals or counting events
 Parallel I/O Port Registers—P0, P1, P2 and P3
 Serial Communication Registers—SBUF and SCON
 Interrupt Management Registers—IP and IE
 Power Control Register—PCON
www.silabs.com/MCU

More Related Content

What's hot

8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerJai Sudhan
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes Dr.YNM
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paperprathik
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessorRamaPrabha24
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notesManikanteswar Madala
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )Tarun Khaneja
 
Introduction to 8085 microprocessor
Introduction to 8085 microprocessorIntroduction to 8085 microprocessor
Introduction to 8085 microprocessorvenkateshkannat
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSSabin Gautam
 
Week 1.2 pin diagram
Week 1.2   pin diagramWeek 1.2   pin diagram
Week 1.2 pin diagrambaraniselva
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorRavi Anand
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085muneer.k
 
Week 1.3 architecture
Week 1.3   architectureWeek 1.3   architecture
Week 1.3 architecturebaraniselva
 

What's hot (20)

8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
EE6008 MBSD
EE6008  MBSDEE6008  MBSD
EE6008 MBSD
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paper
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessor
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
 
Introduction to 8085 microprocessor
Introduction to 8085 microprocessorIntroduction to 8085 microprocessor
Introduction to 8085 microprocessor
 
Important questions
Important questionsImportant questions
Important questions
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
 
8051 dev board guide
8051 dev board guide8051 dev board guide
8051 dev board guide
 
Micro 8051
Micro 8051Micro 8051
Micro 8051
 
Week 1.2 pin diagram
Week 1.2   pin diagramWeek 1.2   pin diagram
Week 1.2 pin diagram
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085
 
Week 1.3 architecture
Week 1.3   architectureWeek 1.3   architecture
Week 1.3 architecture
 
Unit 1
Unit 1Unit 1
Unit 1
 

Similar to Lecture 1 (course overview and 8051 architecture) rv01

Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051ASHISH RAJ
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxSKWriters
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
 
A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...jeronimored
 
Over view of Microprocessor 8085 and its application
Over view of Microprocessor 8085 and its applicationOver view of Microprocessor 8085 and its application
Over view of Microprocessor 8085 and its applicationiosrjce
 
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and MicrocontrollerMPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and MicrocontrollerRAHUL RANJAN
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Introduction to-microprocessors
Introduction to-microprocessorsIntroduction to-microprocessors
Introduction to-microprocessorsVolodymyr Ushenko
 
8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)HarshitParkar6677
 
MPMC all units .pdf
MPMC all units .pdfMPMC all units .pdf
MPMC all units .pdfRishaSingh26
 

Similar to Lecture 1 (course overview and 8051 architecture) rv01 (20)

Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051
 
8051 presentation
8051 presentation8051 presentation
8051 presentation
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptx
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...A microprocessor is the main component of a microcomputer system and is also ...
A microprocessor is the main component of a microcomputer system and is also ...
 
Over view of Microprocessor 8085 and its application
Over view of Microprocessor 8085 and its applicationOver view of Microprocessor 8085 and its application
Over view of Microprocessor 8085 and its application
 
C010620914
C010620914C010620914
C010620914
 
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and MicrocontrollerMPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Introduction to-microprocessors
Introduction to-microprocessorsIntroduction to-microprocessors
Introduction to-microprocessors
 
8085 notes g scheme
8085 notes g scheme8085 notes g scheme
8085 notes g scheme
 
8085 notes g scheme
8085 notes g scheme8085 notes g scheme
8085 notes g scheme
 
POA_Unit 5.pptx
POA_Unit 5.pptxPOA_Unit 5.pptx
POA_Unit 5.pptx
 
8085 notes g scheme 2016
8085 notes g scheme 20168085 notes g scheme 2016
8085 notes g scheme 2016
 
8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)8085 notes g scheme 2016 (2)
8085 notes g scheme 2016 (2)
 
MPMC all units .pdf
MPMC all units .pdfMPMC all units .pdf
MPMC all units .pdf
 

More from cairo university

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedcairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devicescairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitscairo university
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xcairo university
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitscairo university
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...cairo university
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuitscairo university
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuitscairo university
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuitscairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency responsecairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revisioncairo university
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 

More from cairo university (20)

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extended
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified x
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuits
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuits
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuits
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Lecture 12 (adc) rv01
Lecture 12  (adc) rv01Lecture 12  (adc) rv01
Lecture 12 (adc) rv01
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 

Lecture 1 (course overview and 8051 architecture) rv01

  • 1. Lecture 1 Course Overview and The 8051 Architecture
  • 2. 2 MCUniversity Program Lectures  8051 architecture  System overview of C8051F020  8051 instruction set  System clock, crossbar and GPIO  Assembler directives  Programming using C language  Interrupts  Timer operations and programming  Serial communication  DAC and comparator  ADC
  • 3. 3 Course Syllabus Lecture Topic Tutorial Questions Lab number and Topic Language 1 Course overview and 8051 architecture 1 2 System overview of C8051F020 2 0. Prelab: Working with the tools 3 Toolstick Platform Overview 4 8051 Instruction Set 3 5 System Clock, Crossbar, and GPIO 4 1. Blinky (no timers) Assembly 6 Assembler Directives 5 2. 16x16 Multiply Assembly 7 Programming using C Language 6 3. Blinky (no timers) C 8 Interrupts 7 9 Timer Operations and Programming 8 4. Blinky (timer with ISR) Assembly 5. Blinky (timer with ISR) and other timer operations C 6. Switch debouncing C 10 Serial Communication 9 7. Serial Communication and LCD C 11 DAC and Comparator 8. Analog Comparators C 9. DAC C 12 ADC 10 10. ADC C  Lectures and Tutorial questions are based on the “Embedded Programming with Field-Programmable Mixed-Signal Microcontrollers” Textbook
  • 4. 4 Course Goals  At the end of this course, you should be able to:  Understand the architecture of one of the most popular microcontroller (MCU) families  Use an integrated development environment (IDE) to program and debug an MCU  Program an MCU using Assembly and C languages  Understand and use peripherals integrated into an MCU  Interface an MCU to simple external components  Understand and use interrupts  Use timers in various modes  Communicate using a serial interface  Understand and use analog to digital converters (ADC), digital to analog converters (DAC) and comparators
  • 5. 5 Course Prerequisites  A course in Electric Circuits that includes understanding basic electronic components such as resistors, capacitors, diodes and transistors  A course in basic digital logic design that includes logic gates and Boolean arithmetic  Ability to program in a high-level programming language such as C or C++
  • 6. 6 The 8051 Architecture  Microprocessors and microcontrollers  The 8051 microcontroller: a brief history  Block diagram of the original 8051  Is 8-bit still relevant?  Harvard and von Neumann architectures  Memory organization  Special function registers
  • 7. 7 Microprocessors and Microcontrollers  Microprocessor: general-purpose CPU  Emphasis is on flexibility and performance  Generic user-interface such as keyboard, mouse, etc.  Used in a PC, PDA, cell phone, etc.  Microcontroller: microprocessor + memory on a single chip  Emphasis is on size and cost reduction  The user interface is tailored to the application, such as the buttons on a TV remote control  Used in a digital watch, TV remote control, car and many common day-to-day appliances
  • 8. 8 Terminology  Integrated Circuit (IC): A miniaturized electronic circuit that consists of semiconductor devices and passive components contained in a package  Central Processing Unit (CPU): This refers to the core of the MCU that executes code  Microcontroller Unit (MCU): This is the standard acronym used for microcontrollers, and refers to the full IC that contains the CPU and peripherals.  “n-bit” – the “n” refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time  Examples: 8-bit MCU, 32-bit MCU
  • 9. 9 Microcontroller Architectures  Microcontroller architecture refers to the internal hardware organization of a microcontroller  Each hardware architecture has its own set of software instructions called assembly language that allows programming of the microcontroller  Some of the popular microcontroller architectures  Intel 8051  Zilog Z80  Atmel AVR
  • 10. 10 The 8051 Microcontroller—A Brief History  In 1980, Intel introduced the 8051, relevant today after more than two decades  First device in the MCS-51® family of 8-bit microcontrollers  In addition to Intel there are other second source suppliers of the ICs, who make microcontrollers that are compatible with the 8051 architecture.  In recent years some companies have incorporated many different and additional features into 8051  In 2000, Silicon Laboratories introduced a field programmable, mixed-signal chip (C8051F020) based on the 8051 core CPU  This will be the platform for this course.
  • 11. 11 Is 8-bit Still Relevant?  “n-bit” – the “n” refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time  PCs with 64-bit microprocessors are becoming common  Over 55% of all processors sold per year are 8-bit processors, which comes to over 3 billion of them per year!*  8-bit microcontrollers are sufficient and cost-effective for many embedded applications  More and more advanced features and peripherals are added to 8-bit processors by various vendors  8-bit MCUs are well-suited for low-power applications that use batteries *Note: Statistics from Embedded.com Article ID# 9900861, Dec 2002
  • 12. 12 Example System: RC Car Forward Reverse Left Right Microcontroller Controls RF Transmitter Batteries Voltage Regulator Antenna Power RF Receiver Antenna Microcontroller Front Electric Motor (Left/Right) Rear Electric Motor (Fwd/Reverse) Car lights (LEDs) Batteries Voltage Regulator Power
  • 13. 13 Block Diagram of the Original 8051 Timer/Counter (Timer 0 & Timer 1) 4K byte Program Memory (ROM) 128 bytes Data Memory (RAM) I/O ports Serial Port 64 K Bus Expansion Control 8051 CPU Oscillator &Timing P3 P2 P1 P0 (Address/data) TxD RxDALE /PSEN From Crystal Oscillator or RC network /INT0 /INT1 Other interrupts T0 T1
  • 14. 14 Block Diagram of the Silicon Labs 8051
  • 15. 15 Harvard and von Neumann Architectures  Harvard Architecture—a type of computer architecture where the instructions (program code) and data are stored in separate memory spaces  Example: Intel 8051 architecture  von Neumann Architecture—another type of computer architecture where the instructions and data are stored in the same memory space  Example: Intel x86 architecture (Intel Pentium, AMD Athlon, etc.)
  • 16. 16 MCU Fetch-Execute Cycle  Fetch operation—retrieves an instruction from the location in code memory pointed to by the program counter (PC)  Execute operation— executes the instruction that was fetched during the fetch operation. In addition to executing the instruction, the CPU also adds the appropriate number to the PC to point it to the next instruction to be fetched. Program Counter (PC) Code Memory F e t c h CPU + To other peripherals
  • 17. 17 8051 and 8052  The feature set of the 8052 is the superset of the 8051  In addition to all the features of the 8051, the 8052 includes  128 bytes internal RAM (total of 256 bytes)  A third 16-bit timer, with new modes of operation  Additional SFRs to support the third timer  The Silicon Labs C8051F020 builds upon the 8052, and adds further features  The term “8051” is typically used in place of “8052”, and also refers to the 8051 architecture
  • 18. 18 C8051F020 Data Memory (RAM)  Internal Data Memory space is divided into three sections  Lower 128  Upper 128  Special function register (SFR)  There are 384 bytes of memory space physically, though the Upper 128 and SFRs share the same addresses from location 80H to FFH.  Appropriate instructions should be used to access each memory block
  • 19. 19 Lower 128—Register Banks and RAM Bit-addressable Area (16 bytes) Register Banks (8 bytes per bank; 4 banks) General Purpose RAM (80 bytes)
  • 20. 20 Special Function Registers (SFRs)  SFRs provide control and data exchange with the microcontroller’s resources and peripherals  Registers which have their byte addresses ending with 0H or 8H are byte- as well as bit- addressable  Some registers are not bit- addressable. These include the stack pointer (SP) and data pointer register (DPTR)
  • 21. 21 Summary of SFRs  Accumulator (ACC) and B register  ACC (also referred to as A) is used implicitly by several instructions  B is used implicitly in multiply and divide operations  These registers are the input/output of the arithmetic and logic unit (ALU)  Program status word—PSW  Shows the status of arithmetic and logical operations using multiple bits such as Carry  Selects the Register Bank (Bank 0 - Bank 3)  Stack pointer—SP  Data pointer—DPTR (DPH and DPL)  16-bit register used to access external code or data memory  Timer Registers—TH0, TL0, TH1, TL1, TMOD, TCON  Used for timing intervals or counting events  Parallel I/O Port Registers—P0, P1, P2 and P3  Serial Communication Registers—SBUF and SCON  Interrupt Management Registers—IP and IE  Power Control Register—PCON