Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.

Slides:



Advertisements
Similar presentations
Chapter 18 The 8051 Microcontroller
Advertisements

Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Chapter 2 HARDWARE SUMMARY
8051 Core Specification.
Introduction of Holtek HT-46 series MCU
Architecture of the 8051 INTERNAL DATA BUS Oscillator & Timing Programmable I/O (32 Pins) 80C51 CPU 64K byte Expansion Control Serial I/O 4K Program Memory.
Microcontroller 8051.
Embedded Systems UNIT 3. Pin Details of 8051 Pins 1-8: Port 1 Each of these pins can be configured as an input or an output. Pin 9: The positive voltage.
The 8051 Microcontroller architecture
Microcontroller 8051.
ECE/CS-352: Embedded Microcontroller Systems Embedded Microcontroller Systems.
Microcontroller Intel 8051 [Architecture]. The Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and.
CIT 673 Created by Suriyong1 MCS51 ASSEMBLY Language Resources
CoE3DJ4 Digital Systems Design Hardware summary. Microprocessors vs. Microcontrollers Microprocessors are single-chip CPU used in microcomputers Microcontrollers.
8051 Micro controller. Architecture of 8051 Features of 8051.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
Microcontrollers. An embedded microcontroller is a chip which a computer processor with all it’s support functions (clocking and reset), memory, and i/O.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
Presented by Sadhish Prabhu
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
Chapter Microcontroller
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
HJD Institute of Technical Education & Research- Kera(Kutch) The 8051 Microcontroller architecture PREPARED BY: RAYMA SOHIL( )
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Embedded Microcontroller Systems
Seminar On 8085 microprocessor
The 8051 Microcontroller architecture
COURSE OUTCOMES OF Microprocessor and programming
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
80C51 Block Diagram ECE Overview.
8085 INTRODUCTION The features of INTEL 8085 are :
Embedded Microcontroller Systems
Classification of Instruction Set of 8051
Introduction to Micro Controllers & Embedded System Design Microprocessor/Microcontroller Department of Electrical & Computer Engineering Missouri University.
UNIT – Microcontroller.
8051 Microcontroller Features and its Applications
SERIAL PORT PROGRAMMING
Lecture Set 5 The 8051 Instruction Set.
Introduction of microprocessor
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Interrupt Source: under
ECE,JYOTHI ENGG COLLEGE
Dr. Michael Nasief Lecture 2
8085 microprocessor.
Introduction to Micro Controllers & Embedded System Design Interrupt
UNIT 5 TIMRERS/COUNTERS
Introduction to Micro Controllers & Embedded System Design I/O Processing and Serial Port Operation Department of Electrical & Computer Engineering Missouri.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Data bus CPU General Purpose microprocessor RAM ROM I/O Port Timer
Microcontroller Intel 8051
8051 MICROCONTROLLER MODULE IV
Introduction to Microprocessors and Microcontrollers
Introduction to Micro Controllers & Embedded System Design Microprocessor/Microcontroller Department of Electrical & Computer Engineering Missouri University.
Introduction to Micro Controllers & Embedded System Design Timer Operation Department of Electrical & Computer Engineering Missouri University of Science.
8051 Single Board Computer (SBC) Version 1.0
Timer.
(Electrical Engg 6th Semester)
Memory organization On- chip memory Off-chip memory
The 8051 Microcontroller (8 bit )
Microcontroller 8051 Made By: Arun Branch. 4th Sem. I&C Engg.
8051 Microcontroller.
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
First Design Key board R L S.
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
8051 Micro Controller.
The 8051 Microcontroller (8 bit )
Presentation transcript:

Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE. Intel 8051 Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE. Dr.NSS/ECE April 12, 2019

What is microcontroller? Intel 8051 - Introduction What is microcontroller? Microcontroller is a single IC which contains the CPU along with peripherals like memory, serial ports, parallel ports, timer/counter, interrupt controller, data acquisition interfaces like ADC, DAC, etc. CPU On-chip ROM RAM Timers I/O Ports ADC, etc. Dr.NSS/ECE April 12, 2019

