Sunteți pe pagina 1din 39

CHAPTER 2 :

INTRODUCTION TO MICROPROCESSOR

At the end of the class, U should be able :


1) Illustrate internal architecture of microprocessor 2) Describe fetch and execute cycle 3) Identify trends in microprocessor technology 4) State families of microprocessor 5) Illustrate the programmers model of 68000 6) Identify features of 68000 microprocessor 7) Illustrate hardware connection of 68000

INTERNAL STRUCTURE OF MICROPROCESSOR MC68000

Arithmetic Logic Unit (ALU) section:


Performs variety of arithmetic and logic operations on data, such as addition, subtraction, AND, OR, EX-OR, shifting, incrementing, and decrementing. The more advanced MPU have ALUs that can do multiplication and divisions.

Registers section:
These internal registers serve as temporary data storage, before, in progress and after the process done by ALU. Data transfer within these registers is much faster as compared to the memory. This section contains various registers (inside the MPU), each of which performs a special function. These registers are: general purpose registers array, accumulator, instruction register, program counter, and flag register.

Control and timing section:


The main function is to fetch instruction codes from program memory. Then decode (interpret) them, to generate into necessary control signals from MPU Then to execute the instructions. This section also generates timing and control signals (eg. R/W clock), that are needed by external RAM, ROM, and I/O devices.

BASIC OPERATION OF MICROPROCESSOR


FETCH AND EXECUTE CYCLES

OPERATION OF COMPUTER SYSTEM


How a computer system works?
Before a computer system is switched ON, CPU and RAM store no data. ROM permanently stores a short program for initializing the computer system. When the computer is switched ON, CPU will READ data/program that stored in ROM, two tasks is performed :

Devices that are readily connected to the computer will be reset to a standby mode. System programs from permanent storage will be transferred to the RAM.
System program will display instructions to guide the user to proceed accordingly

START

Fetch (next) Instruction

1)

Microprocessor fetch instruction representing the signal carried by the address bus.

3) Microprocessor continue the next instruction.

Execute Instruction

2)

Microprocessor execute the instruction.

No

Is it a HALT instruction?
Yes STOP

Fetch and execute cycles

Example
a.) Add two data which are stored in memory at address 0001 and 0002. b.) Store the result in the memory at address 0003. Show the above process in terms of fetch and execute cycles.

solution

Within the fetch cycle, there are two operations or sub-cycles, i.e. Read and write. READ CYCLE CPU sends a signal via control bus. If the bus is busy, CPU is put on Wait state. If the bus is free, CPU will place instruction address on the address bus. This address will be decoded or translated by the circuitry in the memory or I/O interface. Finally the data at that specific address is obtained, and is placed on the data bus.

READ CYCLE

Reading from memorymemory Microprocessor


issues address signal to memory through address bus Address decoder decoded the address and activates a 8 bits select line
select

Data at location 05H is placed onto the data bus and read by microprocessor
Data to CPU 00011000

00000101

Address decoder 8 bit Address bus

Location 00 Location 01 Location 02 Location 03 Location 04

00011000

8 bit data bus

Location FE Location FF control


The control circuit in memory initiates a read action

RD WR

Microprocessor sends a Read signal to memory

WRITE CYCLE

Write cycle enables CPU sends data to the memory or I/O devices. CPU will send a signal (request to write) to the control bus. If the data bus is free, the data is placed on the data bus, whereas the location address will be placed on the address bus. CPU will then send the data to the destination with respect to the address.

WRITE CYCLE

Microprocessor issues address signal to memory through address bus 00000100

Address decoder decoded the address and activates a select line

Data sent by microprocessor through the data bus

8 bits
select

00100000

Location 00 Location 01 Location 02 Location 03

Address decoder 8 bit Address bus

00100000 01110000 00011000

8 bit data bus data bus

Location FE Location FF control


The control circuit in memory initiates a read action

RD WR

Microprocessor sends a write signal to memory

Evolution of microprocessor between Intel and Motorola

TAHUN/PENGELUAR 1971 1972 1974 1977 1978 1979

INTEL 4004,4 Bit,2000 Transistor, 108 KHZ 8008, 8bit 8080, 8 bit 8085, 8 bit 8086, 16 bit, 29000 trqansistor, 2 MHz 8088, 8 bit tetapi strktur dalaman sama dengan 8086 80286, 32 bit, 275 000 transistor, 16-20 MHz

MOTOROLA

68000, bas data dalaman 32 bit, bas data luaran 16 bit

1982 1984 1985 1989 1993 1994 1995

68020, bas data dan alamat 32 bit 80386, 32 bit, 1.2 juta transistor, 25-66 MHZ 80486, 32 bit, 1.2 juta transistor, 25-66 MHz Pentium, 4 bit, 3.1 juta transistor, 60-166 MHZ 68060, 16 bit Pentium Overdrive & Pentium Pro150, 166, 180 dan 200 MHz Pentium II, 300 MHz, 7.5 juta transistor Intel Celeron Pentium III pada 800Eb Mhz, 866 Mhz, 933 Mhz, 1B Ghz dan 1.13 Ghz 68040

1997 1999 1999

2000

Pentium IV, 400 Mhz

Mc68000 family summary

Register Set of MC68000

Programmers model of the 68000

The working element of a microprocessor is the internal registers, where raw data and addresses to be stored, moved around and transferred to be processed in the ALU. The MC68000 is an internal 32-bit processor, meaning that each register has 32 bits and the processor can perform arithmetic and logic operations on 32-bit operands.

Programmers model of the 68000

DATA REGISTER
8 data registers namely D0 D7 Used to hold data temporarily for the use in processing. Each registers can be accessed for byte operands (0-7), word operands (0-15 bits) or long-word operands (0-31 bits). Function:
Used to store information within the 68k microprocessor itself.

ADDRESS REGISTER
A0 - A7 Address register are not provided for storage of data for processing. Instead, they are meant to store address information Although every registers contain 32 bits, only the lower 24 bits are used to access memory. Therefore, the address range is 224 (16M) byte. Function:
Used to store the location where data can be founded outside the processor. Ex: external memory chip. A7 usually is used to execute subroutine.

STACK POINTER (SP)


Address register A7 also serves as SP either supervisor stack pointer (SSP) or the user stack pointer (USP), depending on the supervisor bit in the status register. Used to save the program counter when branching to a subroutine.

PROGRAM COUNTER (PC)


The PC always points to the next instruction to be executed. During a branch-type instruction, the destination is loaded into the PC. For any other instruction, its content are incremented by the instruction length as the instruction is executed.

Function:
Hold the memory address of the next instruction to be executed.

STATUS REGISTER (SR)


The status register (SR) has 16 bits and is divided into the system byte and user byte. The user byte contains five condition flags. The remaining 3 bits are not used and remain zero. The condition flags contain information on the result of the last processor operation. The setting can be tested by conditional branch instructions.

PIN CONFIGURATION OF MICROPROCESSOR CHIP

Mc68000 features
32 bit data and address registers 16 bit data bus 24 bit address bus 14 addressing modes Memory-mapped input-output Program counter 56 instructions 5 main data types

Clock speeds : 4 MHz to 12.5 MHz 7 interrupt levels synchronous and asynchronous data transfer

What are the two major microprocessor manufacturers? How many data registers are in the MC68000? How many address registers are in the MC68000? What is the size of data registers in MC68000? What is the total number of data bus lines in MC68000? What is the total number of address bus lines in MC68000?

TUTORIAL

S-ar putea să vă placă și