38
MICROPROCESSOR SYSTEM DESIGN COURSE INTRODUCTION 1 Muhammad Amir Yousaf

MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MICROPROCESSOR

SYSTEM DESIGN

COURSE

INTRODUCTION

1 Muhammad Amir Yousaf

Page 2: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

2 Muhammad Amir Yousaf

Introduction

Micro-controllers History of

Computer

Course Aims?

Course contents?

Invisible

computing

MICROPROCESSOR SYSTEM

DESIGN ET011G

Page 3: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

EARLY COMPUTATION DEVICES

History

3 Muhammad Amir Yousaf

Abacus: The abacus was an

early aid for mathematical

computations.

The period 2700-2300 BC

saw the first appearance

in Sumerian civilisation

It aids the memory of the human

performing the calculation.

Greek historian mentioned the

use of Abacus in ancient Egypt Achaemenid Persian

Empire, around 600 BC

Page 4: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

EARLY COMPUTATION DEVICES

History

4 Muhammad Amir Yousaf

In 1632 a slide rule was build using the Napier’s Log table. It was still in use until 1960 by NASA engineers of Apollo program.

John Napier invented

Logarithms in 1617 that

allows multiplication to be

performed via additions

Page 5: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

HUMAN COMPUTERS

History

‘Human computers’ performing repetitive computing to compute navigational tables, tide

charts, and planetary positions for astronomical almanacs.

5 Muhammad Amir Yousaf

The term "computer", in use

from the mid 17th century.

The approach was taken

for astronomical and other

complex calculations.

Human computers have

played integral roles in

the World War II

Page 6: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MECHANICAL COMPUTERS

History

6 Muhammad Amir Yousaf

Blaise Pascal (19) invented

Pascaline in 1642 for his tax

collector father. Still the

mechanical odometers use the

Pascaline’s mechanism to

increment the next wheel after each

revolution of prior wheel. Step Reckoner : It was the first

calculator that could perform all

four arithmetic operations:

addition, subtraction,

multiplication and division.

Page 7: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

PUNCH CARD COMPUTERS

History

7 Muhammad Amir Yousaf

1801, Joseph Marie

Jacquard introduced

wooden punch cards

to feed pattern to power

looms that could weave

fabric and print design

on it.

This punched card idea

was later used in many

mechanical computers

A punched card is a piece of stiff

paper that contains digital

information represented by the

presence or absence of holes in

predefined positions.

Page 8: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MECHANICAL COMPUTERS

History

Charles Babbage embarked on an ambitious venture to design and build mechanical calculating engines.

Middle decades of 19th century…..times of unprecedented engineering ambitions.

Steam engines had started powering up.

8 Muhammad Amir Yousaf

'I wish to God these calculations had been

executed by steam'

Page 9: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MECHANICAL COMPUTERS

History

Charles Babbage embarked on an ambitious venture to design and build mechanical calculating engines.

9 Muhammad Amir Yousaf

Babbage came with another idea Analytic Machine power by 6 steam engines.

It was programmable with punch cards used to feed instructions and also to store data.

Difference Engine was the first idea

that would compute logarithm tables

but never completed .

Page 10: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MECHANICAL COMPUTERS

History

Herman Hollerith invented a counting machine called Hollerith desk for 1890 US census. The machine was build using the Jacquard’s punched cards and Pascal's gear wheel technologies.

Hollerith build a company, the Tabulating Machine Company which eventually became the International Business Machines (IBM)

10 Muhammad Amir Yousaf

Page 11: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

ELECTRO-MECHANICAL COMPUTERS

History

Mark I was first programmable digital computer made by a partnership b/w Harvard and IBM in 1944 to perform military job.

It was not purely electronic but was constructed out of relays, rotating shafts and clutches.

11 Muhammad Amir Yousaf

WW-II, Precise calculation for shell trajectory was required

Page 12: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

ELECTRONIC COMPUTERS

History

Then the microelectronic revolution allowed the things to change in the way we have today.

Apple I came as a home computer in 1976.

12 Muhammad Amir Yousaf

Designed and hand-built by

Steve Jobs and Steve

Wozniak, the Apple I was

Apple's first product, and went

on sale in July 1976.

It was the first commercially

successful home computer to

feature both a mouse-based

input system, as well as an

easy-to-use graphical user

interface.

Page 13: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COMPUTER IN ELECTRONIC AGE

History

History of electronic computer development is divided into 5 generations.

1st Generation: Vacuum Tube Computers

2nd Generation: Transistor Computers

3rd Generation: Integrated IC

4th Generation: VLSI (processors)

13 Muhammad Amir Yousaf

Major changes occur in the areas:

Size, Cost, Efficiency, Reliability