Intel 8051 - Introduction Features of Intel 8051 40 Pin DIP chip operating at 12 MHz Data bus size = 8-bit Address bus size = 16-bit (Memory capacity = 216 = 64 KB) On-chip RAM = 128 Bytes On-chip ROM = 4 KB 2 In-built Timers (16-bits each) 4 I/O Ports ( 8-bit each) 1 Serial port (Full Duplex) Interrupt Sources = 6 ( inclusive of two H/w interrupts – INT0, INT1) Register organization 8-bit register = A, B, SP, 4 x Register banks (with 8 registers in each bank) 16-bit register = PC, DPTR Special Function Registers (SFRs). Dr.NSS/ECE April 12, 2019

Intel 8051 – Pin Diagram & Description Dr.NSS/ECE April 12, 2019

Intel 8051 – Architecture block diagram Dr.NSS/ECE April 12, 2019

Intel 8051 – Special Function Register Dr.NSS/ECE April 12, 2019

Intel 8051 – PSW : Program Status Word (Flag Register) Dr.NSS/ECE April 12, 2019

Intel 8051 – Memory Organization PROGRAM MEMORY EA (External Access) is the pin that informs the microcontroller about the usage of external memory. EA = GND External memory is ONLY used EA = VCC No External memory is connected DATA MEMORY Dr.NSS/ECE April 12, 2019

Intel 8051 – Structure of Internal RAM Dr.NSS/ECE April 12, 2019

Intel 8051 – I/O Ports & Pin Structure A pin of any I/O port of 8051 has following 3 major components.. i) Latch ii) Driver transistor iii) Tri-state buffer (2 Nos) The difference in pin structure of Port 0 and Ports 1, 2 & 3 is internal pull-up resistor in driver transistor. The control signals for the I/O port are Read Latch, Write Latch and Read Pin. The instruction that reads the pin of an I/O port is MOV A, P1 The instruction that reads the latch of an I/O port is ANL A, P1 Dr.NSS/ECE April 12, 2019

Intel 8051 – Timers and Counters Timers / Counters in 8051 are used to generate time delay for timed operations for counting the occurrence of external events. The two 16-bit registers for Timer/Counter operations in 8051 are, Timer 0 Timer 1 The two 8-bit Timer control registers in 8051 are, TMOD TCON Dr.NSS/ECE April 12, 2019

Intel 8051 – Timers and Counters Timer Mode Control Register (TMOD): Dr.NSS/ECE April 12, 2019

Intel 8051 – Timers and Counters Timer Control Register (TCON): Dr.NSS/ECE April 12, 2019

Intel 8051 – Timers and Counters Timer mode: In this mode, the timer register is used to generate the time delay using the clock signal is applied to the processor. The register is incremented after every machine cycle. Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency. Dr.NSS/ECE April 12, 2019

Intel 8051 – Timers and Counters Counter mode: In this mode, the timer register is used to count the event using external pulses supplied through counter inputs T0 & T1. Dr.NSS/ECE April 12, 2019

Intel 8051 – Serial Communication Types of Serial communication There are two main types of Serial communication are (i) Synchronous and (ii) Asynchronous serial communications. The most commonly used is Asynchronous serial communications. The bit format for asynchronous data transmission in UART is, Dr.NSS/ECE April 12, 2019

Intel 8051 – Serial Communication The serial communication in 8051 is carried out using two SFR registers, * SCON * SBUF SCON is used to control and set the mode of serial communication. SBUF is used to dump the data before serial transmission and hold data after serial reception. Dr.NSS/ECE April 12, 2019

Intel 8051 – Serial Communication Serial Port Control Register (SCON): SCON register is used to control the serial communication between 8051 and any external peripherals. Dr.NSS/ECE April 12, 2019

Intel 8051 – Serial Communication Baud rate Generation: Based on the baud rate needed for serial communication, the timer register TH1 is loaded with values as follows. Baud rate Frequency Divisor Hex value loaded in TH1 register 9600 03 FD 4800 06 FA 2400 12 EE 1200 24 DC Dr.NSS/ECE April 12, 2019

Intel 8051 – Interrupts The six sources of interrupt in 8051 are as follows.. RST - Reset 8051 INT0 - Hardware Interrupt – I INT1 - Hardware Interrupt – II TF0 - Timer-0 overflow Interrupt flag TF1 - Timer-1 overflow Interrupt flag TI/RI - Serial port Interrupts All above interrupts are disabled upon reset, except RST. The interrupts are enabled and its priority is set by using two 8-bit SFR registers IE & IP. Dr.NSS/ECE April 12, 2019

