Docsity

Microprocessor Organization and Programming: ABS System and Microcontroller, Lecture notes of Mathematics

Partial preview of the text

Download Microprocessor Organization and Programming: ABS System and Microcontroller and more Lecture notes Mathematics in PDF only on Docsity!

Microprocessor Interfacing & Programming

Department of Electrical Engineering

 Prevents wheels from locking up during braking allowing for safe steering

Anti-lock Brake System (ABS)

Embedded System

Sensor Valve Microcontroller^ Keypad LCD

Organization of Computers

Data Bus^ Data Bus

RAM/ROM^ RAM/ROM^ I/O DeviceI/O Device

Address Bus^ Address Bus Control Bus^ Control Bus CPU^ CPU

 Registers ◦ temporary storage area to hold data values

◦ ◦ Registers named A, B, C, D etcSpecial purpose registers Program Counter and

 Arithmetic Logic Unit (ALU)^ Instruction Registers, Status Register

 ◦^ Hardware which performs arithmetic and logical^ operations

Control Unit ◦ Decodes the instructions fetched from memory

◦ (^) Generates control signals to perform operations

Inside the Microcontroller

Inside the Microcontroller

Registers^ Registers

Internal Data Bus^ Internal Data Bus

Instruction register^ Instruction register

Internal Control Bus^ Internal Control Bus

Program Counter^ Program Counter

ALU^ ALU

Decoder &Instruction Control^ Instruction^ Decoder & Control

 What is the range of memory address and size of data stored at each memory location if the CPU

can access data through an 8-bit data bus and 16- bit address bus?

 It can access one byte of instruction or data from address 0000 to FFFF H

Adding three numbers

 The CPU performs the following actions to add the three numbers

◦ ◦ (^) Put 21 into A registerAdd to register A the value 42

 The program instructions which implement the^ ◦^ Add to register A the value 12

 above actions are stored in the memoryThe code to move the value to register A is

 The code to add the value to register A is^ ◦^ 1011 0000 (B0 H)

◦ (^) 0000 0100 (04 H)

Adding three numbers

 (^) What is the size of the program? (in  bytes) Seven bytes^ Address^14001401 InstructionB0 21 (^14021403 ) (^14041405 ) 1406 F

Adding three numbers

Program execution

Registers^ Registers Instruction^ Instruction^ register^ register Control Bus^ Control Bus Instruction^ Instruction Decoder &^ Decoder &^ Control^ Control ALU ALU Program Counter^ Program Counter

Data Bus^ Data BusExternal^ External

Memory^ Memory Bus^ Bus^ Address^ AddressExternal^ External