MCS51 - part 2. Lecture 2 2/17 MCS51 functioning Clock generator Machine & instruction cycles Paralell ports Reset.

Slides:



Advertisements
Similar presentations
The 8051 MicroController In this module, we will be discussing the MCS-51 family of microcontroller, in particular the 8051, which is the generic IC representative.
Advertisements

Chapter 18 The 8051 Microcontroller
Chapter 4 I/O Port Programming
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Chapter Microcontroller Objectives  Understand the 8051 Architecture  Use SFR in C  Use I/O ports in C.
Chapter 2 HARDWARE SUMMARY
8051 Core Specification.
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Chapter Hardware Connection and Intel Hex File
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, Programming and Applications
The 8051 Microcontroller architecture
Microcontroller 8051.
Hardware Summary ECE473/573 Microprocessor System Design, Dr. Shiue.
1 LHO 12 Interfacing. 2 A simple bus bus structure ProcessorMemory rd'/wr enable addr[0-11] data[0-7] bus Wires: –Uni-directional or bi-directional –One.
Microcontroller Intel 8051 [Architecture]. The Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and.
Embedded Systems Design 1 Lecture Set 6 I/O Ports.
MICROCONTROLERUL ONIGA ŞTEFAN Curs 1999/ MICROCONTROLERE - Calculator pe un cip deoarece el conţine pe lângă CPU şi memorie şi interfeţe de.
MCS-51 Hardware Interfacing
The 8051 Microcontroller and Embedded Systems
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
CoE3DJ4 Digital Systems Design Hardware summary. Microprocessors vs. Microcontrollers Microprocessors are single-chip CPU used in microcomputers Microcontrollers.
Serial Communication Lec note 9.
An Introduction to Microcontroller (Hardware Specification) Lec note 4
MCS51 - part 1.
CHAPTER HARDWARE CONNECTION. Pin Description 8051 family members ◦ e.g., 8751, 89C51, 89C52, DS89C4x0) ◦ Have 40 pins dedicated for various functions.
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,
Microcontroller Intel 8051 [I/O Ports]. Pin out of the 8051 –40 pin package –32 pins are used for the 4 ports. –V CC / V SS –ALE Address Latch Enable.
The 8051 Microcontroller Prepared By, R-THANDAIAH PRABU M.E.,
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
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.
Memory Mapped IO (and the CerfBoard). The problem How many IO pins are available on the 8051? What if you are using interrupts, serial, etc…? We want.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
1 Contents: 3.1 Instruction format and Addressing Modes 3.2 Instruction Introduction Chapter 3 Instruction system.
The 8051 Microcontroller architecture
8051 Microcontroller Thanks to Prof. P.Suresh, RCET.
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
Introduction to Micro Controllers & Embedded System Design Microprocessor/Microcontroller Department of Electrical & Computer Engineering Missouri University.
Hardware Source: ttp:// under
Interrupt Source: under
The 8051 Family Microcontroller
8085 Microprocessor Architecture
Introduction to Micro Controllers & Embedded System Design I/O Processing and Serial Port Operation Department of Electrical & Computer Engineering Missouri.
Data bus CPU General Purpose microprocessor RAM ROM I/O Port Timer
The 8051 Microcontroller.
8051 MICROCONTROLLER MODULE IV
Memory organization On- chip memory Off-chip memory
The 8051 Microcontroller (8 bit )
8085 Microprocessor Architecture
Unit – Microcontroller Tutorial Class - 2 ANITS College
8051 Microcontroller.
Hardware Source: ttp:// under
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
JANAKIRAMAN E G S PILLAY ARTS AND SCIENCE COLLAGE NAGAPATTINAM DEPARTMENT OF PHYSICS.
INTRODUCTION TO 8051, A 8-BIT MICROCONTROLLER
8051 Micro Controller.
The 8051 Microcontroller (8 bit )
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
CHAPTER HARDWARE CONNECTION.
Presentation transcript:

MCS51 - part 2

Lecture 2 2/17 MCS51 functioning Clock generator Machine & instruction cycles Paralell ports Reset

MCS51 - clocking 3/17 Standard clocking range: 1,2 - 12MHz. Extensions of MCS51 family can be clocked 0Hz - >> 12MHz XTAL2 XTAL1 GND typical circuit external generator XTAL2 XTAL1 GND bufor TTL HMOS external generator XTAL2 XTAL1 GND bufor CMOS CHMOS built-in oscillator XTAL2 XTAL1 GND Φ 1 : 6MHz Φ 2 : 6MHz 12MHz 1 machine cycle

1 machine cycle = 1 instruction cycle Execution of 2, 1-byte instructions, lasting 1 machine cycle each, ex. MOV DEC R2. Codes fetched from external program memory 1 machine cycle = 1 instruction cycle Φ 1 Φ 2 PSEN ALE P0 P2 M, N, O - instruction codes: M=ROM[PC], N=ROM[PC+1], O=ROM[PC+2] MCS51 - machine cycles 4/17