Intel 8051 – Interrupts Interrupt Enable Register (IE): The IE register is used to enable/disable the interrupts of 8051. The interrupts are recognized by the controller only if they are enabled. The format of IE register is, Dr.NSS/ECE April 12, 2019

Intel 8051 – Interrupts Interrupt Priority The 8051 has five interrupts, excluding RST. The normal priority of these interrupts from highest to lowest are INT0 - External interrupt-0 TF0 - Timer-0 overflow interrupt INT1 - External interrupt-1 TF1 - Timer-1 overflow interrupt TI/RI - Serial Port interrupt. Dr.NSS/ECE April 12, 2019

Intel 8051 – Interrupts The IP register can be programmed to alter the default priority of any of the interrupt. The priority of any interrupt can be set as highest, by making the priority bit of that particular interrupt programmed as ‘1’. The priority is set to normal, when the priority bit of that interrupt is reset to ‘0’. The format of IP register is, Dr.NSS/ECE April 12, 2019

Programming 8051 ADDRESSING MODES: The 8051 has the following types of addressing. Immediate Addressing - Eg. MOV A, #6CH Direct Addressing - Eg. MOV A, 07 H Register Addressing - Eg. MOV R2, A Register Indirect Addressing - Eg. MOV A, @Ri Indexed Addressing - Eg. MOVX A, @A+DPTR Dr.NSS/ECE April 12, 2019

Programming 8051 INSTRUCTION SET : The instructions can be classified into the following five groups. Data transfer instructions Arithmetic instructions Logical instructions Branching instructions Single bit instructions Dr.NSS/ECE April 12, 2019

MOV A, Source MOV Rn, Source MOV Direct, Source MOV indirect, Source MOV DPTR, … MOVC A, … MOVX A, … PUSH, POP (Stack) Exchange A, … Dr.NSS/ECE April 12, 2019

ADD A, II Source ADDC A, II Source SUBB A, II Source INC Source DEC Source INC DPTR MUL AB (Multiply) DIV AB (Division) Dr.NSS/ECE April 12, 2019

AND A, II Source OR A, II Source X-OR A, II Source Clear Complement Rotate Swap Dr.NSS/ECE April 12, 2019

CALL Subroutine Return Unconditional Jump Conditional Jump Compare & Jump Decrement & Jump No Operation Dr.NSS/ECE April 12, 2019

Clear Bit Set Bit Complement Bit AND Bits OR Bits MOV Bit Dr.NSS/ECE April 12, 2019

Intel 8051 – LCD Interface The status of RS, R/W and E pins for data & command operations in LCD. Pin / Operation Command Data RS (Register Select) 1 R/W (Read/Write) 0 – Write 1 – Read E (Enable) H-to-L Pulse Dr.NSS/ECE April 12, 2019

Intel 8051 – LCD Interface Two methods for sending data / command to LCD I Method: Using predefined time delay II Method: By Checking the busy flag Dr.NSS/ECE April 12, 2019

Intel 8051 – Keyboard Interface The rows and columns of the matrix keyboard (eg., 4 x 4) is connected to two ports of the microcontroller (port 1 as output port and port 2 as input port). Dr.NSS/ECE April 12, 2019

Intel 8051 – Keyboard Interface Keyboard Scanning Process: All rows are first grounded and all columns are checked for key pressing. If a key in any column found pressed; then rows are resetted and rows are now grounded one by one and all columns are again checked. When the exact row and column of key pressed in found and scan code for corresponding key is generated and sent to the microcontroller. (Explain the Flow Chart) Dr.NSS/ECE April 12, 2019

Intel 8051 – ADC Interface Dr.NSS/ECE April 12, 2019

Intel 8051 – DAC DAC INTERFACE DAC stands for Digital to Analog Converter. Types of DAC : 1) Average Weighted Resistor method 2) R/2R ladder Network (most widely used) Resolution: The change in output for the minimum change in input. (R=Vref / 2n) Conversion Time: It is the time taken to completely convert the digital signal into a analog signal in the D/A converter and the minimum conversion time in DAC0808 is 110µS. R/2R ladder network method is most commonly used in DAC and output of a DAC is given by, Output of a DAC is generally in current (I) form and it is converted into voltage form with the help of a resistor. Dr.NSS/ECE April 12, 2019

Intel 8051 – DAC Interface Dr.NSS/ECE April 12, 2019