17
1 Introduction to 205335 Microprocessor Course Description Microprocessor architecture, data types, addressing modes, instructions, register organization, interrupts, memory management, interfacing the peripherals, data communication and networks, coprocessor, multiprogramming and multitasking, microprocessor applications, introduction to microcomputer design.

1-Introduction to Microprocessor

Embed Size (px)

Citation preview

Page 1: 1-Introduction to Microprocessor

1

Introduction to 205335 Microprocessor

Course Description

Microprocessor architecture, data types, addressing modes, instructions, register organization, interrupts, memory management, interfacing the peripherals, data communication and networks, coprocessor, multiprogramming and multitasking, microprocessor applications, introduction to microcomputer design.

Page 2: 1-Introduction to Microprocessor

2

Introduction to 205335 Microprocessor

Points

- Home Work and Quiz 20% (6 times +)- Project 20% (4 times)- Midterm 30%- Final 30%

Introduction to 205335 Microprocessor

Project (1-2 peoples)

1. Hardware2. LED, 7-Segment, Button3. Counter4. Clock

-PCB + Some items (Free from KU)-Price approx 500 bath

-“first come first serve”.

Page 3: 1-Introduction to Microprocessor

3

Introduction to 205335 Microprocessor

Software

1. ASM-512. SDCC (C language) or KEIL 3. Flash Magic4. Protel (PCB Design)

What is a “Microprocessor”?

A microprocessor is a programmable digital electronic component that incorporates the functions of a central processing unit (CPU) on a single semiconductor integrated circuit (IC).

The microprocessor was born by reducing the word size of the CPU from32 bits to 4 bits, so that the transistors of its logic circuits would fit onto a single part.One or more microprocessors typically serve as the CPU in a computer system

, embedded system, or handheld device.

Page 4: 1-Introduction to Microprocessor

4

What is the first “Microprocessor”?

There are 3 microprocessor developed and finished in the same period but the first commercial microprocessor is developed and released by Intel. The first Microprocessor is 4004. It is a 4 bit microprocessor that is released on November 15, 1971, developed by Federico Faggin and Marcian Hoff.

Timeline

After the first microprocessor is released, Intel released the first 8-bitsmicroprocessor, 8008 in 1972. This microprocessor architecture is a precursor to the mostsuccessful 8080 microprocessor that released in 1974. In the same year, Motorola also released the 6800 series microprocessor. Zilog Company, which is established by Marcian Hoff, released the Z80 microprocessor in 1976.

The first single-chip 16-bit microprocessor was TI's TMS 9900, which was alsocompatible with their TI-990 line of minicomputers. The 9900 was used in the TI 990/4

minicomputer, the TI-99/4A home computer, and the TM990 line of OEM microcomputerboards.

Page 5: 1-Introduction to Microprocessor

5

Timeline

Intel followed a different path, having no minicomputers to emulate, and instead"upsized" their 8080 design into the 16-bit Intel 8086, the first member of the x86 family which powers most modern PC type computers. Intel introduced the 8086 as a cost effectiveway of porting software from the 8080 lines, and succeeded in winning much business on

that premise. The 8088, a version of the 8086 that used an external 8-bit data bus, was themicroprocessor in the first IBM PC, the model 5150. Following up their 8086 and 8088,Intel released the 80186, 80286 and, in 1985, the 32-bit 80386, cementing their PC market

dominance with the processor family's backwards compatibility.The integrated microprocessormemory management unit (MMU) was developed by Childs et al. of Intel

Timeline

While 64-bit microprocessor designs have been in use in several markets since the early 1990s, the early 2000s have seen the introduction of 64-bit microchips targeted at the PC market. With AMD's introduction of the first 64-bit IA-32 backwards-compatible architecture, AMD64, in September 2003, followed by Intel's own x86-64 chips, the 64-bitdesktop era began.Both processors can run 32-bit legacy apps as well as the new 64-bitsoftware. With 64-bit Windows XP, Windows vista x64, Linux and Mac OS X that run64-bit native, the software too is geared to utilize the full power of such processors.

