Similar documents
б Е Е Ё Е Е Еа о о в Т огап оп О пег ес ог р Мапро в

I/O Design. Input / Output Instructions. Engineering 4862 Microprocessors. Lecture 23. Cheng Li

IRRIGATION SYSTEM ENHANCEMENT PROJECT IBRD LOAN 8267-AM IMPLEMENTED BY WATER SECTOR PROJECTS IMPLEMENTATION UNIT STATE INSTITUTION

ц э ц эр е э вс свэ эч эр э эвэ эч цэ е рээ рэмц э ч чс э э е е е э е ц е р э л в э э у эр це э в эр э е р э э э в э ес у ч р Б эш сэ э в р э ешшв р э

JOINT-STOCK COMPANY GIDROPRIVOD. RADIAL PISTON PUMPS OF VARIABLE DISPLACEMENT type 50 НРР

1. Pin diagram of 8051 and ports

ELEG3923 Microprocessor Ch.4 I/O Ports

Lecture-9 Intel 8085 Microprocessor It is a 40-pin DIP(Dual in package) chip, base on NMOS technology, on a single chip of silicon.

«, 68, 55, 23. (, -, ).,,.,,. (workcamps).,. :.. 2

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

uninsta un in sta 9 weights & italics 5 numeral variations Full Cyrillic alphabet

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

NON-PROFIT ORGANIZATION CHARITY FUND

INDEPENDENT AUDITORIS REPORT. in the procedures

CHAPTER 4 I/O PORT PROGRAMMING

4WCE * 5 * : GEO. Air Products and Chemicals, Inc., 2009

29th IYPT 2016: Inspector s Report

OFFER VALID FROM R. 15 COLORS TEXT DISPLAYS SERIES RGB12-K SERIES RGB16-K SERIES RGB20-K SERIES RGB25-K SERIES RGB30-K

AUDIT OF THE FINANCIAL STATEMENT OF THE "EMERGENCY NATIONAL POVERTY TARGETING PROGRAM (PROJECT)" ENPTP

LED Controller -,--:=;. - ;1 :r. Model: WiFi-103. Smartphone. ТаЫеt РС 1 1 Т1 Т2 ТЗ. WiFi-103 ,.., ,.-._,-:=-,,. :... ";{

Myriad Pro Light. Lining proportional. Latin capitals. Alphabetic. Oldstyle tabular. Oldstyle proportional. Superscript ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹,.

