CSE 403 Peripherals Interfacing Lecture 1 Introduction to

  • Slides: 20
Download presentation
CSE– 403 Peripherals & Interfacing Lecture - 1 Introduction to Peripherals & Interfacing Albab

CSE– 403 Peripherals & Interfacing Lecture - 1 Introduction to Peripherals & Interfacing Albab Hossain (Maruf) Lecturer, Department of CSE DIU 03 January 2022 CSE-403 1

Course Materials • Text Book: – Microprocessors and Interfacing: Programming and Hardware, Author: Douglas

Course Materials • Text Book: – Microprocessors and Interfacing: Programming and Hardware, Author: Douglas V. Hall – Microprocessor Architecture, Programming and Applications with the 8085 Author: Ramesh Gaonkor • Additional Support: – Class Lecture Slides 03 January 2022 CSE-403 2

Today’s Outline: • • Microprocessor & Microcontroller Overview of Microcomputer System Bus Registers 03

Today’s Outline: • • Microprocessor & Microcontroller Overview of Microcomputer System Bus Registers 03 January 2022 CSE-403 3

Does Earlier Knowledge Require ? ? • You should have the knowledge about –

Does Earlier Knowledge Require ? ? • You should have the knowledge about – • Microprocessor and • Microcontroller (in detail will be covered in this course). • Basics of “Digital Logic Design” course. • Should we learn from the very basic? Most of them already done !! Right? 03 January 2022 CSE-403 4

Earlier Terminologies!! Microprocessor & Microcontroller: • Two terms to be used mostly in this

Earlier Terminologies!! Microprocessor & Microcontroller: • Two terms to be used mostly in this course – Microprocessor – Microcontroller • Microprocessor A microprocessor (abbreviated as μP or u. P) is a Silicon Chip that contains an electronic central processing unit (CPU). In the world u. P or CPU used interchangeably, which is made from miniaturized transistors and other circuit elements on a single semiconductor integrated circuit (IC). Examples: Intel Pentium, Intel 80 x 86, 8085 etc. 03 January 2022 CSE-403 5

Earlier Terminologies!! (Cont…) • Microcontroller – Dedicated to perform one task. – Integrates the

Earlier Terminologies!! (Cont…) • Microcontroller – Dedicated to perform one task. – Integrates the memory and other features of a microprocessor. • A microcontroller is the integration of • Microprocessor • Memory – ROM types – commonly flash PROM – RAM – Static ram • Peripherals – – Parallel input and output Serial input and output (UART, USART, etc. ) Analogue to digital convertors Timers and Counters • Examples: ATmega 8 A, Atmega 32 A, ATmega 328 etc. 03 January 2022 CSE-403 6

New Terminologies !! Peripherals and Interfaces : • Peripherals Computer peripherals such as disk

New Terminologies !! Peripherals and Interfaces : • Peripherals Computer peripherals such as disk drives, display, keyboard, printers etc. work in different ways and linking a peripheral to the processor is a difficult task. • Interfaces An interface is the hardware and software needed between a processor and a peripheral device in order to compensate for differences in their operating characteristics. 03 January 2022 CSE-403 7

Revision of Concepts !! Overview of Micro-Computer Structure: A microcomputer has three basic blocks:

Revision of Concepts !! Overview of Micro-Computer Structure: A microcomputer has three basic blocks: a central processing unit (CPU), a memory unit, and an input/output (I/O) unit. • The CPU(microprocessor) executes all the instructions and performs arithmetic and logic operations on data. • A memory unit stores both data and instructions. The memory section typically contains ROM and RAM chips. • A system bus (comprised of several wires) connects these blocks – Address Bus, Data Bus and Control Bus 03 January 2022 CSE-403 8

Revision of Concepts !! System Bus : The microcomputer’s system bus contains three buses,

