Docsity

Microprocessor and microcontroller, Schemes and Mind Maps of Microprocessors

Partial preview of the text

Download Microprocessor and microcontroller and more Schemes and Mind Maps Microprocessors in PDF only on Docsity!

EEE 3231: Microprocessor and Embedded

Systems

^ Binary Digits – 0 and 1 ^ Logic Levels – ‘0’ and ‘1’, ‘high’ and ‘low’ ^ Transistors – switches – ON and OFF ^ Logic gates ^ Registers ^ Combinational Logic ^ Sequential Logic – FSM ^ Microprocessors -

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed



Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed



Memory – a.^

ROM

b.^

Read/Write (R/W)- RAM- Permanent Memory (System) Bus

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

(System) Bus

Parallel connecting wires for

carryinginformation/data. a.^

Address Bus b.^

Data Bus

^ The process of data manipulation and communication is determined by the logicdesign of the microprocessor.

This logic design of each MP is called their internal

architecture

^ e.g. 8085 architecture

Farhana B Sufi (PhD), 2024

Rafiquzzaman

All

the

various

functions

performed

by

the

microprocessor

can

be

classified

in

three

general

categories: 1.

Microprocessor initiated operations.^ Internal

operations

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

Internal

operations

Peripheral (or externally initiated) operations

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

^ We need to tell any machine what it needs to do. Machines are hardwares (HW) and the way wegive the instructions to machines is through what we call ‘programming’. Usually we use differentkinds of ‘software’ (SW) for this. ^ But a machine only understands binary. ^ Machine Language - Binary ^ High Level Language – C, C++, Java, Python, etc. ^ Programmable device:^ The

microprocessor

can

perform

different

sets

of

operations

on

the

data

it

receives

depending

on

The

microprocessor

can

perform

different

sets

of

operations

on

the

data

it

receives

depending

on

the

sequence

of

instructionssupplied

in

the

given

program.By

changing

the

program,

the

microprocessor manipulates the data in different ways. ^ Instructions:^ Each microprocessor is designed to execute a specific group of operations. This group ofoperations is called an instruction set. This instruction set defines what the microprocessor canand cannot do.^ 

To execute a program: the user enters its instructions in binary format into the memory. ^

The microprocessor then reads these instructions and whatever data is needed from memory,executes the instructions and places the results either in memory or produces it on an outputdevice.

Farhana B Sufi (PhD), 2024

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

^

The 8085 Microprocessor consists of: Control unit: control microprocessor operations.Control unit: control microprocessor operations.Control unit: control microprocessor operations.Control unit: control microprocessor operations.ALU: performs data processing function.ALU: performs data processing function.ALU: performs data processing function.ALU: performs data processing function.Registers: provide storage internal to CPU.Registers: provide storage internal to CPU.Registers: provide storage internal to CPU.Registers: provide storage internal to CPU.InterruptsInterruptsInterruptsInterruptsInternal data busInternal data busInternal data busInternal data bus

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

Farhana B Sufi (PhD), 2024

Gaonkar 5

th^ ed

^

Flag Register:

8 bit register –shows the status of the microprocessor before/after an operation

S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) & CY (carry flag) ^

D

D

D

D

D

D

D

D

^

Sign Flag

  • Used for indicating the sign of the data in the accumulator• The sign flag is set if negative (1 –negative) • The sign flag is reset if positive (
    • positive)

SS^ SS

ZZ^ ZZ

XX^ XX

ACACACAC

XX^ XX

PP^ PP

XX^ XX

CYCYCYCY

^

Zero Flag:

It is set if result obtained after an operation is 0

(^10110011) + 01001101---------------1 00000000  Carry Flag:

It is set if there is a carry or borrow from arithmetic operation

1011 0101

1011 0101

+ 0110 1100

- 1100 1100

---------------

---------------

Carry 1

0010 0001

Borrow 1

1110 1001

^

The Program Counter (PC):

-^

This is a register that is used to control the sequencing of the execution of instructions.

-^

This register always holds the address of the next instruction.

-^

Since it holds an address, it must be 16 bits wide. ^

The Stack pointer:

-^

The stack pointer is also a 16-bit register that is used to point into memory.

-^

The memory this register points to is a special area called the stack.

-^

The stack is an area of memory used to hold data that will be retreived soon.

-^

The stack is usually accessed in a Last In First Out (LIFO) fashion

Farhana B Sufi (PhD), 2024

^ To execute a program, the microprocessor “reads” each instruction from memory, “interprets” it,then “executes” it. ^ The microprocessor

Fetches

each instruction,

^ Decodes

it,

^ Then

Executes

it.

This sequence is continued until all instructions are performed. ^ Assembly Languages

  • a mix of

mnemonic

codes – usually made of Letters & Hex numbers.

^ The mnemonic for each instruction is usually a group of letters that suggest the operation performed

performed

e.g

.^

ADD B

-^

Add register

B

to the

A

ccumulator, and keep the result in the accumulator.

ADD F

Add hex data F8 to the

A

ccumulator, and keep the result in the accumulator.

^ IMPORTANT – A machine language and its associated assembly language are completelymachine dependent.In other words, they are not transferable from one microprocessor to adifferent one. ^ For example, Motorolla has an 8-bit microprocessor called the 6800.The 8085 machine language is verydifferent from that of the 6800. So is the assembly language. A program written for the 8085 cannot be executedon the 6800 and vice versa.

Farhana B Sufi (PhD), 2024