Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

Similar documents
Hardware and Software Architecture. Chapter 2

The Microprocessor and its Architecture

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee

CS 16: Assembly Language Programming for the IBM PC and Compatibles

ENE 334 Microprocessors

EEM336 Microprocessors I. The Microprocessor and Its Architecture

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

Assembler Programming. Lecture 2

Basic Execution Environment

6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

Chapter 2: The Microprocessor and its Architecture

Code segment Stack segment

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

EC-333 Microprocessor and Interfacing Techniques

UNIT 2 PROCESSORS ORGANIZATION CONT.

Intel 8086 MICROPROCESSOR. By Y V S Murthy

16-Bit Intel Processor Architecture

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

8086 INTERNAL ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE

Chapter 2 COMPUTER SYSTEM HARDWARE

Assembly Language. Lecture 2 x86 Processor Architecture

The x86 Architecture

Addressing Modes on the x86

Introduction to IA-32. Jo, Heeseung

INTRODUCTION TO IA-32. Jo, Heeseung

We can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,...

SYSC3601 Microprocessor Systems. Unit 2: The Intel 8086 Architecture and Programming Model

MICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

IA32 Intel 32-bit Architecture

MICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

Assembly Language for x86 Processors 7 th Edition. Chapter 2: x86 Processor Architecture

icroprocessor istory of Microprocessor ntel 8086:

The Instruction Set. Chapter 5

Assembly Language for Intel-Based Computers, 4 th Edition. Kip R. Irvine. Chapter 2: IA-32 Processor Architecture

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture

8051 Microcontrollers

8051 Microcontroller

MODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE

9/25/ Software & Hardware Architecture

Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil

eaymanelshenawy.wordpress.com

8051 microcontrollers

IA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

8051 Microcontroller

Module 3 Instruction Set Architecture (ISA)

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 2: IA-32 Processor Architecture. Chapter Overview.

Instruction Set Architectures

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

Microprocessor (COM 9323)

Complex Instruction Set Computer (CISC)

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Computer Organization (II) IA-32 Processor Architecture. Pu-Jen Cheng

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

ADVANCE MICROPROCESSOR & INTERFACING

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 2: IA-32 Processor Architecture Included elements of the IA-64 bit

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Architecture of 8086 Microprocessor

Memory Models. Registers

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

UMBC. A register, an immediate or a memory address holding the values on. Stores a symbolic name for the memory location that it represents.

Northern India Engineering College, Delhi (GGSIP University) PAPER I

UMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP.

MICROCONTROLLER UNIT 1

A Presentation created By Ramesh.K Press Ctrl+l for full screen view

INTRODUCTION TO MICROPROCESSORS

Interfacing Compiler and Hardware. Computer Systems Architecture. Processor Types And Instruction Sets. What Instructions Should A Processor Offer?

Introduction to Microprocessor

Microcomputer Architecture and Programming

Microprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017)

UNIT-I. 1.Draw and explain the Architecture of a 8085 Microprocessor?

Unit 08 Advanced Microprocessor

Instruction Set Architecture (ISA) Data Types

An 8-Bit Scientific Calculator Based Intel 8086 Virtual Machine Emulator

EC6504 MICROPROCESSOR AND MICROCONTROLLER

8086 Microprocessors & Peripherals

1. Introduction to Assembly Language

CMSC Lecture 03. UMBC, CMSC313, Richard Chang

Internal architecture of 8086

Lab 2: Introduction to Assembly Language Programming

Lecture 1. Course Overview and The 8051 Architecture

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 03, SPRING 2013

Introduction to Microprocessor

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

US06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 1: Assembly Language Terms & Directives

Credits and Disclaimers

MA Unit 4. Question Option A Option B Option C Option D

IA-32 Architecture. Computer Organization and Assembly Languages Yung-Yu Chuang 2005/10/6. with slides by Kip Irvine and Keith Van Rhein

Advanced Microprocessors

MICROPROCESSOR ALL IN ONE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)

Assembly Language Each statement in an assembly language program consists of four parts or fields.

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Transcription:

