32
Microprocessor & interfacing Lecture 1

Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Microprocessor & interfacing

Lecture 1

Page 2: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

OUTLINE

• Introduction

• History

• Basic Computer Architecture

• Number System & Basic Operation

• Data Format

Page 3: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

INTRODUCTION

Page 4: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Present Day?

Many Devices Around us!!

Page 5: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Future??

Page 6: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

How About This?

1 2

Page 7: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Our Contract

• Grade Components – Mid Exam 35-40%

– Final Exam 35-40%

– Homework & Quiz 20-30%

• Rules – 15 minutes max retardation or get out!

– Max absence 25% or E!

• Class Contents • 100 min lecture

• 50 min discussion / exercise

Page 8: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

HISTORY

Page 9: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

1’st Period

• Mechanical Age – Abacus : 500 BC – Gears + Wheels Calculator : by Pascal

• Electrical Age – Hollerith machine(1889):12-bit code on punched card

– ENIAC(Electronics Numerical Integrator and Calculator) :

• 1946, Moore school of EE at Univ. of Pennsylvania

• first general-purpose, programmable electronic computer

• 17,000 vacuum tube, 500 miles of wire, 6000 switches

• about 100,000 operations per second, 30 tons

• hardware programmable : rewiring, switching

• life of vacuum tube(3000 hours) : maintenance

Page 10: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

2’nd Period

• Bipolar Transistor : 1948 by William Shockley, John Bardeen,

Walter H. Brattain at Bell labs(1956, Novel physics award)

• 2nd-Generation Computer : TR

– IBM : 7070/7090(1958), 1401(1959)

– mainframe : describe CPU portion of computer

– mainframe computer : designed to handle large volumes of data

while serving hundreds of users simultaneously

– built on circuit boards mounted into rack panels(frame)

Page 11: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

3’rd Period

• Integrated Circuit : 1958 by Jack Kilby of Texas Instruments and Dr. Robert Noyce of Fairchild Semiconductor

• digital IC(RTL, register-to-transistor logic) : in the 1960s

• 3rd-Generation Computer : IC – IBM : 32-bit 360 series(1964)

• minicomputer : low-cost, scaled-down mainframe – DEC : PDP-8(Programmed Data Processor)

• INTEL(Integrated Electronics) : 1968 – Robert Noyce and Gorden Moore

– 4000 family : 1971.11.15

• 4001 : 2K ROM with 4-bit I/O port

• 4002 : 320-bit RAM with 4-bit output port

• 4003 : 10-bit serial-in parallel-out shift register

• 4004 : 4-bit processor

Page 12: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Modern Processor

Page 13: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Family Features Cache MIPS @ MHz ARM1

ARM2 Multiply 4 MIPS @ 8 MHz

ARM3 4 kB 12 MIPS @ 25 MHz

ARM6 32 bit addressing 4 kB 17 MIPS @ 20 MHz

ARM7 8 kB 40 MHz

ARM7TDMI 8 kB 60 MIPS @ 59 MHz

Strong ARM 16 kB 203 MHz

ARM8 5 stage pipeline 8 kB 84 MIPS @ 72 MHz

statis branch prediction

double bandwith mem

ARM9TDMI 16 kB 200 MIPS @ 180 MHz

ARM9E DSP instructions enhanced 220 MIPS @ 200 MHz

ARM10E

X Scale

ARM11

Cortex Cortex A8

Cortex A9

Cortex R4

Cortex M3

Cortex M0

Cortex M1

Page 14: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

BASIC COMPUTER ARCHITECTURE

Page 15: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Computer System

I/O system Processor

Compiler

Operating

System

(Windows XP)

Application (Netscape)

Digital Design

Circuit Design

Instruction Set Architecture

Datapath & Control

transistors

Memory Hardware

Software Assembler

What are inside your computer?

Page 16: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Computer System

Page 17: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Microprocessor Structure

Page 18: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

ALU?

• Arithmetic Operations (+ - x / )

• Logic Operations (and, or, not, etc)

• There’s an Accumulator!

A B

n n

+ - x / logic

Accumulator

Page 19: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Flags

• An effect of operation

• To give an information for the next execution

Zero, Carry, Overflow, Borrow, Aux. Carry

Page 20: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM
Page 21: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

NUMBER SYSTEM

Page 22: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

A Review

Decimal Binary Binary

8 bit

Binary

16 bit

Binary

20 bit

Hexa Common Annotation

59

FF

1 k

32k

64 k

1 M

0011 1111 1111 1111

- 96

0111 1111 1111 1111 1111

3FF

Page 23: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Sign and Unsign Number

• Unsign number Positive Only!!

– 8 bit (00000000 -- 11111111) to define 0 to 255)

– 16 bit (0000000000000000 -- 11111111111111) to determine 0 to 65535

• Sign number MSB as + (0) and – (1)

– 8 bit (00000000 -- 01111111) to define 0 to 127 and (11111111 -- 10000000) to determine -1 to -128

– 16 bit (0000000000000000 -- 01111111111111) to define 0 to 32767 and (1111111111111111 -- 1000000000000000) to determine -1 to -32768

Page 24: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Floating Point

S EXP exc127

Mantisa Biner

1 10000000 111000000000000000000000 - 1.111 x 21

0 10000010 000101000000000000000000 1000.101

0 01111111 000000100000000000000000 1.0000001

1 01111110 101010000000000000000000 -1.10101 2-1

0 00000000 00000000000000000000000 0.0

Page 25: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Let’s Try!

1) 216d = ….b = ….h

2) 10101110b = ….d = ….h

3) -107d = ….b = ….h

• S exp exc127 mantisa

5) 1 10000110 101100000000000000000000

6) 0 10000001 000011000000000000000000

7) 12 kB Address from …………. To ……………..

Page 26: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

Computer Data Formats

Page 27: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

There’re Some Format

• ASCII

• BCD

• signed and unsigned integer

• real

Page 28: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

ASCII #1

• ASCII(American Standard Code for Information Interchange)

– Alphanumeric character, 7-bit code

Page 29: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

ASCII #2

• 8-bit ASCII code = parity bit + 7-bit ASCII

• extended ASCII character set

– some foreign letters and punctuation, Greek characters, mathematical characters, box-drawing characters, and other special characters

Page 30: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

ASCII #3

• Unicode (16-bit) : windows-based application

– 0000H~00FFH : standard ASCII code

– 0100H~FFFFH : all world-wide character sets

• ASCII data : by using special directive

– Define Byte(s):DB, BYTE – surrounded by apostrophes(‘)

Page 31: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM

BCD (Binary-Coded Decimal)

• packed BCD data : stored as two digits per byte

• unpacked BCD : stored as one digit per byte

Page 32: Microprocessor & interfacing · Mikroprosesor & Antarmuka Keywords: ALU Accumulator i8088 Created Date: 8/25/2016 11:27:40 AM