ET2640. Unit 5:ADVANCED I/O TECHNIQUES Pearson Education, Inc. Pearson Prentice Hall Upper Saddle River, NJ 07458

Similar documents
Principle and Interface Techniques of Microcontroller

8051 INTERFACING TO EXTERNAL MEMORY

TOPIC 6 LATCH. FIGURE 1 INTERFACING OF ROM/EPROM TO µc 8051.

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices

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

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

Chapter TEN. Memory and Memory Interfacing

1. Pin diagram of 8051 and ports

ET2640 Microprocessors

Microcontroller and Embedded Systems:

CHAPTER TWELVE - Memory Devices

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

Introduction read-only memory random access memory

Address connections Data connections Selection connections

CPEG300 Embedded System Design. Lecture 3 Memory

Concept of Memory. The memory of computer is broadly categories into two categories:

Three criteria in Choosing a Microcontroller

Memory & Simple I/O Interfacing

Semiconductor Memories: RAMs and ROMs

UNIT 3 THE 8051-REAL WORLD INTERFACING

8051 Interfacing and Applications Microcontroller

Read and Write Cycles

ORG ; Week8. Memory and Memory Interfacing

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 9 Simple I/O Interfacing

Design with Microprocessors

Chapter 5 Internal Memory

Allmost all systems contain two main types of memory :

Vidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND)

Memory Expansion. Lecture Embedded Systems

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (5 th Week)

Design with Microprocessors

Computer Organization. 8th Edition. Chapter 5 Internal Memory

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

Microcontroller and Applications

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

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

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

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

Introduction To MCS-51

Application Brief D-005

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following.

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

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

Applications of 8051 Microcontrollers

INTERFACING HARDWARE WITH MICROCONTROLLER

William Stallings Computer Organization and Architecture 8th Edition. Chapter 5 Internal Memory

Experiment# 8: Photo-Interrupter Control

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

UMBC. Select. Read. Write. Output/Input-output connection. 1 (Feb. 25, 2002) Four commonly used memories: Address connection ... Dynamic RAM (DRAM)

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

CS 320 February 2, 2018 Ch 5 Memory

The Microcontroller Idea Book

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

C H A P T E R 1 INTRODUCTION

8051 I/O and Class 6 EE4380 Spring 03. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

EE6502- MICROPROCESSOR AND MICROCONTROLLER

ELEG3923 Microprocessor Ch.4 I/O Ports

8051 Microcontroller

8051 Interfacing: Address Map Generation

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

An 80C31-Controlled Power Supply

MICROPROCESSORS & INTERFACING (A1423) C.Lokanath Reddy Assistant Professor.

1. Attempt any three of the following: 15

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

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code:

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

80C451 operation of port 6

Memory Interfacing & decoding. Intel CPU s

Pin Description, Status & Control Signals of 8085 Microprocessor

8-Bit Microcontroller with Flash. Application Note. Controlling FPGA Configuration with a Flash-Based Microcontroller

Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports.

INTEGRATED CIRCUITS. AN408 80C451 operation of port 6

MICROCONTROLLER BASED WATER LEVEL CONTROL SYSTEM

TEMIC 51T (Temic) EMULATION

Principle and Interface Techniques of Microcontroller

Digital Blocks Semiconductor IP

Embedded Systems Design: A Unified Hardware/Software Introduction. Outline. Chapter 5 Memory. Introduction. Memory: basic concepts

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 5 Memory. Outline. Introduction

Digital Blocks Semiconductor IP

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Q.1. A) Attempt any THREE of the following:

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

80C51FA/83C51FA EVENT-CONTROL CHMOS SINGLE-CHIP 8-BIT MICROCONTROLLER Automotive

FACULTY OF ENGINEERING LAB SHEET


8051 I/O and 8051 Interrupts

POD 51EH C517A 24 XH0 XH1 XH2 XH3 XH4 XH5 XH6 XH7 XL7 XL6 XL5 XL4 XL3 XL2 XL1 XL0 PE EA ALE PSEN JP1. Figure 1. POD 51EH C517A 24

Digital Blocks Semiconductor IP

8051 Microcontroller

MC74C Digit BCD Display Controller/Driver. General Description. Ordering Code: Connection Diagram. Features. Version 1.0

Memory Pearson Education, Inc., Hoboken, NJ. All rights reserved.

ECSE-2610 Computer Components & Operations (COCO)

ELEG3923 Microprocessor Ch.9 Timer Programming

Module Contents of the Module Hours COs

Menu. word size # of words byte = 8 bits

ET2640 Microprocessors

Lecture 13: Memory and Programmable Logic

Transcription:

ET2640 Unit 5:ADVANCED I/O TECHNIQUES skong@itt-tech.edu

HARDWARE CONNECTION CHAPTER 8

8051 PINOUT

XTAL1 & XTAL2 On-chip oscillator requires an external clock Quartz crystal clock 2 external 30 pf capacitors The speed of the chip refers to the maximum oscillator frequency

XTAL1 & XTAL2

RST Pin 9 is RESET pin active high When it is active all values in registers are lost and PC = 0000 Needs to be active for 2 machine cycles

POWER-ON RESET

RESET VALUES

EA External Access If the chip has on-board ROM should be tied to Vcc If there is external ROM should be tied to ground Cannot be left unconnected

PSEN Program Store Enable Output pin Connects to the Output Enable(OE) pin of the ROM chip that contains the program code

ALE Address Latch Enable Output Active high Discussed in detail later

8051 INTERFACING TO EXTERNAL MEMORY CHAPTER 14

