17-07-2012, 01:11 PM
EE-219 Microprocessor and Digital Systems
ee219-Lecture1.pdf (Size: 347.44 KB / Downloads: 30)
Course Introduction
EE-219 Microprocessor and Digital Systems
4 Credit Hours
Theory 2
Lab 2
Instructor
Lecturer Sidrah Liaqat
Lab
Elec II + Computing Lab
Lab Engineer: Farooq
3
Webpage
sites.googlesite/ee219spring2012
Lecture Notes, Assignments, Grading Announcements and
other relevant documents will be available to the
students through this website
4
Course Outline
Week Topic
1 Introduction
2
8051Microcontroller
• Introduction and Architecture
3 • Assembler Directives, Assembly Programming
4 • Arithmetic and Logical Instructions
5 • Assembly Program Flow Control
6 • Timers and Counters
7 • Serial Port
8 • Interrups
9
• Programming 8051 in C
10 • Design and Interface Examples
11-16 • Microprocessors
5
Books
8051 Microcontroller
I. Scott Mackenzie and R.C. Phan, “The 8051 Microcontroller”,
Fourth Edition, Pearson Education 2007
Muhammad Ali Mazidi and J. G. Mazidi, “The 8051 Microcontroller
and Embedded Systems”, Pearson Education 2006
Books available on the website in e-book form.
6
Projects
Projects
Students will make hardware in groups of upto 2 students (only)
Only PCBs are acceptable.
Documentation is compulsory
Students who don’t perform all the required lab tasks and
assignments will not be considered to have passed the lab,
hence the course – Practical work carries very significant
weightage
Final project
Can be done in groups of 3 – 4 students
Assignments
Individual (no grouping allowed)
Submission of copied code will be strictly dealt with!!
7
Projects
No. Description Deadline
Percentage
(out of 8051 part)
8051
0 Generic Board Week 03 -
1 Peripherals project # 1 Week 05 -
2 Peripherals project # 2 Week 07 -
3 Interface Project Week 10 -
8
Tutorials
Tough and demanding course with much information
Use the lab time effectively in taking care of all your
queries
Students are welcome to discuss queries any time other
than lab time as well –
E-mail most effective method
9
Prerequisites
Number Systems
Binary
Decimal
Hexadecimal
Electronics
Basic concepts
DLD
Logical Gates
Multiplexer, De-multiplexer
Encoder, Decoder
Basic Concepts
Computer Programming
C
Basic Concepts
Clear and practice these topics before this course
10
Introduction
What is a Computer?
Computer
Device capable of
Performing computations
Making Logical Decisions
Works billions of times faster than human beings
12
Introduction
What is a Computer?
Programs
Set of instructions that process data
Guide computer through orderly sets of actions specified by
“Programmer”
Computer System
Consists of various hardware devices
Keyboard
Screen
Disks
Memory
Processing Units
13
Introduction
Computer
Inputs
RAM
Outputs
Central Processing
Unit
ROM
ALU
14
Introduction
Every computer consists of
1. Input Unit
Receiving section of computer
Gets data from input devices e.g. Keyboard, Mouse etc
2. Output Unit
Puts information on various output devices
¨ Monitors
¨ Printouts
¨ Speakers
15
Introduction
Every computer consists of
3. Central Processing Unit (CPU)
Administrative section of computer
Supervises other sections
4. Arithmetic Logic Unit (ALU)
Performs calculations (addition, subtraction, multiplication and
division)
Can make decisions and comparisons
16
Introduction
Every computer consists of
5. Memory Unit
Rapid access, Fast
Temporarily retains information; lost when powered off
Also called Memory, Primary Memory or Random Access Memory
(RAM)
6. Secondary Storage Units
Long-term high capacity storage
Stores programs Or data not currently being used
Hard drives, Disks, CDs etc
Slower than primary memory
17
Introduction
Computer Architecture
Von Neumann Vs Harvard
Instruction = Program / Code
Data = Information being used
RISC Vs CISC
Instruction Set = Set of Instructions (low level) that CPU can process
18
Von Neumann Architecture
A single memory has
DATA: the information being used
Instructions: Program to be executed
A single Bus connects CPU with the memory
At a time, either Instruction can be read OR data can be read
or written
2 cycles complete an
instruction
1st : Read instruction
2nd : Read/Write Data
19 Image courtesy Dr. Javaid
Harvard Architecture
Separate Memories for
DATA: the information being used
Instructions: Program to be executed
Separate Buses connects CPU with the memory
When an instruction is being executed, data for next
instruction is fetched,
known as Pipelining.
20 Image courtesy Dr. Javaid
Von Neumann Harvard
Same memory keeps Data
and Instructions
Separate memories for data
and instructions
A single bus connects CPU
with memory
At a time, either reading
an instruction OR reading
/ writing data
Two buses between memory
and CPU
Reading / Writing memory
and reading an Instruction
can be done simultaneously
21
CISC
Complex Instruction Set Computer
Instruction Set is set of all Instructions (low level Commands)
that CPU can execute
Primary goal of CISC Architecture is to complete task in as few
lines of assembly as possible
Processor that understands and performs series of actions for
each assembly command
Instructions may be variable in length
22
RISC
Reduced Instruction Set Computer
Compact Uniform instructions
Reduces chip complexity by using simpler instructions
Few types of instructions to operate at high speed
Requires more RAM
Has become more popular due to decreasing RAM cost
23
CISC RISC
Large Instruction set Small and Compact
Instruction set
Less lines of code More lines of Code
Variable length of
instructions
Complex architecture
Uniform length of
instructions
Simple architecture
24
Programming Languages
Programming Language: A set of rules, symbols and
special words used to construct a computer program
High Level Language
A computer language that is more intuitive to the humans. Closer to
plain English
Low Level (Assembly Language)
In which a mnemonic is used to represent each machine language
instruction
Machine Language
The binary representation of instructions a computer can perform
25
High Level Languages
Single statements accomplish substantial tasks
Translated to machine language
Compilers convert to machine language
Conversion takes much time
Instructions comprehensible to humans
Looks mostly like general English
Contains common mathematical notations
26
Low Level (Assembly Language)
English-like abbreviations
Represent basic operations of computer
Translated to machine language
Assemblers convert to machine language
High speed conversion
Easier for human interpretation as compared to Machine
language
Still tedious and difficult
Many instructions for simple tasks
These problems led to High Level languages
27
Machine Language
Only language understood directly by computer
Defined by computer’s hardware design
Machine-dependent
Difficult to understand for human readers
Ultimately reduced binary code i.e. 0s and 1s
Slow, tedious and error prone
Led to assembly language
28
Assembly is a Low Level Language
High Level
FORTRAN
Pascal
COBOL
BASIC
Middle Level
Low Level
C++
C
Assembly
29
Programmer’s Model of Computer
It does not matter whether the machine is
microprocessor / microcontroller based or a larger
machine
Programmers see the computer as having 3
characteristics
Address Space
Registers
Instruction Set
30
Address Space
Address Space is set of storage locations, each of which
has an Address
The size of Address Space is defined by number of bits the
computer uses to form an address
A machine that uses 8 bits for address can access at most
28 = 256 locations