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.

Slides:



Advertisements
Similar presentations
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Advertisements

Parul Polytechnic Institute
VHDL 8 Practical example
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Subject Code : Name Of Subject : Microprocessor and assembly language programming Name of Unit : Instruction cycle and Timing diagram Topic : Instruction.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
COMP3221: Microprocessors and Embedded Systems Lecture 17: Computer Buses and Parallel Input/Output (I) Lecturer: Hui.
The 8085 Microprocessor Architecture
Timing Diagram is a graphical representation
Microprocessor and Microcontroller
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis 1 A simple bus bus structure ProcessorMemory rd'/wr enable addr[0-11]
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Interfacing. This Week In DIG II  Basic communications terminology  Communications protocols  Microprocessor interfacing: I/O addressing  Port and.
9/20/6Lecture 3 - Instruction Set - Al Hardware interface (part 2)
INPUT-OUTPUT ORGANIZATION
Microcomputer & Interfacing Lecture 2
Memory interface Memory is a device to store data
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Embedded Systems Design 1 Lecture Set 6 I/O Ports.
CPU Interfacing Memory.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Address Decoding Memory/IO.
MCS-51 Hardware Interfacing
Computer Architecture
Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always.
BASIC INPUT AND OUTPUT INTERFACING.  8085A communicate with outside world using the I/O devices.  Since memory and I/O devices share the system bus,
Basic I/O Interface A Course in Microprocessor
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
CoE3DJ4 Digital Systems Design Hardware summary. Microprocessors vs. Microcontrollers Microprocessors are single-chip CPU used in microcomputers Microcontrollers.
Computer Architecture Lecture 9 by Engineer A. Lecturer Aymen Hasan AlAwady 10/2/2014 University of Kufa - Information Technology Research and Development.
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
MCS51 - part 2. Lecture 2 2/17 MCS51 functioning Clock generator Machine & instruction cycles Paralell ports Reset.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Programmable Peripheral Interface Parallel port Interface 8255
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
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.
MICROPROCESSORS AND APPLICATIONS
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Computer Architecture Lecture 5 by Engineer A. Lecturer Aymen Hasan AlAwady 25/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
The 8085 Microprocessor Architecture. What 8085 meant for? 80 - year of invention bit processor 5 - uses +5V for power.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter Microcontroller
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
8255:Programmable Peripheral Interface
8085 Microprocessor: Architecture & Support Components.
Microprocessors 3 Buses, Addresses and Machine Cycles 1 Modified April 2011 ©Paul R. Godin prgodin gmail.com.
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.
MICROPROCESSOR AMARTYA ROY-72 ANGSHUMAN CHATTERJEE-80 ASHISH LOHIA-70 MOLOY CHAKRABORTY-60.
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.
Memory Interface EEE 365 [FALL 2014] LECTURER 12 ATANU K SAHA BRAC UNIVERSITY.
STUDY OF PIC MICROCONTROLLERS.. Design Flow C CODE Hex File Assembly Code Compiler Assembler Chip Programming.
8255 Programmable Peripheral Interface
EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing
8255: Programmable Peripheral Interface (PPI)
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
The 8085 Microprocessor Architecture
Interfacing 64Kb EPROM with 8085
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interfacing Memory Interfacing.
Parallel communication interface 8255
8085 Microprocessor Architecture
The 8051 Microcontroller and Embedded Systems
The 8085 Microprocessor Architecture
Presentation transcript:

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 line may represent multiple wires Bus –Set of wires with a single function Address bus, data bus –Or, entire collection of wires Address, data and control Associated protocol: rules for communication

3 Timing Diagrams write protocol rd'/wr enable addr data t setup t write Most common method for describing a communication protocol Time proceeds to the right on x-axis Control signal: low or high –May be active low (e.g., go’, /go, or go_L) –Use terms assert (active) and deassert –Asserting go’ means go=0 Data signal: not valid or valid Protocol may have subprotocols –Called bus cycle, e.g., read and write –Each may be several clock cycles Read example –rd’/wr set low,address placed on addr for at least t setup time before enable asserted, enable triggers memory to place data on data wires by time t read read protocol rd'/wr enable addr data t setup t read

4 Microprocessor interfacing: I/O addressing A microprocessor communicates with other devices using some of its pins –Port-based I/O (parallel I/O) Processor has one or more N-bit ports Processor’s software reads and writes a port just like a register E.g., P0 = 0xFF; v = P1.2; -- P0 and P1 are 8-bit ports –Bus-based I/O Processor has address, data and control ports that form a single bus Communication protocol is built into the processor A single instruction carries out the read or write protocol on the bus