Page 6: 1-Introduction to Microprocessor

6

Timeline

What is a “Microcontroller”?

A microcontroller (or MCU) is a computer-on-a-chip. It is a type of microprocessor emphasizing self-sufficiency and cost-effectiveness, in contrastto a general-purpose microprocessor (the kind used in a PC). In addition to allarithmetic and logic elements of a general purpose microprocessor,

the microcontroller usually also integrates additional elements such as read-onlyand read-write memory, and input/output interfaces.

Microcontrollers are frequently used in automatically controlled products and devices, such as automobile engine control systems, office machines, appliances,power tools, and toys. By reducing the size, cost, and power consumption compared to

a design using a separate microprocessor, memory, and input/output devices,microcontrollers make it economical to electronically control many more processes.

Page 7: 1-Introduction to Microprocessor

7

What is a Digital Signal Processor (DSP)

Digital Signal Processor (DSP) is a specialized microprocessor designed specifically for digital signal processing, generally in real-time computing.

- Designed for real-time processing - Optimum performance with streaming data - Separate program and data memories (Harvard architecture) - Special Instructions for SIMD (Single Instruction, Multiple Data) operations - The ability to act as a direct memory access device if in a host environment - Processes digital signals converted (using an Analog-to-digital converter (ADC))

from analog signals. Output is then converted back to analog form using a Digital-to-analog converter (DAC)

What is an Embedded system

In contrast, a general-purpose computer, such as a personal computer, can do many different tasks depending on programming. Since the embedded system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product, or increasing the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants.

Embedded system is a special-purpose computer system designed to perform one ora few dedicated functions, sometimes with real-time computing constraints. It is usuallyembedded as part of a complete device including hardware and mechanical parts.

Page 8: 1-Introduction to Microprocessor

8

Where you can find microprocessor/controller ?

Where you can find microprocessor/controller ?

Page 9: 1-Introduction to Microprocessor

9

How can “Microprocessor” work ?

In order to make a microprocessor work, ROM, RAM and I/O is needed. microprocessor by itself alone cannot perform any command because a microprocessordon’t have memory inside. The microprocessor system contains

1. Microprocessor (works as CPU)2. Memories3. I/O Device and Peripheral

They are connected by the “BUS SYSTEM” and the bus system can be separated into

- Address bus- Data bus- Control bus

ROM RAM I/O Peripheral

CPU

Address Bus

Data Bus

Control Bus

How can “Microprocessor” work ?

Microprocessor works in 2 steps:

1. Fetch Instruction (Read an instruction code from a Memory)2. Execute Instruction (Work on that particular command)

Since a microprocessor is a digital device then a microprocessor work on abinary system (0, 1 or On, Off).

Fetch ExecuteMemory

Memory

Register

I/O Unit

Page 10: 1-Introduction to Microprocessor

10

CPU

CPU consists of

1. Registers2. Arithmetic and Logic Unit (ALU)3. Instruction Decode and Control Unit4. Instruction Register (IR)5. Program Counter (PC)

IR

DecodeControl Registers

PC

Address busData bus

Control bus

ALU

Sequence of Fetch

1. Program Counter (PC) Fetch by sending its address into the address bus.2. Control unit sends “Read” command to control bus .3. Memory after get the address and “Read” command, it send

the instruction data from that specific address to data bus.4. Instruction Register (IR) get that instruction from data bus.5. Decode Unit read the instruction in IR and ‘Execute’ that instruction.6. Program Counter (PC) increase its own address in order to ready

for the next Fetch.

Page 11: 1-Introduction to Microprocessor

11

Bus System

Bus system in the microprocessor unit is separated into 3 category:

Address bus : used to specific the location of instruction, data, and I/O unit. Address bus is an unidirectional bus because the address come from CPU only. Address bus is different in each system depended on bits of the CPU. If CPU isan n-bits microprocessor then the total addresses that can refer to is addressesn2

25628 =

KBytex 6422536,652 10616 ===

Kbyte1024,1210 ==

Mbyte1576,048,1220 ==

Bus System

