8051 hardware summary



Similar documents
Flash Microcontroller. Memory Organization. Memory Organization

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Flash Microcontroller. Architectural Overview. Features. Block Diagram. Figure 1. Block Diagram of the AT89C core

Microcomputer Components SAB 80515/SAB 80C515 8-Bit Single-Chip Microcontroller Family

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

AT89C Bit Microcontroller with 1 Kbyte Flash. Features. Description. Pin Configuration

PART B QUESTIONS AND ANSWERS UNIT I

Cellphone Based Device Control With Voice Acknowledgement

CoE3DJ4 Digital Systems Design. Chapter 4: Timer operation

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Hardware and Software Requirements

DS87C520/DS83C520 EPROM/ROM High-Speed Micro

Microtronics technologies Mobile:

8031AH 8051AH 8032AH 8052AH NMOS SINGLE-CHIP 8-BIT MICROCONTROLLERS

8085 INSTRUCTION SET

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

Microprocessor & Assembly Language

MICROPROCESSOR AND MICROCOMPUTER BASICS

DS87C530/DS83C530. EPROM/ROM Micro with Real Time Clock PRELIMINARY FEATURES PACKAGE OUTLINE DALLAS DS87C530 DS83C530 DALLAS DS87C530 DS83C530

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Keil C51 Cross Compiler

8-bit Microcontroller with 8K Bytes In-System Programmable Flash. AT89LP52 - Preliminary

AN108 IMPLEMENTING A REALTIME CLOCK. Relevant Devices. Introduction. Key Points. Overview

Serial Communications

8-bit Microcontroller with 2/4-Kbyte Flash AT89LP2052 AT89LP4052

MACHINE ARCHITECTURE & LANGUAGE

CpE358/CS381. Switching Theory and Logical Design. Class 4

8051 MICROCONTROLLER COURSE

4 Character 5x7 LED Matrix Display

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

HT1632C 32 8 &24 16 LED Driver

8XC51FX CHMOS SINGLE-CHIP 8-BIT MICROCONTROLLERS

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Embedded. Engineer s. Development. Tool (EEDT 5.0)

Advanced Microcontrollers Grzegorz Budzyń Lecture. 3: Electrical parameters of microcontrollers 8051 family

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Instruction Set. Microcontroller Instruction Set. Instructions that Affect Flag Settings (1) The Instruction Set and Addressing Modes

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

Monitoring of Intravenous Drip Rate

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

8085 MICROPROCESSOR PROGRAMS

CHAPTER 7: The CPU and Memory

TDA General description. 2. Features and benefits. Low power single card reader

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

Faculty of Engineering Student Number:

Atmel 8051 Microcontrollers Hardware Manual

DS18B20 Programmable Resolution 1-Wire Digital Thermometer

8-bit Microcontroller with 12K Bytes Flash and 2K Bytes EEPROM AT89S8253

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

DS1307ZN. 64 x 8 Serial Real-Time Clock

CSE2102 Digital Design II - Topics CSE Digital Design II

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

7a. System-on-chip design and prototyping platforms

Chapter 1 Computer System Overview

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

The Programming Interface

C167Derivatives 16-Bit CMOS Single-Chip Microcontrollers. User's Manual Version Semiconductor/

(Refer Slide Time: 00:01:16 min)

DS1821 Programmable Digital Thermostat and Thermometer

ELEG3924 Microprocessor Ch.7 Programming In C

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Am186ER/Am188ER AMD Continues 16-bit Innovation

24-Bit Analog-to-Digital Converter (ADC) for Weigh Scales FEATURES S8550 VFB. Analog Supply Regulator. Input MUX. 24-bit Σ ADC. PGA Gain = 32, 64, 128

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Introduction. What is an Operating System?

64 x 8, Serial, I 2 C Real-Time Clock

Chapter 5, The Instruction Set Architecture Level

W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 13. PIC Family Microcontroller

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Content Map For Career & Technology

DS1621 Digital Thermometer and Thermostat

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

Low Power AMD Athlon 64 and AMD Opteron Processors

Z80 Instruction Set. Z80 Assembly Language

8-bit Flash Microcontroller with 64K bytes Program Memory AT89LP51RD2 AT89LP51ED2 AT89LP51ID2