MANAGEMENT LETTER. Implemented by. Prepared by: (igdem KAHVECi Treasury Controller

А А п р р Э у Э А Ш К Р В А чк Ар шб

9 g--ч Qб ~оg-ч. l' МоЬ:

Infusion Pump CODAN ARGUS 717 / 718 V - Release Notes. Firmware V

KbdKaz 500 layout tables

ET2640 Microprocessors

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

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

Operating Manual version 1.2


Chapter NINE 8088,80286 MICROPROCESSORS AND ISA BUS

DOT MATRIX LCD DRIVER

VDS. About the customer. Case study

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

Applications of 8051 Microcontrollers

Instructions Involve a Segment Register (SR-field)

R E N E W A B L E E N E R G Y D E V E L O P M E N T I N K A Z A K H S T A N MINISTRY OF ENERGY OF THE REPUBLIC OF KAZAKHSTAN

ONYX-MM-XT PC/104 Format Counter/Timer & Digital I/O Module

OFFER VALID FROM R. TEXT DISPLAYS SERIES A SERIES D SERIES K SERIES M

, «Ruby»..,


-. (Mr R. Bellin),.: MW224r

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

TVT Television Technologies. TVT Television Technologies.: (812)

А. Љто нќша кђшка That s our cat

Lа: с д :_ffii к CERTIFICATION SYSTEM FЕDЕRЦL АGЕNСY FOR TECHNIQUE RXGULATION ЛND METROLOGY ж ж х YOLUNTARY CERTITICATION SYSTEM "SMK STANDARD" Reg. N

Microprocessor Architecture. mywbut.com 1

Input/Output Ports and Interfacing

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Principle and Interface Techniques of Microcontroller


Memory & Simple I/O Interfacing

8051 INTERFACING TO EXTERNAL MEMORY

Chapter ELEVEN 8255 I/O PROGRAMMING

Z8 Pod Adapter. for the. Fluke 9000-Series Troubleshooter

History and Basic Processor Architecture

Basic Input/Output Operations

ON CERTAIN INEQUALITIES IN THE LINEAR SHELL PROBLEMS

Module I. Unit 5. д е far ед е - near д м - next to. - е у ед е? railway station

Chapter TEN. Memory and Memory Interfacing

National Women Commission

Application Note AN232-10

Frequency Generator for Pentium Based Systems

C H A P T E R 1 INTRODUCTION


Configuring APEX 20K, FLEX 10K & FLEX 6000 Devices

8086 Hardware Specification

Errata Sheet. May 6, 1996 / Release 1.3. Marking :

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

4. Hot Socketing & Power-On Reset

Programming the Microchip Pic 16f84a Microcontroller As a Signal Generator Frequencies in Railway Automation

Logic Chip Tester User Manual SW Version /8/2012. Chapter 1 Introduction/Background

DS1845 Dual NV Potentiometer and Memory

ECE 372 Microcontroller Design


Ы Ш Илт :. у /Ph.D/,Х И, у лт л д д л. лдул /Ph.D/, Х И, к л өтөл ө л

2-megabit Firmware Hub and Low-Pin Count Flash Memory AT49LH002. Features. Description. Pin Configurations

UCA Chart Help. Primary difference. Secondary Difference. Tertiary difference. Quarternary difference or no difference

Advanced BiCMOS features

Lecture Note On Microprocessor and Microcontroller Theory and Applications

CHAPTER NINE - MSI Logic Circuits

Public Disclosure Authorized. Public Disclosure Authorized

EDP AM DIO54 Digital IO Module User Manual Version v4.0, 29/03/2010

TEMIC 51T (Temic) EMULATION

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Memory and Programmable Logic

THE COCHINEAL FONT PACKAGE

Unit DMA CONTROLLER 8257

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5096 P-DIP-8-1

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

tion Centre REDDnipie 16b banflea, f N ZGI3l-. #&Irf~t~ 4 tphne: Public Disclosure Authorized

Pin Description, Status & Control Signals of 8085 Microprocessor

DS21S07AE. SCSI Terminator

MIDI CPU Hardware Rev K. User Manual

Chapter 1: Basics of Microprocessor [08 M]

Title of your Paper AUTHOR NAME. 1 Introduction. 2 Main Settings

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1

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

NS32FX211 Microprocessor Compatible Real Time Clock

Transcription:

butrer that the ~ simlply 8 triin а single in Figш'е has а (а) In~uI Tгi-slale conlгol (active high) (Ь) l L~ Н Read lalch -, ТВ2 Vcc Inleгnal --4~-Гi)-()l CPU bus О Q Р1,Х Wгile (О latch -f---i Clk Q \-------1 Load (LI) г---.,.-- РI, Х pin (с) H~ v I н (d) Figure С-9, Tri-State BlIffer High-impedence ( open-ciгcuil) the OlltPllt of 74LS245 and 74LS244 сап sink and of current than othel' LS gates, See ТаЫе С-4, That [ог driver when а signal is tгavelling а long disto drive тапу inpllts, lan.-otll, пех! we discllss the structure of 8051 Рl - Р3 since theil' structuгe is slightly dif- Read pin ----1 ТВI Figllre С-10. 8051 Port 1 Strllctllre Also notice that in Figure С-] О, the 8051 p0l1s have both the latch and buffer, Now the question is, in reading the port, ш'е we reading the status of the input pin ог аге we reading the status of the latch? That is ап extremely important question and its answer depends оп which instruction we аге using, Therefore, when reading the P0l1S (Ьеге аге two possibilities: О) reading (Ье input pin, ог (2) reading the latch, ТЬе аьоуе distinction is уегу impol1ant and must Ье understood lest уои damage the 8051 port, Each is dеsсгiьеd next, Reading the input pin As we stated in Chapter 4, 10 make апу bits of апу port of 8051 ап input port, we fil'st must '>Jl'ite а 1 (Iogic high) (о that bit, Look а! the following sequences of events to see why, ], As сап Ье seen [гот Figure С-]], Ьу writing 1 to the рог! Ы! it is written to the latch and the D latch has "high" оп its Q, Therefol'e, Q = ] and Q = О, 2, Since Q = о and is connected (о the transistor М] gate, the М 1 transistol' is off, 3, When the М] transistol' is off, it blocks апу path to the g1'ound [ог апу signal connected to the input pin and the input signal is directed to the tri-state ТВ], 4, When геаdiпg the input port in instructions such as "MOV А, Рl " we аге real 'у reading the data ргеsепt а! the pin, 'П othel' wol'ds, it is bringing into the CPU the status of the external pin, This instruction activates the read pin of ТВ I (tristate buffel' ]) and lets data а! the pins flow into the CPU's internal bus, Figures C-II and С-] 2 show high and low signals а! the input, l'espectively, bldlirel~tig,nal they а" have Ihe following Read lalch ----, ТВ2 Vcc Load (L 1) and its three components, The other with extra circuitry to allow their С-I0 that the LI load is ап interend ofthis section, that is по! the High Inleгnal --4---.jГi)-()l '1' РIХ CPU bus О Q pin РI'Х 'О ' Wгile 10 lalch -f---; Clk Q 1------; МI :v Off Read pin ----1 ТВI Figure С-Н. Reading "Нigh" at InplIt Pin APPENDIX С: IC TECHNOLOGY AND SYSTEM DESIGN ISSUES 385