SEMICONDUCTOR MEMORY Memory Capacity for memory chips Measured in bits Memory Organization Memory chip contains 2 a locations, where a is the number of address pins Each location contains d bits, where d is the number of data pins on the chip The entire chip contains 2 a b bits

EXAMPLE A given memory chip has 11 address pins and 1 data pin. Find the organization and capacity 2 11 = 2048 each location holds 1 bit = [2Kx1] Total capacity is 2K bits

SEMICONDUCTOR MEMORY Speed Access time Usually measured in nano-seconds

ROM Nonvolatile PROM EPROM EEPROM Flash Mask ROM

Table 14 2 Some UV-EPROM Chips 128K bits 150 ns 27 = UV-PROM

Table 14 3 Some EEPROM and Flash Chips EEPROM

RAM Volatile SRAM NV-RAM Nonvolatile RAM DRAM

Table 14 4 Some SRAM and NV-RAM Chips

CHECKSUM BYTE ROM Detect corruption Generation Add all bytes dropping any carries 2 s compliment Verification Add all bytes including checksum byte Result should be 0

DRAM Packaging issues Too many address pins Solution is multiplexing address pins RAS CAS May have separate pins for D IN, D OUT

MEMORY ADDRESS DECODING Simple logic gate address decoding 74LS138 3-8 decoder

Figure 14 4 Logic Gate as Decoder

Figure 14 5 74LS138 Decoder (Reprinted by permission of Texas Instruments, Copyright Texas Instruments, 1988)

Full Decoding

Partial Decoding

8031/51 INTERFACING WITH EXTERNAL ROM When the amount of onboard ROM is insufficient the use of external ROM is required This requires more support circuitry Also requires the use of some of the functional pins that limit the use of external ports on the 8031 Connecting the chip s External Access ( ) to ground allows access to external ROM EA

Figure 14 8 74LS373 D Latch (Reprinted by permission of Texas Instruments, Copyright Texas Instruments, 1988)

Figure 14 9 Address/Data Multiplexing

Figure 14 10 Data, Address, and Control Buses for the 8031 (For reset and crystal connection, see Chapter 4.)

Figure 14 11 8031 Connection to External Program ROM

On-chip & Off-chip code ROM There are times when you want to boot the system with on-chip code and then run the main program from off-chip ROM or have a large look-up table in an external ROM chip

Figure 14 12 On-chip and Off-chip Program Code Access

8051 DATA MEMORY SPACE The 8051 has 128kB of address space 64kB of program code Accessed by means of the PC 64kB of data space Accessed my means of the DPTR MOVX

Figure 14 13 8051 Connection to External Data ROM

External Data RAM To access external RAM we must use both and RD WR

Figure 14 15 8051 Connection to External Data RAM

MOVX Used to access external memory space RAMDATA EQU 5000H COUNT EQU 200 MOV DPTR, #RAMDATA MOV R3, #COUNT AGAIN: MOV A, P1 MOVX @DPTR, A ACALLDELAY INC DPTR DJNZ R3, AGAIN HERE: SJMP HERE

Figure 14 17 8031 Connection to External Program ROM, Data RAM, and Data ROM

MOTOR CONTROL: RELAY, PWM, DC, AND STEPPER MOTORS CHAPTER 17

RELAYS & OPTOISOLATORS Relays and Optoisolators are used to control a large amount of power with a small amount of power

Figure 17 1 Relay Diagrams

Driving a Relay Digital systems don t generally provide enough current to drive a relay, a stepper motor, or any device requiring more than 2ma of current. To drive a higher current use a ULN2803 or a power transistor The ULN2803 is a Darlington transistor high power driver

Figure 17 2 DS89C4x0 Connection to Relay ORG 0H MAIN:SETB P1.0 MOV R5, #55 ACALLDELAY CLR P1.0 MOV R5, #55 ACALLDELAY SJMP MAIN DELAY: H1: MOV R4, #100 H2: MOV R3, #253 H3: DJNZ R3, H3 DJNZ R4, H2 DJNZ R5, H1 RET END

Solid State Relay No moving parts Faster switching times No wear and tear Low input currents

Optoisolator

Figure 17 6 Controlling a Lamp via Optoisolator

STEPPER MOTOR INTERFACING Translates electrical pulses into rotational mechanical movement Permanent magnet rotor Stator 2-phase, 4-step Stepper motor operation (refer to table 17-3 page 499)

Step angle Depends upon internal gearing Minimum degree of rotation associated with a single step Steps per Revolution is the total number of steps to complete 360 of rotation

Make the Stepper Motor Turn MOV A, #66 BACK: MOV P1, A RR ACALL DELAY SJMP BACK A DELAY MOV R2, #100 H1: MOV R3, #255 H2: DJNZ R3, H2 DJNZ R2, H1 RET

Bidirectional Stepper Motor Control Connect a switch to P2.7 If SW = 0 turn motor clockwise If SW = 1 turn motor counterclockwise ORG 0H MAIN: SETB P2.7 MOV A, #66 MOV P1, A TURN: JNB P2.7, CW RR A ACALL DELAY MOV P1, A SJMP TURN CW: RL A ACALL DELAY MOV P1, A SJMP TURN

DC MOTOR INTERFACING AND PWM PWM = Pulse Width Modulation The greater the duty cycle the faster the DC motor rotates Speed is also inversely proportional to the load applied

Figure 17 13 DC Motor Rotation (Permanent Magnet Field)

Figure 17 15 H-Bridge Motor Clockwise Configuration

Figure 17 16 H-Bridge Motor Counterclockwise Configuration