Data bus : used to transfer data to memory, and to I/O unit. Address bus is abidirectional bus because the data come both in and out from CPU.

Control bus : control signal in the control bus are timing signals that are used to synchronize external devices that are connected to CPU. The control signal will synchronize the address and data bus. The control bus consists of Clock, Read,Write, Interrupts and other signal depended on the CPU architecture.

Page 12: 1-Introduction to Microprocessor

12

Input / Output Unit

I/O unit , Peripherals are devices that extended from CPU (not includeMemory). This unit is used to interface the microprocessor system to user

,to mass storage and to control/monitor system.

Mass storage can be separated to archival and online storage. Online storageis magnetic disk or “Hard Disk” while archival storage is magnetic tape and floppy disk. Online storage is a mass storage that CPU can always access theinformation when CPU needs, but archival storage is a storage that user have to prepare for microprocessor and tell CPU to access it.

Input / Output Unit

User Interface is a monitor, mouse, printer, keyboard, etc. some of these deviceare bidirectional devices such as touch screen monitor. Others are one direction Devices such as mouse is an input device, speaker is an output device.

Control/Monitor devices are the devices that are used to control or measure some devices for example control relay that use to drive motor, measuretemperatures.

Page 13: 1-Introduction to Microprocessor

13

Software

In order to make the microprocessor unit works as design, software is needed.Microprocessor software can be separated into 3 hierarchies.

Hardware

Input/Output Subroutine(Directly Access to Hardware)

Operating System(Command language, Utilities)

Software Application( User Interface)

Software

Input/Output Subroutine is the lowest level that controls the input and output of the hardware directly. Example, read the input from keyboard, Display data to a monitor, etc. Input/Output Subroutine is importance and difference for each microprocessor (PC) system because microprocessor system has a different hardware. This subroutine is contained in a BIOS and in track of a hard disk called bootstrap loader. Since the program can be run only on RAM then Bootstrap loader has a responsibility to copy that program from a hard disk and place it in RAM.

Page 14: 1-Introduction to Microprocessor

14

Software

Operating System will manage the sequence of operation and it is easier for user to use a microprocessor system rather than use only Input/Output Subroutine. Operating system consists of “command language” and “utility software”.

Application is a application software that design for a specific propose. User interface is in this application level.

Microprocessor VS Digital Circuit

Microprocessor (MPU) is software approach because the microprocessor system is flexible and programmable, while the digital circuit is a hardware approach because it is fixed to the hardware. Moreover, digital circuit have to redesigned every time when work is changed while MPU just change the software

One hardware can do them all

Page 15: 1-Introduction to Microprocessor

15

Microprocessor VS Microcontroller

Microprocessor (MPU) is a CPU and it needs ROM, RAM, I/O in order to work but Microcontroller (MCU) is a CPU + ROM,RAM,I/O then it need some few extra devices in order to make it ready to work. Moreover, MCU is easier than MPU for interface the Input/Output.

One of the most advantage of MCU is interrupt. Interrupt is a event that can cause by hardware (hardware interrupt) or software (software interrupt). When the interrupt happens, MCU will jump to assigned sub-program that is already assigned. Interrupt is used in Real-Time situation programming such as a chemical pumping system whenever the fluid level excess the limit of a tank then interrupt will occur to make the MCU cut the motor power.

Microcontroller has some limit in memory. Microcontroller is used to control the system that work on input/output while microprocessor is used in the larger system such as PC or system that need a powerful processor and a large memory.

MCS-51 VS Z-80

Z-80 has a lot of instructions but 71% of them are multi-bytes instruction so Z-80 has to Fetch more than one time to get the complete instruction while MCS-51 has62% of its instruction are single-byte instruction. Because of this reason MCS-51 is faster and optimal than Z-80.

Table : Page 9

Page 16: 1-Introduction to Microprocessor

16

MCS-51

MCS-51 series has many microcontrollers with the same architecture for example: 8031,8051,8952, etc. Most microcontroller in this series has both microcontroller and microprocessor mode (set at EA pin).

MCS-51

Page 17: 1-Introduction to Microprocessor

17

Question ?