Lecture 1. Course Overview and The 8051 Architecture

Similar documents
8051 Microcontroller

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

ENE 334 Microprocessors

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

8051 Microcontroller

UNIT IV MICROCONTROLLER

8051 Microcontrollers

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

8051 microcontrollers

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

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Three criteria in Choosing a Microcontroller

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

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

BASIC INTERFACING CONCEPTS

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

ITT Technical Institute. ET2640 Microprocessors and Microcontrollers Onsite and Online Course SYLLABUS

Department of Electronics and Instrumentation Engineering Question Bank

Fig 1. Block diagram of a microcomputer

MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051:

Lecture 2. Silicon Labs C8051F020 System Overview

8051 MICROCONTROLLER

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

Basic Components of Digital Computer

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

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

8051 Microcontroller memory Organization and its Applications

MICROCONTROLLER UNIT 1

CPEG300 Embedded System Design. Lecture 3 Memory

UNIT MICROCONTROLLER AND ITS PROGRAMMING

Question Bank Microprocessor and Microcontroller

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

Fig 1. Block diagram of a microcomputer

CS 320. Computer Architecture Core Architecture

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

8051 MICROCONTROLLER

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

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

Sencer Yeralan and Helen Emery Gainesville, Florida January 2000

MICROCONTROLLERS 8051

Introduction To MCS-51

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

Figure Programming model

CHAPTER 1 MICROCOMPUTER SYSTEMS. 1.1 Introduction. 1.2 Microcontroller Evolution

Computer Hardware Requirements for Real-Time Applications

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack


Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Microcontroller and Embedded Systems:

EMBEDDED SYSTEM BASICS AND APPLICATION

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

EE6502- MICROPROCESSOR AND MICROCONTROLLER

AVR Microcontrollers Architecture

PGT302 Embedded Software Technology. PGT302 Embedded Software Technology

UNIT MICROCONTROLLER


UNIT 5. Microcontrollers. Syllabus

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

MODULE-1. Short Answer Questions

C O M P A N Y O V E R V I E W

Microprocessors/Microcontrollers

Microcontroller & Interfacing

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

ENE 334 Microprocessors

EC6504 MICROPROCESSOR AND MICROCONTROLLER

Microcomputer Architecture and Programming

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

THE 8051 MICROCONTROLLER Simple comparison: Pentium vs. 8051

Introduction to Microcontrollers

MICROPROCESSOR BASED SYSTEM DESIGN

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

Microprocessor (COM 9323)

ATmega128. Introduction

C8051 Legacy-Speed 8-Bit Processor Core

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad


ELC4438: Embedded System Design Embedded Processor

Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT- IV

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

SH57K12. High Performance 8031 Microcontroller. Preliminary. Features. General Description

EC Microprocessor and Microcontroller

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

Microcontrollers. Microcontroller

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.


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

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

The MAXQ TM Family of High Performance Microcontrollers

Segment 1A. Introduction to Microcomputer and Microprocessor

8051 Overview and Instruction Set

1 Introduction to Microcontrollers

Set No.1. Code No: R

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Calendar Description

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Transcription:

Lecture 1 Course Overview and The 8051 Architecture

MCUniversity Program Lectures 8051 architecture t System overview of C8051F020 8051 instruction set System clock, crossbar and GPIO Assembler directives Programming using C language Interrupts Timer operations and programming Serial communication DAC and comparator ADC 2

Course Syllabus Lecture Tutorial Topic Questions Lab number and Topic Language 1 Course overview and 8051 architecture 1 2 System overview of C8051F020 2 0. Prelab: Working with the tools 3 Toolstick Platform Overview 4 8051 Instruction Set 3 5 System Clock, Crossbar, and GPIO 4 1. Blinky (no timers) Assembly 6 Assembler Directives 5 2. 16x16 Multiply Assembly 7 Programming using C Language 6 3. Blinky (no timers) C 8 Interrupts 7 9 Timer Operations and Programming 8 4. Blinky (timer with ISR) Assembly 5. Blinky (timer with ISR) and other timer operations C 6. Switch debouncing C 10 Serial Communication 9 7. Serial Communication and LCD C 11 DAC and Comparator 8. Analog Comparators C 9. DAC C 12 ADC 10 10. ADC C 3 Lectures and Tutorial questions are based on the Embedded Programming with Field-Programmable Mixed-Signal Microcontrollers Textbook

Course Goals At the end of this course, you should be able to: Understand the architecture of one of the most popular microcontroller (MCU) families Use an integrated development environment (IDE) to program and debug an MCU Program an MCU using Assembly and C languages g Understand and use peripherals integrated into an MCU Interface an MCU to simple external components Understand and use interrupts Use timers in various modes Communicate using a serial interface Understand and use analog to digital converters (ADC), digital to analog converters (DAC) and comparators 4

Course Prerequisites A course in Electric Circuits it that t includes understanding di basic electronic components such as resistors, capacitors, diodes and transistors A course in basic digital logic design that includes logic gates and dboolean arithmetic ih i Ability to program in a high-level programming language such as C or C++ 5

The 8051 Architecture Microprocessors and microcontrollers The 8051 microcontroller: a brief history Block diagram of the original 8051 Is 8-bit still relevant? Harvard and von Neumann architectures Memory organization Special function registers 6