Page 14: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

1ST GENERATION: VACUUM TUBES

History

1906 Lee de Forest invents the vacuum tube that could amplify and switch voltage level.

1945, ENIAC, Electronic Numerical Integrator and Calculator was the first vacuum tube computer designed by Eckert and Mauchly.

Programmable with punched cards and tape

Much faster than Mark I as there was no mechanical moving part.

Mark I takes 6 seconds for multiplications whereas it takes only 2.8 thousandth of a second.

14 Muhammad Amir Yousaf

Page 15: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

1ST GENERATION: VACUUM TUBES

1940S-1956

History

1951, The two guys of ENIAC teamed up with John Von Neumann

to design EDVAC, which pioneered the stored program computer.

Neumann was first to give stored program computer architecture that is still in use in most modern computers with some modifications.

15 Muhammad Amir Yousaf

Vacuum Tube technology was:

Much faster than mechanical computers

Expensive

Bulky

Power Hungry

Un-reliable

Punched cards, paper tape, magnetic drum memories.

Page 16: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

2ND GENERATION: TRANSISTORS

1956-1963

History

Transistors allowed 2nd generation computers to be:

Smaller in size.

Faster in speed.

Reliable

Energy efficient.

16 Muhammad Amir Yousaf

1947, Transistors invented in Bell Labs. Transistors replaced vacuum tubes in 2nd generation computers.

Magnetic core technology was

used for memory. Instructions were

stored in memory.

Computers moved to assembly

language and high level languages

e.g. FORTRAN and COBOL were

used for instructions.

Page 17: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

3RD GENERATION: INTEGRATED CIRCUITS

1964- 1971

History

Integrated circuit technology was developed that

allowed integration of several transistors on a silicon chip.

It drastically increased the speed and efficiency of 3rd generation computers while reducing the size. The change was ‘revolutionary’.

The use of operating system allowed several applications running on same time.

The reduction in size and cost due to IC technology had made it accessible to mass users.

17 Muhammad Amir Yousaf

Altair 1975

Page 18: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

4TH GENERATION: VLSI

1971 TO PRESENT

History

Very Large Scale Integration (VLSI), thousands of ICs on

same chip made it possible to develop entire processor on

single chip.

Intel 4004 processor chip, 1971

CPU, memory to I/O control on same chip.

4-bits

IBM introduced home computer, 1981

Apple introduced the Macintosh, 1984

Personal computers

Desktops, laptops, Netbooks, Pads and tablets

18 Muhammad Amir Yousaf

Page 19: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COMPUTERS PAST PRESENT FUTURE

History

Up to 1970s

Computers up to 1970s were very large

objects, called mainframes.

Difficult to maintain.

Expensive

Require specialized cooling infrastructure.

Only in Research labs

19 Muhammad Amir Yousaf

Page 20: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COMPUTERS PAST PRESENT FUTURE

History

Multi to one relations

After 1971

Intel’s 4004 (1971), mainframe built on to a chip.

Computing became cheaper, robust, portable.

Personal computers, Every one started having one’s own.

‘Many to one’ relation changes to ‘One to One’

20 Muhammad Amir Yousaf

Page 21: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COMPUTERS PAST PRESENT FUTURE

History

Where it would lead to in future

Computing would be distributed in physical space.

Invisible but everywhere around us, Mark Weiser (1990)

In woodworks around us even in the clothing.

Embedded, wireless, invisible

Interfaces.? Gestural, voice

21 Muhammad Amir Yousaf

Page 22: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

Invisible but everywhere around us

Future

Computing away from mainframe and

desktop computers.

In the smaller computing engines

ubiquitously spread in physical space.

22 Muhammad Amir Yousaf

Microcontrollers…….Smaller

computing engines

Page 23: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

Invisible but everywhere around us

Future

New areas computers getting in

23 Muhammad Amir Yousaf

Paper 4, Touch sensitive printed

surface with printed speakers

http://mkv.itm.miun.se/projekt/paperfour/

Page 24: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MICROPROCESSOR SYSTEM

DESIGN?

Motivation

24 Muhammad Amir Yousaf

Page 25: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

MICROPROCESSOR SYSTEM

DESIGN?

Motivation

To be a system designer and analyst:

Knowledge of programming languages for efficient software design.

General knowledge of modern technologies.

Sensing

Computing

Communicating

25 Muhammad Amir Yousaf

Page 26: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

26 Muhammad Amir Yousaf

MICROPROCESSOR SYSTEM DESIGN

ET032G

Labs & Lectures:

Muhammad Amir Yousaf

S- Building 241-F

060148748 http://apachepersonal.miun.se/~amiyou/

Email: [email protected]

Page 27: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COURSE AIM

Aims:

The course aims to provide a basic

understanding of how microcomputers are

constructed and how they are used.

A solid Foundation:

27 Muhammad Amir Yousaf

In-depth knowledge of computer

architecture.

For design, debug and testing.

Page 28: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COURSE AIM

Student will learn to design an electronic

system into a modern microprocessor and get

the skills to program a modern

microprocessor.

Microcomputer interaction with external devices

General knowledge of modern technologies.

28 Muhammad Amir Yousaf

Page 29: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LEARNING OBJECTIVES After successful completion of the course students should learn Basic microcomputer architecture: how a micro-computer is built and functioning . how to design a simple electronic systems on a microcomputer Programming in C how to handle a development environment for a microcomputer how to write simpler program and functions in a microcomputer using C. be able to write and include inline assembler of short code fragments I/O handling, synchronization to read information from the outside world, process it and then influence its surrounding. to handle both analog and digital signals to / from micro-computer. use interrupt and polling to synchronize program execution to the outside world. link microcomputer with other devices through standard interface such as SPI, I2C, UART and USB.

29 Muhammad Amir Yousaf

Page 30: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

COURSE CONTENTS

30 Muhammad Amir Yousaf

The course is divided into three parts with the following content

Basic microcomputer architecture

Von Neumann architectures

Assembly programming

Overview of state-of-the-art architectures

Programming in C

Structured Programming in C

Inline assembler

I/O management

Read/write data from/to outside world

A/D - D/A converters

Memory architectures

Synchronization via interrupt and polling

Interface to the SPI (e.g. memory cards), I2C, UART, USB

communication

Page 31: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LECTURE PLAN

31 Muhammad Amir Yousaf

Introduction to Course: Computer History

Course Plan, Aims and Goals

Course Contents.

Von Neumann Architecture

Von Neumann Architecture

Harvard Architecture

Lecture 1: Addressing Modes Data Representation.

Lecture2: Microprocessor Programming

Problem definition

Program design goals

Program development

Embedded C

Page 32: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LECTURE PLAN

32 Muhammad Amir Yousaf

Lecture 3: Microprocessor Programming II

Embedded C

Pointers, Array, Structures

Memory Management

Lecture4: Architecture of X-mega micro-controller

Lecture5: IO Handling Communication with external world

Communication models

Overview of serial and parallel protocols

Page 33: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LECTURE PLAN

33 Muhammad Amir Yousaf

Lecture6: IO Handling II SPI

I2C

USART

Lecture 7: Inline Assembly

Why Assembly?

Basic Instructions.

Mixing Assembly and C

Lecture8: Memory

Registers

Memory Type

Memory configurations

Page 34: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LABS AND EXERCISES

34 Muhammad Amir Yousaf

Microcontroller Educational Platform:

Atmel ATxmega128B1 microcontroller

4x40 transflective LCD module with backlight

Transfer data over the USB full/low speed device interface

Read a light sensor with the ADC

Read a temperature sensor with the ADC

Measure external voltage input with ADC

Measure potentiometer voltage with ADC

Read status of the 4 Atmel QTouch® buttons from

AT42QT1040 QTouch device

4 LEDs to show status information

Read/write data to the 64Mbit Atmel DataFlash

Program the kit via USB bootloader or an Atmel programmer

Expand the board with Xplained top modules

Page 35: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LABS AND EXERCISES

35 Muhammad Amir Yousaf

Programming Environment:

AVR Studio 6

Labs

Lab1:

Literature reading i.e. Datasheets and getting started

tutorials

Getting started with AVR Studio 6

AVR simulator to visualize the data flow within registers

to get deeper idea of architecture

Digital IOs, LEDs and Switches

Lab2: IO Handling

Page 36: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

LABS AND EXERCISES

36 Muhammad Amir Yousaf

Programming Environment:

AVR Studio 6

Labs

Lab3: Inline assembly

Interrupts

More robust applications

Page 37: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

EXAMINATION AND GRADING

SYSTEM

37 Muhammad Amir Yousaf

A written exam will be held 22nd March 2013

Examination form

3.0 credits, T106: Exam

Grades: A, B, C, D, E, Fx and F. A-E are

passed and Fx and F are failed.

3.0 credits, L106: Laboratory

Grades: Pass (P) or Fail (F)

1.5 credits, I106: Assignment, Project

Grades: Pass (P) or Fail (F)

Page 38: MICROPROCESSOR SYSTEM DESIGNapachepersonal.miun.se/~amiyou/micro/intro.pdfSYSTEM DESIGN COURSE INTRODUCTION Muhammad Amir Yousaf 1 . Muhammad Amir Yousaf 2 Introduction History of

38 Muhammad Amir Yousaf

oBreak