CPU Organisation and Operation

Small Hardware Development and Prototyping Board for the SX28

Design Analysis of a Security Lock System using Pass-Code and Smart-Card

Computer-System Architecture

DP8570A DP8570A Timer Clock Peripheral (TCP)

Interfacing To Alphanumeric Displays

PIN ASSIGNMENT PIN QFP

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

Introduction to Microcontrollers

DS Real Time Clock FEATURES PIN ASSIGNMENT PIN DESCRIPTION

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

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

Interfacing Analog to Digital Data Converters

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

8-bit Microcontroller with 2K Bytes Flash AT89C2051

Transcription:

8051 hardware summary

8051 block diagram

8051 pinouts + 5V

ports port 0 port 1 port 2 port 3 : dual-purpose (general-purpose, external memory address and data) : dedicated (interfacing to external devices) : dual-purpose (general-purpose, external memory address and data) : dual-purpose (general-purpose, special features)

port 3 special features

bus control signals PSEN ALE EA RST : Program Store Enable (enables external program memory) : Address Latch Enable (demultiplexing the address and data bus) : External Access (program execution from external or internal memory, programming of internal PEROM) : Reset (system start-up)

on-chip oscillator inputs on-chip oscillator can either be driven by a crystal (~ 12 MHz) or a TTL clock source

I/O port structure 4 low-power Schottky TTL loads for ports 1, 2, 3 8 LS loads for Port 0

pull-up / pull-down resistors

TTL vs. CMOS Transistor-Transistor Logic BJTs (Bipolar Junction Transistor) + resistors low power consumption (more power consumption at rest, however it does not increase much with clock speed compared to CMOS) easier design rules slower Complementarysymmetry Metal-Oxide- Semiconductor MOSFETs (Metal-Oxide- Semiconductor Field- Effect-Transistors) high power consumption (it increases dramatically with clock speed) harder to design faster

TTL vs. CMOS (cont d) TTL NAND gate CMOS NAND gate

memory organization 128B internal RAM 4KB ROM can be expanded to 64KB code memory and 64KB data memory registers and I/O ports are memory-mapped and accessible like any other memory location stack resides within the internal RAM (unlike microprocessors using external RAM for stack)

internal RAM

general-purpose RAM 80B MOV direct addressing A, 5FH MOV R0, #5FH MOV A, @R0 indirect addressing 00H 2FH can be used as similar (80B + 48B = 128B) any location in the general-purpose RAM can be accessed freely using direct and indirect addressing modes

bit-addressable RAM 210 bit-addressable locations individually accessing bits SETB 67H microcontroller MOV A, 2CH ORL A, #10000000B MOV 2CH, A microprocessor

register banks PSW context-switching default by system reset MOV A, R5 register addressing 1B MOV A, 05H direct addressing 2B

Special Function Registers 21 SFRs some of them are both bitaddressable and byteaddressable SETB E0H E0H : bit-address of the accumulator E0H : byte-address of the accumulator P0 : 80H (80H 87H) {10000xxx}

Program Status Word

CarrY flag of PSW arithmetic operations boolean accumulator ADD A, #1 ; A = FFH ANL C, 25H CY is set result is stored in CY

Auxiliary Carry flag of PSW checks the lower nibble of result in BCD addition XXXX 1010 if {0AH OFH} AC is set DA A ; Decimal Adjust Accumulator (result back in range 9) DA must follow the addition

Flag 0 of PSW general-purpose flag bit, F0 (for user applications)

Register bank Select bits of PSW SETB SETB MOV RS1 RS0 A, R7

OVerflow flag of PSW when unsigned numbers are added or subtracted, OV can be ignored when signed numbers are added or subtracted, results out of {-128 to +127} sets OV

Parity bit of PSW P bit is automatically set or cleared with each machine cycle (even parity check on accumulator) if [number of 1 s in accumulator] + 1 = even then (P = 1)

B register MUL AB ; A(8-bit) X B(8-bit) = 16-bit result (high-byte, low-byte) DIV AB ; A(8-bit) / B(8-bit) = 8-bit integer result, 8-bit remainder it can also be used as a generalpurpose scratch-pad register