Moodle 4 WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

Advanced Microprocessors and Introduction to Microcontroller Moodle developed By Dr. S. R. Kumbhar Department of Electronics Willingdon College Sangli 1

Introduction to Advanced microprocessors. The general purpose architecture is given in fig. 1. INTRODUCTION TO X-86 FAMILY Memory RAM CPU Storage Disk Address / data / control bus Parallel I/O Serial I/O User Interface device Fig. 1 General purpose architecture of advanced microprocessor In general purpose microprocessor CPU is connected to the address / data / control bus along with mass storage serial and parallel I/O memory and user interface. The user interface generally includes alphanumeric and graphic display system and data entry system. The architecture of general purpose computer formed with memory, I/O devices, CPU; allows the user to make use of wide variety of general purpose software to perform the necessary needed job. Every advanced microprocessor application can t be introduced in the general purpose computer, but hardware makes these systems more expensive than the hardware needed to make 8-bit microprocessors. Therefore mostly general purpose computers uses the advanced microprocessor architecture or are built from general purpose computer sub assemblies, such as CPU, RAM, I/O, storage devices, etc. 1) The advanced microprocessors has a great power of computing. 2) 32-bit microprocessors are very popular for graphic displaying systems, which presents the data in graphic form such as figures, lines, drawings, pictures, and other graphical applications. 3) Many time advanced microprocessors are given support through the numeric coprocessor. These coprocessors are of 8-bit and has separate required CPU which has a capacity to perform the functions such as, add, subtract, divide, multiply, as well as compute the trigonometric variables. The coprocessor has a capability to retain results faster than the general purpose CPU. The processor is working even when general purpose CPU may busy in handling display, managing mass storage devices and other monitoring functions. Therefore coprocessor enhances the speed of the operation. 4) The advanced microprocessor requires sophisticated operating and application software s which are very complex and unless one can understand the software in detail it is very difficult to understand the system. So to understand the advanced microprocessor based systems, requires more knowledge of system than the hardware. 5) Multitasking or multi-user operating systems. : In multitasking more than one tasks are allowed to appear on CPU at the same time. Simple advance microprocessors can execute only one instruction at a time and 2

has ability to handle one instruction at a time. But using the advanced microprocessor computations can be performed for multiple users or multiple tasks. 6) Advanced microprocessors offer special way of operating system, which is known as supervisory, privileged or protected mode. When these microprocessors are operated in special mode i.e. one of the three modes 7) Advanced microprocessors are generally provided with data protection utility. Protection techniques are used to keep two users or tasks from accessing the same data at a time. 8) Advanced microprocessors solve the complex problems with the help of software, which are very large and require access large data. 9) In virtual memory mode the programmer is allowed to develop the programs which are much larger than the physical memory actually available to the processor. The additional memory is on the disk can be accessed through the sophisticated memory addressing techniques. The disk memory is looked on as if it is a main memory. The additional virtual memory can be achieved through special hardware and software. These special instructions are internal hardware allows the programmer to write software without knowing the availability of the memory. The virtual memory insures the program runs properly. 10) The X-86 processors includes pre-fetching and data caching which increases the speed of processor. Every X-86 processors have same pre-fetching. The newer versions have significant amount of memory, which helps to cache data as well as code. The next few instructions are prefetched then address and data buses are available. The instructions are fetched and stored in prefetch queue. 11) Simply it stores 6 instructions, which has up to 8 byte instructions depending on process versions. 12) Once the current instruction is completed immediately prefetched instruction is available. The processor does not wait for fetching cycle. So the speed of the execution significantly increases. Table 1 : Comparison of X86 family microprocessors. Attribute 8088 8086 286 386SX 386 DX 486SX 486 DX pentium Data bus 8 bit 16 bit 16 bit 16 bit 32 bit 32 bit 32 bit 64 bit Address bus 20 bits 20 bits 24 bits 32 bits 32 bits 32 bits 32 bits 32 bits Operating 5, 8 5 to 10 6-20 16 to 33 16-50 25,33,50 25,33,50 50, 100 speed MHz Instruction -- -- -- 16 bytes 16 bytes 32 bytes 32 bytes 8 KB cache Data cache 256 bytes 256 byte 8 KB 8KB 8KB Math Ext Ext Ext External External External Internal Internal coprocessor MMU Ext Ext Int Int Int Int Int Int Physical memory addressed 1 MB 16 MB 16 MB 4 GB 4GB 4GB 4 GB *4 GB Internal data 16 16 bits 16 MB 32 MB 16 MB 32 MB 32 MB 32 MB word size Introduction date Bits 1978 1978 1982 1985 1985 1989 1991 1993 3