1 machine cycle = 1 instruction cycle Execution of 2, 2-byte instructions, lasting 1 machine cycle each, ex. MOV R3,#5; ADD A,B. Codes fetched from external program memory 1 machine cycle = 1 instruction cycle Φ 1 Φ 2 PSEN ALE P0 P2 MN, OP, Q - instruction codes : M=ROM[PC], N=ROM[PC+1], O=ROM[PC+2], P=ROM[PC+3], Q=ROM[PC+4] MCS51 - machine cycles 5/17

1 machine cycle Execution of 1, 1-byte instruction, lasting 2 machine cycles ex. RET, INC DPTR. Codes fetched from external program memory 1 machine cycle Φ 1 Φ 2 PSEN ALE P0 P2 M, N - instruction codes : M=ROM[PC], N=ROM[PC+1] MCS51 - machine cycles 6/17 1 instruction cycle

1 machine cycle Execution of 1, 2-byte instruction, lasting 2 machine cycles, ex. PUSH B, SJMP label. Codes fetched from external program memory 1 machine cycle Φ 1 Φ 2 PSEN ALE P0 P2 MN, O - instruction codes : M=ROM[PC], N=ROM[PC+1], O=ROM[PC+3] MCS51 - machine cycles 7/17 1 instruction cycle

1 machine cycle Execution of 1, 3-byte instruction, lasting 2 machine cycles, ex. LCALL 23AAh, MOV DPTR,#1. Codes fetched from ext. program memory 1 machine cycle Φ 1 Φ 2 PSEN ALE P0 P2 MNO, P - instruction codes : M=ROM[PC], N=ROM[PC+1], O=ROM[PC+2] P=ROM[PC+3] MCS51 - machine cycles 8/17 1 instruction cycle

Execution of 1 instruction reading from external RAM,, ex. MOVX / MOVX M, N - instruction codes : M=ROM[PC], N=ROM[PC+1] MCS51 - machine cycles 9/17 1 machine cycle Φ 1 Φ 2 PSEN ALE RD P0 P2 1 instruction cycle

Execution of 1 instruction writing to external RAM, ex. / M, N - instruction codes: M=ROM[PC], N=ROM[PC+1] MCS51 - machine cycles 10/17 1 machine cycle Φ 1 Φ 2 PSEN ALE WR P0 P2 1 instruction cycle

D Q C Q Vcc P0.X external bus/register address & data output reading register internal data bus writing to register reading pin 1010 MCS51 - port P0 11/17 Structure of P0 bit - bidirectional

MCS51 - port P2 12/17 Structure of P2 bit - quasi-bidirectional D Q C Q Vcc P2.X external bus/register address output reading register internal data bus writing to register reading pin 1010

MCS51 - port P1 13/17 Structure of P1 bit - quasi-bidirectional D Q C Q Vcc P1.X reading register internal data bus writing to register reading pin

MCS51 - port P3 14/17 Structure of P3 bit - quasi-bidirectional with alternative function alternative function output reading register internal data bus writing to register reading pin alternative function input D Q C Q Vcc P3.X ! to activate alternative function of any bit, according bit in PX register should be set to „1”

MCS51 - port P3 15/17 Alternative functions of P3: P3.0 - RxD - serial input; P3.1 - TxD - serial output; P3.2 - INT0 - external interrupt #0; P3.3 - INT1 - external interrupt #1; P3.4 - T0 - input of pulses counted by timer #0; P3.5 - T1 - input of pulses counted by timer #1; P3.6 - WR - external data memory write strobe; P3.7 - RD - external data memory read strobe. In 80X52 also P1.0 i P1.1 have alternative functions : P1.0 - T2 - input of pulses counted by timer #2; P1.1 - T2EX - gating input for pulses counted by timer #2.

MCS51 - ports Px & instructions 16/17 Some instructions are read-modify-write type, i.e. read port register, change it in ALU and write-back to register. There are: ANLPx,arg ORLPx,arg XRLPx,arg JBCPx.bit,adrrel DJNZPx,adrrel CPLPx.bit CLRPx.bit SETPx.bit MOVPx.bit,C INCPx DECPx Instructions reading directly port pins: ANLarg,Px ORLarg,Px XRLarg,Px JBPx.bit,adrrel JNBPx.bit,adrrel CJNEA,Px,adrrel ADDA,Px ADDCA,Px SUBBA,Px MOVarg,Px XCHA,Px PUSHPx

MCS51 - reset 17/17 To reset MCU, high level voltage at RESET input should last at least 24 periods of clock. Internal RAM remains unchanged. SFR registers are set as following: PC = 0000hA = 00hTMOD = 00h DPTR = 0000hB = 00hTCON = 00h PSW = 00hP0 = 0FFhTH0 = 00h SP = 07hP1 = 0FFhTL0 = 00h PCON = 00hP2 = 0FFhTH1 = 00h SCON = 00hP3 = 0FFhTL1 = 00h SBUF = ??IP = 00hIE = 00h Vcc RESET GND Vcc RESET GND Vcc