Revision of Concepts !! System Bus : The microcomputer’s system bus contains three buses, address, data, and control bus – When a memory or an I/O chip receives data from the microprocessor, it is called a WRITE operation, and data is written into a selected memory location or an I/O port (register). – �When a memory or an I/O chip sends data to the microprocessor, it is called a READ operation, and data is read from a selected memory location or an I/O port. 03 January 2022 CSE-403 9

Revision of Concepts !! The Address Bus : – It is a Unidirectional bus.

Revision of Concepts !! The Address Bus : – It is a Unidirectional bus. – Information transfer takes place in only one direction, from the microprocessor to the memory or I/O elements. – Typically 20 to 32 bits long. – The size of the address bus determines the total number of memory addresses available 03 January 2022 CSE-403 10

Revision of Concepts !! The Data Bus – It is a bidirectional bus –

Revision of Concepts !! The Data Bus – It is a bidirectional bus – Data can flow in both directions, that is, to or from the microprocessor. – The size of the data bus varies from one microprocessor to another. – Usually matches the word length of the microprocessor – Usually a multiple of 8 – We talk of 8 -bit, 16 -bit , 32 -bit and 64 -bit processors which refers to the normal word length of the microprocessor 03 January 2022 CSE-403 11

Revision of Concepts !! The Control Bus – It consists of a number of

Revision of Concepts !! The Control Bus – It consists of a number of signals that are used to synchronize operation of the individual microcomputer elements. – Consists of potentially many signals. Typically: – Read – Write – Could be single signal - Read/not. Write line – Interrupt control – Bus control signals for DMA (Direct Memory Access) 03 January 2022 CSE-403 12

Revision of Concepts !! The Control Bus – It consists of a number of

Revision of Concepts !! The Control Bus – It consists of a number of signals that are used to synchronize operation of the individual microcomputer elements. – Consists of potentially many signals. Typically: – Read – Write – Could be single signal - Read/not. Write line – Interrupt control – Bus control signals for DMA (Direct Memory Access) 03 January 2022 CSE-403 13

Revision of Concepts !! Registers : • The number, size, and types of registers

Revision of Concepts !! Registers : • The number, size, and types of registers vary from one microprocessor to another. • There are four basic microprocessor registers: – – Instruction register Program counter Memory address register Accumulator 03 January 2022 CSE-403 14

Revision of Concepts !! Register - Instruction Register – The instruction register stores instructions.

Revision of Concepts !! Register - Instruction Register – The instruction register stores instructions. – The word size of the microprocessor determines the size of the instruction register. – For example, a 32 -bit microprocessor has a 32 -bit instruction register. 03 January 2022 CSE-403 15

Revision of Concepts !! Register – Program Counter – The program counter contains the

Revision of Concepts !! Register – Program Counter – The program counter contains the address of the instruction or operation code (op-code). – The program counter normally contains the address of the next instruction to be executed. – The size of the program counter is determined by the size of the address bus. 03 January 2022 CSE-403 16

Revision of Concepts !! Register – Accumulator – It is a General Purpose Register

Revision of Concepts !! Register – Accumulator – It is a General Purpose Register (GPR). – For an 8 -bit microprocessor, the general-purpose register is called the accumulator. – It stores the result after most ALU operations. – These 8 -bit microprocessors have instructions to shift or rotate the accumulator one bit to the right or left through the carry flag. – In 16 - and 32 -bit microprocessors the accumulator is replaced by a GPR. – Any GPR can be used as an accumulator. 03 January 2022 CSE-403 17

Revision of Concepts !! Register – Memory Address Register – The memory address register

Revision of Concepts !! Register – Memory Address Register – The memory address register contains the address of data. – The microprocessor uses the address, which is stored in the memory address register, as a direct pointer to memory. – The contents of the address is the actual data that is being transferred. 03 January 2022 CSE-403 18

03 January 2022 CSE-403 19

03 January 2022 CSE-403 19

03 January 2022 CSE-403 20

03 January 2022 CSE-403 20