ENE 334 Microprocessors

Similar documents
MICROCONTROLLER UNIT 1

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

8051 microcontrollers

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

UNIT IV MICROCONTROLLER

8051 Microcontroller

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

Lecture 1. Course Overview and The 8051 Architecture

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

8051 Microcontroller

CS 320. Computer Architecture Core Architecture

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

MICROCONTROLLERS 8051

Question Bank Microprocessor and Microcontroller


8051 Microcontrollers

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

Fig 1. Block diagram of a microcomputer

Microcomputer Architecture and Programming

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051:

ENE 334 Microprocessors

8051 Overview and Instruction Set

Unit I. Introduction Microcontrollers and Embedded processors Overview of the 8051 Inside the 8051 Addressing Modes

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

PART - B (Answer all five units, 5 X 10 = 50 Marks)

BASIC INTERFACING CONCEPTS

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52

8051 MICROCONTROLLER

Sencer Yeralan and Helen Emery Gainesville, Florida January 2000

Fig 1. Block diagram of a microcomputer


Microcontrollers. Microcontroller

Microprocessors/Microcontrollers

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

EE6502- MICROPROCESSOR AND MICROCONTROLLER

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

CHAPTER 1 MICROCOMPUTER SYSTEMS. 1.1 Introduction. 1.2 Microcontroller Evolution

DQ8051. Revolutionary Quad-Pipelined Ultra High performance 8051 Microcontroller Core

MODULE-1. Short Answer Questions

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

CPEG300 Embedded System Design. Lecture 3 Memory

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

UNIT MICROCONTROLLER AND ITS PROGRAMMING

Segment 1A. Introduction to Microcomputer and Microprocessor


PREPAID ENERGY METER

Chapter 09. Programming in Assembly

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Introduction To MCS-51

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

MICROPROCESSOR BASED SYSTEM DESIGN

The abbreviation CNC stands for Computer Numerical Control

3.1 Description of Microprocessor. 3.2 History of Microprocessor

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A

Microcontroller and Embedded Systems:

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

Serial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07)

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Introducing The MCS 251 Microcontroller -- 8XC251SB

Three criteria in Choosing a Microcontroller

Introduction to Microcontrollers

Microprocessor Architecture

The Final Word on 8051 Microcontroller

ENE 334 Microprocessors

8051 Serial Communication

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

AVR Microcontrollers Architecture

VALLIAMMAI ENGINEERING COLLEGE

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.


8051 MICROCONTROLLER

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

THE 8051 MICROCONTROLLER

8086 INTERNAL ARCHITECTURE

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Architecture of 8085 microprocessor

Module Contents of the Module Hours COs

Computer Hardware Requirements for Real-Time Applications

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

EC6504 MICROPROCESSOR AND MICROCONTROLLER

ISSI. IS89C51 CMOS SINGLE CHIP 8-BIT MICROCONTROLLER with 4-Kbytes of FLASH ISSI IS89C51 NOVEMBER 1998 FEATURES GENERAL DESCRIPTION

Lesson-3: Counters and Timers

UNIT MICROCONTROLLER

MCS-51 Serial Port A T 8 9 C 5 2 1

4. (a) With a neat sketch explain 8237 DMA controller and its operation? (b) With the help of basic cell explain SRAM and DRAM?

Four Categories Of 8085 Instructions That >>>CLICK HERE<<<

8051 Microcontroller memory Organization and its Applications

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS

MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d.

Transcription:

Page 1 ENE 334 Microprocessors Lecture 7: MCS-51 Architecture I : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/

ENE 334 MCS-51 Architecture I Page 2 Outlines: 8051 Microcontroller Hardware Input/Output Pins, Ports, and Circuits External Memory Counters and Timers Serial Data I/O Interrupts

ENE 334 MCS-51 Architecture I Page 3 Reference: Textbooks Kenneth J. Ayala, The 8051 Microcontroller, Architecture, Programming, and Applications, West Publishing Company, Second edition, 1997.

ENE 334 MCS-51 Architecture I Page 4 Reference: MCS@51 MICROCONTROLLER FAMILY USER S MANUAL, Intel, February 1994.

ENE 334 MCS-51 Architecture I Page 5 Introduction: The microprocessor (computer on a chip): first became a commercial reality in 1971 (the 4-bit 4004 by Intel). A by-product of microprocessor development was the microcontroller.

Introduction: The family ENE 334 MCS-51 Architecture I Page 6

Introduction: The family ENE 334 MCS-51 Architecture I Page 7

ENE 334 MCS-51 Architecture I Page 8 8051: Architecture Outlines - Describe the features of the 8051. - List the internal registers of the 8051 microcontroller and their functions. - Draw the machine cycle for the 8051 microcontroller. - State the physical differences between the Port 0, 1, 2, and 3 I/O pins. - Describe the various operating modes of the timer/counters and associated control registers.

ENE 334 MCS-51 Architecture I Page 9 8051: Architecture Outlines - Describe the various operating modes of the UART(Universal Asynchronous Recevier Transmitter), and associated control registers. - List the types of interrupts, the interrupt program addresses, and the interrupt control registers.

ENE 334 MCS-51 Architecture I Page 10 8051: Hardware The 8051 microcontroller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751 and are available in N- Channel Metal Oxide Silicon (NMOS) and Complementary Metal Oxide Silicon (CMOS) construction in a variety of package types. An enhanced version of the 8051, the 8052, also exists with its own family of variations and even includes one member that can be programmed in BASIC.

ENE 334 MCS-51 Architecture I Page 11 8051: Hardware We will study a generic 8051, housed in a 40-pin DIP, and direct the investigation of a particular type to the data books. The block diagram of the 8051 in Figure shows all of the features unique to microcontrollers:

ENE 334 MCS-51 Architecture I Page 12 8051: features - Eight-bit CPU optimized for control applications with registers A (the accumulator) and B - Extensive Boolean processing capabilities - Sixteen-bit program counter (PC) and data pointer (DPTR) - 64K Program Memory address space - 64K Data Memory address space - Eight-bit program status word (PSW) - Eight-bit stack pointer (SP) - Internal ROM or EPROM (8751) of 0 (8031) to 4K (8051)

ENE 334 MCS-51 Architecture I Page 13 8051: features - Internal RAM of 128 bytes: - Four register banks, each containing eight registers - Sixteen bytes, which may be addressed at the bit level - Eighty bytes of general-purpose data memory - Thirty-two input/output pins arranged as four 8-bit ports: P0 P3 - Two 16-bit timer/counters: T0 and T1

ENE 334 MCS-51 Architecture I Page 14 8051: features - Full duplex serial data receiver/transmitter: SBUF - Control registers: TCON, TMOD, SCON, PCON, IP, and IE - Two external and three internal interrupt sources (6-source/5-vector interrupt structure with two prioritylevels) - Oscillator and clock circuits (on-chip)

8051: Block Diagram ENE 334 MCS-51 Architecture I Page 15

8051: Block Diagram ENE 334 MCS-51 Architecture I Page 16

8051: Programming Model ENE 334 MCS-51 Architecture I Page 17

8051: Memory Structure ENE 334 MCS-51 Architecture I Page 18

8051: DIP Pin Assignments ENE 334 MCS-51 Architecture I Page 19

8051: Oscillator & Timing ENE 334 MCS-51 Architecture I Page 20

8051: State Sequences ENE 334 MCS-51 Architecture I Page 21

8051: State Sequences ENE 334 MCS-51 Architecture I Page 22

ENE 334 MCS-51 Architecture I Page 23 8051: Oscillator & Clock The manufacturers make available 8051 designs that can run at specified maximum and minimum frequencies, typically 1 megahertz to 16 megahertz. Minimum frequencies imply that some internal memories are dynamic and must always operate above a minimum frequency or data will be lost.

ENE 334 MCS-51 Architecture I Page 24 8051: Oscillator & Clock The clock frequency, f, establishes the smallest interval of time within the microcontroller, called the pulse, P, time. The smallest interval of time to accomplish any simple instruction, or part of a complex instruction, however, is the machine cycle. The machine cycle is itself made up of six states. A state is the basic time interval for discrete operations of the microcontroller such as fetching an opcode byte, decoding an opcode, executing an opcode, or writing a data byte. Two oscillator pulses define each state.

ENE 334 MCS-51 Architecture I Page 25 8051: Oscillator & Clock Program instructions may require one, two, or four machine cycles to be executed, depending on the type of instruction. Instructions are fetched and executed by the microcontroller automatically, beginning with the instruction located at ROM memory address 0000h at the time the microcontroller is first reset.

ENE 334 MCS-51 Architecture I Page 26 8051: Oscillator & Clock Note: there are two ALE pulses per machine cycle. The ALE pulse, which is primarily used as a timing pulse for external memory access, indicates when every instruction byte is fetched. Two bytes of a single instruction may thus be fetched, and executed, in one machine cycle. Single byte instructions are not executed in a half cycle, however. Single-byte instructions throwaway the second byte (which is the first byte of the next instruction.) The next instruction is then fetched in the following cycle.

ENE 334 MCS-51 Architecture I Page 27 8051: SFR Program Counter and Data Pointer The 8051 contains two 16-bit registers: the program counter (PC) and the data pointer (DPTR). Each is used to hold the address of a byte in memory.

ENE 334 MCS-51 Architecture I Page 28 8051: SFR A and B CPU 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 (CPU). The other 32 are arranged as part of internal RAM in four banks, B0 B3, of eight registers and comprise the mathematical core.

ENE 334 MCS-51 Architecture I Page 29 8051: SFR A and B CPU Registers The A (accumulator) register is the most versatile of the two CPU registers and is used for many operations, including addition, subtraction, integer multiplication and division, and Boolean bit manipulations. The A register is also used for all data transfers between the 8051 and any external memory. The B register is used with the A register for multiplication and division operations and has no other function other than as a location where data may be stored.

ENE 334 MCS-51 Architecture I Page 30 8051: SFR Flags and the 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 flags and make decisions based on the flag states. In order that the flags may be conveniently addressed, they are grouped inside the program status word (PSW) and the power control (PCON) registers.

8051: PSW ENE 334 MCS-51 Architecture I Page 31

ENE 334 MCS-51 Architecture I Page 32 8051: PSW The PSW contains the math flags, user program flag F0, and the register select bits that identify which of the four general-purpose register banks is currently in use by the program. The remaining two user flags, GF0 and GF1, are stored in PCON. The math flags include Carry (C), Auxiliary Carry (AC), Overflow (OV), and Parity (P). User flags are general-purpose flags that may be used by the programmer to record some event in the program.

ENE 334 MCS-51 Architecture I Page 33 8051: SFR Note: that all of the flags can be set and cleared by the programmer at will. The math flags, however, are also affected by math operations.

8051: Internal RAM Organization ENE 334 MCS-51 Architecture I Page 34

ENE 334 MCS-51 Architecture I Page 35 8051: Internal RAM Organization Unlike microcontrollers with Von Neumann architectures, which can use a single memory address for either program code or data, but not for both, the 8051 has a Harvard architecture, which uses the same address, in different memories, for code and data. Internal circuitry accesses the correct memory based on the nature of the operation in progress.

To be continued: ENE 334 MCS-51 Architecture I Page 36