Programming Model for the X-86 Family of Advanced Microprocessors Intel introduced 8086 and 8088 advanced microprocessors for the first time in the world market. These two microprocessors have their own architecture. It is not a copy of microcomputer architecture or extension of 8-bit microprocessor architecture. Both the microprocessors i.e. 8086 and 8088 differ from each other. As 8086 is having a 16-bit data bus and rest of the construction remains same for 8086 and 8088. The internal architecture of 8086 and 8088 8-bit buses and registers. The 8086 and 8088 microprocessors defines the entire base of the programming model of the advanced microprocessors. The advanced new generation have greater computing power and faster in speed. They use 32 bit registers instead of 16-bit registers as used in (8086, 8088 and 80286) along with the advanced addressing techniques. Generally programming model is made up of 3 register groups. The upper register set contains eight general purpose registers which are called A, B, C, D, source Index (SI), Base Pointer (BP), Destination Index (DI), and stack pointer (SP) registers. These registers are either 16-bit or 32-bit depends on the processor. The lower two bytes of A, B, C and D registers divided into high and low bytes. AL, BL, CL and DL are low byte register group and AH, BH, CH and DH are the high byte register group. Combining lower 8-bit and higher 8- bit register together forms 16-bit register which are called AX, BX, CX and DX. Here X stands for extended. There are 4 other registers which always contains 16-bit are SI, DI, SP and BP. These four 16-bit registers are called pointer registers and index registers as they are used to point the locations in the segment. The stack pointer points the current location of the memory. AH AL BH BL CH CL DH DL Source Index Destination Index Base Pointer Stack Pointer General Purpose registers EAX AH AL EBX BH BL ECX CH CL EDX DH DL ESI SI EDI DI EBP BP ESP SP Code Segment Stack Segment Data segment Extra segment Segment Registers Code Segment Stack Segment Data segment Extra segment FS GS IP High Flags Low Flags IP Flag Registers IP Extra flags Flags H Flags L 8086, 8088 and 286 386, 486 and Pentium based base Register set Register set Fig. 3 Programming model for X-86 Advanced microprocessors 4

The advanced 32 bit registers i.e. 386, 406 have 32-bit general purpose registers called EAX, EBX, EDX, ESI, EDI, ESP and EBP registers Here E stands for extended length. The lower portion of 32-bit general purpose registers of 386 and 486 is similar to that of 8086, 8088 and 286. It has extended length of 16-bits for every registers. So the total length of the register becomes 32. The second set of registers are the segment registers. These are all 16-bit segment registers similar to that of 8086 segment registers. This set consists of code segment (CS), Extra segment (ES) along with 16-bit FS and GS registers. The X-86 registers manages the operations with external memory. These registers are used for address computation and data movements. The bottom set of programming model contains Instruction pointer called program counter along with the flag registers. The instruction pointer of 8086, 8088 and 286 is of 16-bit and 32-bit for new processors. The flag registers are also included in the programming model which stores the status of the special results from data operations working on data in registers and memory locations. Virtual Mode Resume Interrupt Zero Parity Carry Sign 31 18 17 16 15 14 13/12 11 10 9 8 7 6 5 4 3 2 1 0 Af Vm Rf O NT IO O D I T S Z A P C PL Alignment Nested Over flow Direction Trap Auxiliary Check task I/O privilege level Fig. 4 flag registers of x-86 family Exercise : 1. 80386 is a ------- bit microprocessor. (March 2003) 2. Explain the features of pentium processor ( March 2002, 2003, 2004) 3. Draw the neat labelled diagram of flag reg of X-86 family ( March 2003 2005, oct 2005) 4. Explain the programming model of X-86 family - M 2002, O 2002 5. List the advanced microprocessors and write three attributes of each. 2003 6. Compare 80286 and Pentium (2004) 5