5 Types of bus-based I/O: memory-mapped I/O and standard I/O Processor talks to both memory and peripherals using same bus – two ways to talk to peripherals –Memory-mapped I/O Peripheral registers occupy addresses in same address space as memory e.g., Bus has 16-bit address –lower 32K addresses may correspond to memory –upper 32k addresses may correspond to peripherals –Standard I/O (I/O-mapped I/O) Additional pin (M/IO) on bus indicates whether a memory or peripheral access e.g., Bus has 16-bit address –all 64K addresses correspond to memory when M/IO set to 0 –all 64K addresses correspond to peripherals when M/IO set to 1

6 Memory-mapped I/O vs. Standard I/O Memory-mapped I/O –Requires no special instructions Assembly instructions involving memory like MOV and ADD work with peripherals as well Standard I/O requires special instructions (e.g., IN, OUT) to move data between peripheral registers and memory Standard I/O –No loss of memory addresses to peripherals –Simpler address decoding logic in peripherals possible When number of peripherals much smaller than address space then high-order address bits can be ignored –smaller and/or faster comparators

7 Consider a simple processor. I call it the simple processing unit (SPU).

8 The memory read and I/O read timing for a simple processor is shown below.

9 The Memory write and I/O write timing for a simple processor is shown below.

10 I/O Ports

11

12 No separate I/O address space. Some Real processors

13 No separate I/O address space.

14

15

16

17 The 8051 Atmel AVR

18

20

21

22 A basic memory protocol Interfacing an 8051 to external memory –Ports P0 and P2 support port-based I/O when 8051 internal memory being used –Those ports serve as data/address buses when external memory is being used –16-bit address and 8-bit data are time multiplexed; low 8-bits of address must therefore be latched with aid of ALE signal P0 P2 Q ALE /RD Adr Adr. 15…8 Adr. 7…0 Data P0 HM6264 D Q 8 P2 ALE G A D /OE /WE /CS /WR /RD /CS1 /PSEN CS2 27C256 /CS A D /OE

instructions for addressing external code and data memory.

P0 HM6264 D Q 8 P2 ALE G A D /OE /WE /CS /WR /RD /CS1 /PSE N CS2 27C256 /CS A D /OE Ex: XM(0)  XM(1) MOV DPTR,#0 MOVX INC DPTR MOV R7,A MOVX XCHA,R7 DECDPTR XCHA,R7 Ex: XM(0)  XM(1) CLR P2 CLRR0 MOVR1,#1 MOVX MOVR7,A MOVA,R7

25 RnCEQUP1.1 n_BUSYEQUP1.2 BYTEEQUP1.3

26 RnC EQU P1.1 n_BUSY EQU P1.2 BYTE EQU P1.3 CLRRnC SETBRnC JNBn_BUSY,$ MOVR7,P0 CPLBYTE MOVR6,P0

27 The 8255

28

29

30

31

32 Change individual bits on Port C

33

34 RESET_8255 EQU P1.0 CTL1 EQU B ;ONE POSSIBLE ADDRESS FOR CONTROL PORT OF 8255 #1 PRTA1 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #1 PRTB1 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #1 PRTC1 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #1 CTL2 EQU B ;ONE POSSIBLE ADDRESS FOR CONTROL PORT OF 8255 #2 PRTA2 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #2 PRTB2 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #2 PRTC2 EQU B ;ONE POSSIBLE ADDRESS FOR PORT A OF 8255 #2 CLR RESET_8255 ;REMOVE RESET FROM 8255 ;DO ADDITION C2|C1 <-- A2|A1 + B2|B1 MOV DPTR,#(CTL1 AND CTL2);POINT DPTR TO CONTROL REG OF 8255 #1 AND #2 MOV A, B ;PRTA, PRTB IN, PRTC OUT ;OUTPUT TO BOTH CONTROL REGS AT SAME TIME MOV DPTR,#PRTA1 ;SELECT PORT A OF 8255 #1 MOVX ;GET PRTA1 MOV R7,A ;SAVE IT MOV DPTR,#PRTB1 ;SELECT PORT B OF 8255 #1 MOVX ;READ PORT B OF 8255 #1 ADD A,R7 ;ADD PRTA1 TO PRTB1 MOV DPTR,#PRTC1 ;SELECT PORT C OF 8255 #1 ;OUTPUT TO PRTC1 END

35

36

37

38 Figure 1. AT90S8515 with expanded memory. What should we do with A16? Answer: connect it to an unused port pin. Question: How could we map the entire 128K bytes of memory to the top 32 Kbytes of the AVR address space. Answer: Connect AVR A15 to /CE on U4. Now the memory is selected only when the AVR addresses the top have of the memory address space where A15 = 1. Connect A15 and A16 of U4 to unused AVR port pins. By changing these port pin, any of the four 32 K byte pages of U4 memory can be switched in and out of the AVR address space.

39

40

41

42