Microprocessors and Microcontrollers Microprocessor: general-purpose CPU Emphasis is on flexibility and performance Generic user-interface such as keyboard, mouse, etc. Used in a PC, PDA, cell phone, etc. Microcontroller: microprocessor + memory on a single chip Emphasis is on size and cost reduction The user interface is tailored to the application, such as the buttons on a TV remote control Used in a digital watch, TV remote control, car and many common day-to-day y appliances 7

Terminology Integrated t Circuit it (IC): A miniaturized i i electronic circuit it that t consists of semiconductor devices and passive components contained in a package Central Processing Unit (CPU): This refers to the core of the MCU that executes code Microcontroller Unit (MCU): This is the standard acronym used for microcontrollers, and refers to the full IC that contains the CPU and peripherals. n-bit the n refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time Examples: 8-bit MCU, 32-bit MCU 8

Microcontroller Architectures Microcontroller architecture t refers to the internal hardware organization of a microcontroller Each hardware architecture has its own set of software instructions called assembly language that allows programming of the microcontroller Some of the popular microcontroller architectures Intel 8051 Zilog Z80 Atmel AVR 9

The 8051 Microcontroller A Brief History In 1980, Intel introduced d the 8051, relevant today after more than two decades First device in the MCS-51 family of 8-bit microcontrollers In addition to Intel there are other second source suppliers of the ICs, who make microcontrollers that are compatible with the 8051 architecture. In recent years some companies have incorporated many different and additional features into 8051 In 2000, Silicon Laboratories introduced a field programmable, mixed-signal chip (C8051F020) based on the 8051 core CPU This will be the platform for this course. 10

Is 8-bit Still Relevant? n-bit the n refers to the data bus width of the CPU, and is the maximum width of data it can handle at a time PCs with 64-bit microprocessors are becoming common Over 55% of all processors sold per year are 8-bit processors, which comes to over 3 billion of them per year!* 8-bit microcontrollers are sufficient and cost-effective for many embedded applications More and more advanced features and peripherals are added to 8-bit processors by various vendors 8-bit MCUs are well-suited for low-power applications that use batteries *Note: Statistics from Embedded.com Article ID# 9900861, Dec 2002 11

Example System: RC Car Antenna Antenna Forward Reverse Microcontroller RF Transmitter RF Receiver Microcontroller Front Electric Motor (Left/Right) Left Power Power Rear Electric Motor (Fwd/Reverse) Right Controls Voltage Regulator Batteries Voltage Regulator Batteries Car lights (LEDs) 12

Block Diagram of the Original 8051 /INT0 /INT1 T0 T1 Other interrupts 128 bytes Data Memory (RAM) 4K byte Program Memory (ROM) Timer/Counter (Timer 0 & Timer 1) 8051 CPU Oscillator &Timing 64 K Bus Expansion Control I/O ports Serial Port From Crystal Oscillator or RC network ALE /PSEN P3 P2 P1 P0 (Address/data) TxD RxD 13

14 Block Diagram of the Silicon Labs 8051

Harvard and von Neumann Architectures Harvard Architecture a t type of computer architecture t where the instructions (program code) and data are stored in separate memory spaces Example: Intel 8051 architecture von Neumann Architecture another h type of computer architecture where the instructions and data are stored in the same memory space Example: Intel x86 architecture (Intel Pentium, AMD Athlon, etc.) 15

MCU Fetch-Execute Cycle Fetch operation retrieves retrie es an instruction from the location in code memory pointed to by the program counter (PC) Execute operation executes the instruction that was fetched during the fetch operation. In addition to executing the instruction, the CPU also adds the appropriate number to the PC to point it to the next instruction to be fetched. Code Memory F e t c h Program Counter (PC) CPU + To other peripherals 16

8051 and 8052 The feature set of the 8052 is the superset of the 8051 In addition to all the features of the 8051, the 8052 includes 128 bytes internal RAM (total of 256 bytes) A third 16-bit timer, with new modes of operation Additional SFRs to support the third timer The Silicon Labs C8051F020 builds upon the 8052, and adds further features The term 8051 is typically used in place of 8052, and also refers to the 8051 architecture 17

C8051F020 Data Memory (RAM) Internal Data Memory space is divided into three sections Lower 128 Upper 128 Special function register (SFR) There are 384 bytes of memory space physically, though the Upper 128 and SFRs share the same addresses from location 80H to FFH. Appropriate instructions ti should be used to access each memory block 18

Lower 128 Register Banks and RAM General Purpose RAM (80 bytes) Bit-addressable Area (16 bytes) Register Banks (8 bytes per bank; 4 banks) 19

Special Function Registers (SFRs) SFRs provide control and data exchange with the microcontroller s resources and peripherals Registers which have their byte addresses ending with 0H or 8H are byte- as well as bit- addressable Some registers are not bitaddressable. These include the stack pointer (SP) and data pointer register (DPTR) 20

Summary of SFRs Accumulator (ACC) and B register ACC (also referred to as A) is used implicitly by several instructions B is used implicitly in multiply and divide operations These registers are the input/output of the arithmetic and logic unit (ALU) Program status word PSW Shows the status of arithmetic and logical operations using multiple bits such as Carry Selects the Register Bank (Bank 0 - Bank 3) Stack pointer SP Data pointer DPTR (DPH and DPL) 16-bit register used to access external code or data memory Timer Registers TH0, TL0, TH1, TL1, TMOD, TCON Used for timing intervals or counting events Parallel I/O Port Registers P0, P1, P2 and P3 Serial Communication Registers SBUF and SCON Interrupt Management Registers IP and IE Power Control Register PCON 21

www.silabs.com/mcu