INTRODUCTION TO 8051 MICROCONTROLLER Introduction to microcontrollers The microcontroller is a complete microprocessor system built on a single integrated circuit. These single chip microcontrollers were developed to meet the needs of low cost. Building of a complete microprocessor system on a single chip reduces the cost of building of the product and uses the microprocessor power to implement the functions. The problem of cost, space and power was solved by implementing a microprocessor on a single chip. The resulting configuration is called microcomputer and its major parts are inside the IC & including all parts that configured to give the function of microcontroller as they are used to perform control functions. As the IC structure is complex and most of 8-bit microprocessors were already entered into the advanced 2 nd generation before the development of the microcontroller. Sophisticated microcontroller is a very powerful device. The microprocessor inside it is very fast and parts contains sophisticated I/O ports along with low cost. These microcontrollers were generally implemented in low power semiconductor technologies such as CMOS, PMOS, NMOS, etc. The cost of single chip microcontroller is very low as compared to other systems such as Z 80 system. Z 80 system has 4 times more cost than 8051 microcontroller. Microcontroller: Fig. below shows the block diagram of the microcontroller which is true computer on chip. The design incorporates all the features found in a microprocessor CPU: ALU, PC, SP and registers. It also has the added features needed to make a complete computer : ROM, RAM, parallel I/O, serial I/O, counters and clock circuits. ALU Timer / Counter I/O Port Accumulator Registers Internal RAM Stack pointer Internal ROM Program counter I/O Port Interrupt Circuits Clock circuit Fig. 1 Block diagram of microcontroller THE 8051 ARCHITECTURE The 8051 microcontroller has 40 pins with the following features- 1) 8-bit CPU with register A and B 12) 16 bit PC and DPTR 2) 8-bit program status word. 13) 8-bit stack pointer 6

3) Internal ROM ( 4 K x 8 ) 14) Internal RAM of 128 bytes 4) Full featured serial port 15) Two external interrupts 5) Address 64 K byte program memory 16) Addresses 64 K byte of data memory. 6) four register banks 17) 80 bytes GP Memory. 7) Oscillator and clock circuit ( with 12 MHz clock) 8) Control registers : TCON, TMOD, SCON, PCON, IP and IE 9) 32 input and output pins arranged as 8-bit ports 10) Two 16-bit timer counters Powerful 111 instruction, instruction set. Each I/O port is also connected to 8-bit internal data bus through a series of registers, which holds the data during I/O transfer and control the I/O ports. The 8051 memory register map is shown in fig. 3. The 8051 has internal 4 K ROM and 128 byte RAM including special function registers. 8051 uses one memory space for storing programs and the other for storing the variable data. This is read only memory space. One can read memory from this space but can t write. The 8051 internal ROM is in program memory space. All instructions fetches are taken from the program memory space. The data memory space is read-write memory space. The processor can read data from this memory and can write data to this memory space. It can t execute program instructions from this memory space. The 8051 internal RAM is in this memory space. The 128 byte of internal RAM provide general read-write, data storage. Part of the 128 byte memory is often used as general purpose register. The 8051 has 22 special function registers which are not part of 128 bytes of internal RAM. This occupy the space from 80 H to F8 H. These registers are used for intended purpose only. 64 KB external ROM or EPROM FFFF Up to60 FFFF FFFF 00F8 KB external ROM Up to 4 Kb internal ROM 1000 0FFF Up to 64 KB external RAM 0080 007F 0000 0000 0000 0000 Special function register 128 byte RAM Program Memory Data Memory Fig. 3 8051 memory register Map. 1) A and B Registers: The 8051 contains 34 general-purpose or working registers. Two of these registers A and B hold results of many instructions particularly math and logical operations of the 8051 central processing unit. The other 32 are arranged as part of the internal RAM in four banks of eight each. The A register is almost versatile of the two CPU registers and is used for many operations, including addition, subtraction, integer multiplication division and Boolean bit manipulations. The Register A is also 7