Read lateh -, Inteгnal CPU bus - ТВ 2 '" "4--Jo-()! Wгite (о lateh -f--~ О Q - '1 ' Р1,Х /1 1" ТВ1 Read pin -----1 ' О ' Уее Clk Q М1 Figure С -12. Reading "Lo\v" а! the IlIp\lt Pill Writing "О" to the port Off I I Load (L 1) Low ~ Р1,Х The аьоуе discussion showed why we must write а "high" to the ports bits in order to make them аll input роп, What happens if we write а "О" (о а pol1 that was сопfigurеd as ап input pol1? F!'Om Figure C- 13 we see that if we wl'ite а О (low) (о рог! bits, then Q = О and Q = 1, As а l'esult ofq = 1, the М 1 transistol' is "оп", lf МI is "оп," it p!'ovides the path (о ground for both LI and the input pin, Therefol'e, апу attempt to read the input pin wi ll always get the " Iow" ground sigпаl regardless of the statlls of the input pin, TIlis сап also lead (о damage to the pol1, as explained next. pin Read lateh, ТВ2 Усе Internal -4--JГO-()! CPU bus О Q ' О' '1 ' pin Р1,Х Wгite (о lateh -Е--" Clk Q f-------i ~M1 Оп Read pin... ТВ1 will damage М1 Figllre С -13. Never Со пп ес! Direct V се to the 8051 POl't Pin Avoid damaging the port When connecting а switch (о ап inpllt pol1 of the 8051 we must Ье vel'y careful, This is dlle to the fact that the wrong kind of соппесtiоп сап damage the port, Look а! Figure C-lЗ. Ifa switch with У ее and ground is connected directly to the pin and the М 1 transistor is "оп" it will sink СUl'l'еп! f!'om both internal load L 1 and external V сс ' This сап Ье (оо much СUl'l'еп! [ог М 1 and will blow the (гап sistor and, as а l'eslllt, damage the POl't bit, Thel'e аге several ways (о avoid thi s ргоыет, They ш'е shown in Figures C-14, C- 15, and C-16, 386

Port 1 Ршt 1 occupies а total of 8 pins (pins 1 through 8). lt сап Ье used as input ог output. In contrast to port О, this port does not need апу pull-up resistors since it already has pull-up ге s i stшs internally. Upon reset, port 1 is сопfigшеd as ап output port. For example, the following code will continuously send ои! to poli J the alternating values 55Н and ААН. MOV А, #55Н ВАСК : MOV Р l,а ACALL DELAY CPL А SJMP ВАСК 88

Port О as input Vcc Port 1 as input With resistol"s connected (о port О, in order to make it ап input, РО.О the РOl"! must Ье programmed PO.11----'~+_+ +_+_j-+_ "u Ьу writing 1 to О55000 8751 ~~:~ l аll the bits. 'П the following code, port О is соп PO.5f-------J.._j-+_ 8951 РО.4 о PO.6f---------"-t- figured first as ап input PO.7f---------'- poli Ьу writing 1 s (о it, and then data is l'eceived fюm that port and sent (о ~.-:-=----: --:: -' Р 1. Figllre 4-4. Рог! О with PIlII-Uр Resistors MOV A, #OFFH ; А = FF hex MOV РО, А ;make РО ап i np u t port ; Ьу writ ing all 15 to it БАСК : MOV А, РО ; get data from РО MOV Р1, А ; 5end it to port 1 ;keep doing it SJMP БАСК То make port 1 ап input port, it must programmed as such Ьу writing 1 (о аll its ~its. The reason for this is discussed in Appendix С.2. 'П the following code, port 1 IS configured first as ап input poli Ьу writing 1 s (о it, then data is received fюm that port and saved in R7, R6, and R5. MOV A, #OFFH ; A=FF hex MOV Р1, А ;ma ke Р1 an input port ;Ь у writing all 15 to it MOV А, Р1 ; get data from Р1 MOV R7,A ; save it in reg R7 ACALL DEALY ;wait MOV А, Р1 ; get another data from Р1 MOV Rб, А i save i t in reg Rб ACALL DELAY : wa i t MOV А,Р1 ; get a nother data from Р1 MOV R5, A isave it in reg R5 Dual role of port О As shown in Figше 4-1, POlt О is also designated as ADO - AD7, allowing it (о Ье used for both address and data. When connecting ап 8051 /31 (о ап exterпаl memory, port О provides both address and data. The 8051 multiplexes address and data through port О (о save pins. ALE indicates if РО has address or data. When ALE = О, it provides data ОО - D7, but when ALE = 1 it has address АО - А 7. Therefore, ALE is used for demuliplexing address and data with the help of а 74LS373 latch, as we will see in Chapter ]4. Port 1 РOI"! 1 occupies а total of 8 pins (pins 1 through 8). It сап Ье used as input or output. 'П contrast (о poli О, this port does по! need апу pull-up resistors since it already has pull-up resistol's internally. Upon reset, РOl"! ] is сопfigшеd as ап output port. For example, the following code will continuously send out to port 1 the alternating values 55Н and ААН. БАСК: MOV А, #55Н MOV Р1, А ACALL DELAY CPL А SJMP БАСК 88