Stack Pointer 32B SS push -> first SP+1, then write data pop -> first read data, then SP-1 default by system reset : 07H MOV SP, #5FH ; beginning address of stack = 60H!!! be very careful of what you are doing if you do not initialize your own stack space but still use context switching, and PUSH, POP, ACALL, LCALL, RET, RETI instructions on stack space (SS)

Data PoinTeR high-byte - DPH low-byte - DPL accessing external code or external data memory MOV A, #55H ; immediate addressing MOV DPTR, #1000H ; immediate addressing MOVX @DPTR, A ; indirect addressing 55H

Port registers ports 0,2 and 3 may not be available for I/O if external memory is used or if some 8051 special features (interrupts, serial ports, etc.) are used P1.2 to P1.7 are always available for general purpose I/O lines WAIT: SETB P1.7 CLR P1.7 JB P1.5, WAIT 1 device busy 0 device ready

Timer registers two 16-bit timer/counters high-byte TH1 high-byte TH0 low-byte TL1 low-byte TL0 Timer MODe register Timer CONtrol register Timer 0 : {TH0, TL0} Timer 1 : {TH1, TL1} only TCON is bit-addressable

Serial port registers on-chip serial port for communicating with serial devices Serial data BUFfer (SBUF) holds both the transmit data (writing to buffer) and the receive data (reading from buffer) Various modes of operation on bitaddressable Serial port CONtrol register (SCON)

Interrupt registers 5-source, 2-priority level interrupt structure interrupts are disabled as default by system reset should be enabled by writing to the Interrupt Enable register (IE) priority level is set through the Interrupt Priority register (IP)

Power CONtrol register

IDLe mode an instruction that sets IDL bit will be the last instruction executed before entering idle mode CPU status preserved, all register contents are maintained port pins retain their logic levels ALE and PSEN are held high idle mode is terminated by any enabled interrupt or by system reset, either condition clears the IDL bit

Power Down mode an instruction that sets PD bit will be the last instruction executed before entering power down mode on-chip oscillator stopped all function are stopped all on-chip RAM contents are retained port pins retain their logic levels ALE and PSEN are held low only exit is system reset V CC can be as low as 2V in power down mode

external memory 64K external code memory space and 64K external data memory space can be made available by 8051 architecture when external memory is used P0 is unavaliable as an I/O port P0 becomes a multiplexed address (A0-A7) and data (D0-D7) bus with ALE latching the low-byte of the address at the beginning of each memory cycle if MOVX instructions are never used ALE pulses consistently at 1/6 of crystal frequency if MOVX instruction is used both ALE and PSEN pulses are skipped once on the RD line to enable the RAM

multiplexing address and data buses

accessing external code memory

read timing for external code memory

accessing external data memory

accessing external data memory (cont d) MOVX instruction MOVX A, @DPTR SETB P2.0 SETB P2.1 MOV R0, #FFH MOVX A, @R0 read 03FFH

address decoding

external memory (cont d) increment RAM location by 1: it takes 1 instruction and 1 instruction cycles for internal RAM it takes 4 instructions and 7 instruction cycles for external RAM external memory is ~ 7 times slower size: internal RAM is limited to 128B external RAM up to 64KB

overlapping the external code and data spaces

von Neumann architecture stored program concept program can modify themselves on the run program faults can effect other programs, operating system leading to crash es memory protection and access control mechanisms against malware von Neumann bottleneck caches, branch prediction algorithms

Hardvard architecture separate storage and signal pathways for instructions and data modifying programs is entirely an offline process instruction memory often wider than data memory speed is gained at the expense of more complex electrical circuitry caches (high cost) for memory bound problem specialized DSPs (audio/video, etc.), small microcontrollers (PIC, etc.) modern high-performance CPU designs incorporate aspects of both von Neumann and Harvard architectures

ReSeT operation 8051 is reset by holding RST high for two machine cycles and then returning it low power-on reset manual reset

Register values after system ReSeT

summary 8051 architecture and layout memory organization Special Function Registers external memory

references http://www.personal.dundee.ac.uk/~gathomso/eg2103/pull-up.doc http://www.8052.com/tutmemor.phtml