used for data transfer between the 8051 and any external memory. The B register is used with A register for multiplication and division operations and has no other functions. 2) Flags and Program Status Word (PSW) Flags are 1-bit registers provided to store the results of certain program instructions. Other instructions can test the condition of the flag and make decisions on the flag status. In order that the flags may be conveniently addressed they are grouped inside the program status word and the power control ( PCON) registers. The 8051 has 4 math flags that respond automatically to the outcomes of the math operations and three general-purpose flags that can be set to 1 or cleared to 0 by the programmer as desired. The math flags includes carry C, Auxiliary carry (AC), Over flow (OV) and parity (P). The user flags are named F0, GF0 and GF1, they are general-purpose flags that may be used by the programmer to record some events in the program. 7 6 5 4 3 2 1 0 CY AC F0 RS1 RS0 OV -- P Bit Symbol Function 7 CY Carry flag 6 AC Auxiliary flag 5 F0 User flag 0 4 RS1 Register bank section bit 1 3 RS0 Register bank section bit 0 RS1 RS0 0 0 Select register bank 0 0 1 Select register bank 1 1 0 Select register bank 2 1 1 Select register bank 3 2 OV Overflow flag 1 --- Reserved for feature use 0 P Parity flag OTHER MICROCONTROLLERS IN THE 8051 FAMILY 1) 8052 is the special extension of 8051, the 8052 has 8 Kbyte of an board RAM. 2) 8052 allows programmers to write larger programs along with the variety of data. 3) The cost of 8052 is more than 8051 microcontroller so 8052 is mostly used when larger RAM and ROM is used. 4) Another advantage of 8052 is that 8052 has extra 16-bit counter timer which gives programmer more flexibility. 8051 and 8052 have onboard ROM, so they must be programmed by the device manufacturer. 5) These microcontrollers generally used when high volume applications are in operation. 6) Low valued versions like 8751 and 8752 were also used in some cases as these replaces the onboard RAM with onboard EPROM. In EPROM there is a facility of erasing the program memory with electricity or with ultraviolet rays. 8

7) The 8031 and 8032 are the two alternate versions of 8051 and 8052. They don t have on board RAM. These are having external RAM for programming. These are best devices in low volume products. 8) 8051 and external 2764 8K EPROM have the similar functions to as 8751 but 2764 8K EPROM is cheaper than 8751. Third form of the 8052 is the 8052 AH BASIC. This 8052 has BASIC programming language in ROM. The 8048, 8049 and 8050 al these have the identical characteristics with exception of memory size The 8048 supports a 1 K internal ROM, but 8049 supports 2 K byte ROM and 8050 supports 4 K bytes. The 8048 has 64 byte of internal RAM including 32 bytes of registers. The 8049 and 8050 use the same 32 byte of register locations and have 128 and 256 bytes of RAM. The 8048, 8049 and 8050 are popular because they are inexpensive along with extremely powerful controller device. Bank 3 Bank 2 Bank 1 Bank 0 R7 1F R6 IE R5 1D R4 1C R3 1B R2 1A R1 19 R0 18 R7 17 R6 16 : -- : --- R0 08 R7 07 R6 06 R5 05 R4 04 R3 03 R2 02 R1 01 R0 00 Byte Address 7F Working Registers General purpose registers Memory map Fig. 4 Internal RAM and registers banks Applications of microcontroller: 1) Keyboard: Microcontrollers are used in keyboards such as to debouncing the keys. 30 7F 30 2F 20 Scratch pad memory 2) Used in displaying systems. 8) Machine tools, chemical processes, medical instrumentation, 3) Sophisticated guidance control 9) Pulse measurement 4) Frequency measurement 10) Width measurement 5) Electronic toys, microwave ovens, VCR s 6) Home security system, tape deck, intelligent multimeter. 7) Personal computers. 80 byte RAM Reg. Banks 16 bit addressable RAM 9