INTERFACING INTERFACING. Richa Upadhyay Prabhu. NMIMS s MPSTME February 25, 2016

Similar documents
Lecture-55 System Interface:

General Purpose Programmable Peripheral Devices. Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

8255 Programmable Peripheral Interface Architecture MCT/UNIT III/NARASIMHARAJ/LECTURE NOTES /IV MECH A

These three counters can be programmed for either binary or BCD count.

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

UNIT - II PERIPHERAL INTERFACING WITH 8085

PIN DIAGRAM. Richa Upadhyay Prabhu. NMIMS s MPSTME January 19, 2016

Topics. Interfacing chips

PIO 8255 (cont..) M Krishna kumar MAM/M3/LU9e/V1/2004 1

The 8255A: Programmable Peripheral Interface

82C54 CHMOS PROGRAMMABLE INTERVAL TIMER

INTERFACING INTERFACING. Richa Upadhyay Prabhu. February 29, 2016

To Interface The 8085 Microprocessor

Features: 3 8-bit IO ports PA, PB, PC. PA can be set for Modes 0, 1, 2. PB for 0,1 and PC for mode 0 and for BSR. Modes 1 and 2 are interrupt driven.

CHAPTER: 3 PROGRAMMABLE PERIPHERAL INTERFACE & ELECTROMECHANICAL DEVICES INTERFACING

Lecture-50 Intel 8255A: Programming and Operating Modes

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

Chapter 13 Direct Memory Access and DMA-Controlled I/O

9. PERIPHERAL CHIPS 9a


2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT IV I/O INTERFACING PART A (2 Marks)

MP Assignment III. 1. An 8255A installed in a system has system base address E0D0H.

PCI bit Digital Input/ Output Card for PCI Bus. User s Manual

Registers Format. 4.1 I/O Port Address

PCI-1751U. 48-bit Digital Input/Output Card with Universal PCI Bus. User Manual

AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS

Programmable Interval Timer CEN433 King Saud University Dr. Mohammed Amer Arafah

Lecture Note On Microprocessor and Microcontroller Theory and Applications

The 8237 DMA Controller: -


Pin Description, Status & Control Signals of 8085 Microprocessor

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

MCS6522 V E R S A T IL E IN T ERFACE A D A PTER

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Basic I/O Interface

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Unit DMA CONTROLLER 8257

INTRODUCTION TO MICROPROCESSORS

Microcontroller interfaces

EC6504-MP&MC, UNIT3 Page 1

Segment A Programmable Peripheral Interface (PPI)

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

Summer 2003 Lecture 21 07/15/03

Co-processor Math Processor. Richa Upadhyay Prabhu. NMIMS s MPSTME February 9, 2016

Overview of Intel 80x86 µp

Chapter NINE 8088,80286 MICROPROCESSORS AND ISA BUS

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

PERIPHERAL INTERFACING Rev. 1.0

History and Basic Processor Architecture

1. Internal Architecture of 8085 Microprocessor

Question Bank Microprocessor and Microcontroller

8051 Microcontroller

Lecture-53 Mode 2: (Strobed Bidirectional bus I/O) This functional configuration provides means for communicating with a peripheral device on a

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

GPIO-MM User Manual. FPGA-based PC/104 Counter/Timer and Digital I/O Module. User Manual v1.04

DATASHEET HS-82C54RH. Features. Ordering Information. Radiation Hardened CMOS Programmable Interval Timer. Data Sheet August 2000

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1

a8255 Features General Description Programmable Peripheral Interface Adapter

UNIT III. 2. Non-maskable interrupts. 3. Software interrupt. 4. Internal interrupt

DM5806/DM6806 User s Manual

The advantages of registers over memory locations are as follows:

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

Unit-IV Peripheral Interfacing S.Sayeekumar, AP/RMDEEE

8051 Microcontrollers

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

DP8571A Timer Clock Peripheral (TCP)

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

MICROPROCESSOR B.Tech. th ECE

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port).

MEMORY-MAPPED I /O. Universiti Teknikal Malaysia Melaka. Input/Output System Design

UNIT.4. Syllabus I/O INTERFACING 8085

8/26/2010. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to Three Units of 8085

Instructions Involve a Segment Register (SR-field)

Chapter 8 Summary: The 8086 Microprocessor and its Memory and Input/Output Interface

DIO-64/DIO-48. User s Manual

12-Dec-11. Gursharan Singh Maninder Kaur. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to 8085

Basics of Microprocessor

CPE/EE 421 Microcomputers

Microprocessors and Microcontrollers (EE-231)

DA800 User s Manual Real Time Devices, Inc.

CHAPTER 1 MICROCOMPUTER SYSTEMS. 1.1 Introduction. 1.2 Microcontroller Evolution

University of Technology

82C55. Programmable Peripheral Interface. Interfacing Part III

Address connections Data connections Selection connections

Introduction. Description of the BUS. PC KITS-tutorial page (ISA BUS) Pagina 1 di 5

Microprocessor Architecture

UNIT-IV. The semiconductor memories are organized as two-dimensional arrays of memory locations.

Subject Code: Model Answer Page No: /25

Data Acquisition Using INS8048

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.

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

1. Internal Architecture of 8085 Microprocessor

Architecture of 8085 microprocessor

Write A General Form Of The Assembly

Week 7. Input/Output Interface Circuits and LSI Peripheral Devices

NuDAQ ACL-7120A. Digital I/O & Timer/Counter Card User s Guide

CENG-336 Introduction to Embedded Systems Development. Timers

INPUT-OUTPUT ORGANIZATION

Transcription:

INTERFACING Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu February 25, 2016

8255: Programmable Peripheral Interface or Programmable Input output Device

Introduction METHODS OF DATA TRANSFER Simple Input and Output Simple Strobe Input/ Output Single Handshake data transfer Double Handshake data transfer

Simple Input and Output I/O operations are not directly dependent on any other signals. For Example: Reading data from thermostat; it is simple connected to input port line and processor simply reads the port, as data is always available and ready so it can be read any time. The crossed lines on the waveform represents time at which data byte is available at the port

Strobe Input and Output This mode is used when valid data is present on the port only at a certain time, and needs to be read at that time. External device sends a strobe signal to indicate valid data is present on the data lines. Strobe can be connected to interrupt input Transfer is time dependent

Strobe Input and Output High speed data transfer not possible data rates of sending system and receiving system can be di erent to avoid this HANDSHAKE data transfer is used

Single handshake I/O Handshake Data Transfer Peripheral device outputs some data and sends strobe signal to processor Processor detects strobe on poll or interrupt basis and reads the data Also it sends an Acknowledge signal to device indicating that data has been read and next byte of data can be sent.

Double Handshake Data Transfer Used where more co-ordination is required

Double Handshake Data Transfer

Handshaking is a good idea but uses too much processor time, so parallel port devices such as 8255 are used to automatically manage handshake operation.

8255 Programmable Peripheral Interface It is a programmable parallel I/O device 40 pin IC 24 programmable I/O pins arranged as two 8-bit ports and two 4-bit ports It has Three 8-bit ports: Port A,Port B and Port C, which are arranged in two groups of 12 pins Control register defines the functions of each I/O port and in which mode they should operate

Pin Diagram

Pin Diagram Description PA 0 - PA 7 : Port A; 8-bit bidirectional I/O pins PB 0 - PB 7 : Port B; 8-bit bidirectional I/O pins PC 0 - PC 7 : Port C; 8-bit bidirectional I/O pins. These can even be used as two 4-bit ports (PC 0 PC 3 and PC 4 PC 7 ), Also used to produce handshake signals for A and B D 0 D 7 : 8-Bit bi-directional data bus connected to processor RESET : When reset clears control word and all ports RD : Read, active low input line used to read data from processor WR :Write,activelowinputlineusedtosenddatato processor

Pin Diagram Description A 0 A 1 : Address Lines; used to select ports of 8255 A 0 A 1 Selected Port 0 0 Port A 0 1 Port B 1 0 Port C 1 1 Control Register

8255 Functional Block Diagram

8255 Operational Modes and Initialization MODE 0 simple input or output without handshaking If Port A and B are initialized in mode 0, port C can be used as 8-bit port If port C lines are used as output, individual bits can be set and reset by special control word Two halves of port C (4-bits)are independent One can be used as input and other as output

8255 Operational Modes and Initialization MODE 1 Use port a or B as handshake(strobed) input/output PC 0, PC 1, PC 2 lines of port C are used as handshake lines for port B PC 3, PC 4, PC 5 lines of port C are used as handshake lines for port A(input port) PC 6, PC 7 lines are used as input output lines PC 3, PC 6, PC 7 lines of port C are used as handshake lines for port A(output port) PC 4, PC 5 lines are used as input output lines

8255 Operational Modes and Initialization MODE 2 Bi-directional handshake data transfer Data can be output or input on the same eight lines If port A is used in mode 2 : PC 3 to PC 7 are used as handshake line for port A PC 0 to PC 2 can be used as I/O pins if Port B is in Mode 0 Or PC 0 to PC 2 are used as port B handshake if Port B is in Mode 1

8255 Control word (8-bit) There are two types of Control word: The MSB tells which control word is being sent 1 Mode definition control word (if MSB = 1) 2 Port C bit set/reset control word (if MSB = 0)

Mode definition control word (if MSB = 1)

Port C bit set/reset control word (if MSB = 0)

8254 Software Programmable Timer/Counter Why 8253/8254? Since, it is not possible to generate accurate time delays Using delay subroutines in 8086. 8254/8253 facilitates: Accurate time delays Minimizes load on processor real time clock event counter square wave generator complex waveform generator

8254/8253 Software Programmable Timer/Counter means, we can load count in them, start them and stop them with instructions in the program. To program such device, COUNT BYTES and CONTROL BYTES have to be sent to the timer/counter peripheral device

8254 vs 8253 8253 8254 clock frequency 2.6MHz clock frequency 8MHz No read back feature Read back feature Read back feature allows to latch the count in all counters and the status of counters at any point.

Features of 8254 Three independent 16-bit down counters. 8254 can handle inputs from DC to 10 MHz (5MHz 8254-5, 8MHz 8254, 10MHz 8254-2) where as 8253 can operate upto 2.6 MHz Three counters are identical presettable, and can be programmed for either binary or BCD count. Counter can be programmed in six di erent modes. Compatible with all Intel and most other microprocessors. 8254 has powerful command called READ BACK command which allows the user to check the count value, programmed mode and current mode and current status of the counter.

8254 block diagram

8254 block diagram Data Bus Bu er : Bi-directional, 8-bit bu er is used to interface the 8253/54 to the system data bus. The Data bus bu er has three basic functions: Programming the modes of 8253/54. Loading the count registers. Reading the count values.

8254 block diagram Read/Write Logic : The Read/Write logic has five signals : RD,WR, CS and the address lines A0 and A1 In the peripheral I/O mode, the RD, and WR signals are connected to IOR and IOW,respectively.In memory-mapped I/O, these are connected to MEMR and MEMW

8254 block diagram Control Word Register : This register is accessed when lines A0 and A1 are at logic 1 used to write a command word which specifies the counter to be used (binary or BCD), its mode, and either a read or write operation.

8254 block diagram Counters : These three functional blocks are identical in operation. Each counter consists of a single, 16 bit, pre-settable, down counter. Can operate in either binary or BCD Its input, gate and output are configured by the selection of modes stored in the control word register Programmer can read the contents of any of the three counters without disturbing the actual count in process

8254 block diagram Counters : CLK : Signals of frequency between 0 to 8 MHz can be applied as input to these 3 pins GATE : Allows to start or stop the counter with an external hardware signal. If GATE = 1, counter is enabled for countig and if GATE = 0 it is disabled. OUT : Output signal of each counter appears on this pin.

8254 Control Word Format

8254 Control Word Format

8254 Control Word Format

8254 Control Word Format

8254 Control Word Format

8254 Counter Modes 1 Mode 0 (Interrupt On Terminal Count ) 2 Mode 1 (Hardware retriggerable Monoshot ) 3 Mode 2 (Timed interrupt Generator ) 4 Mode 3 (Square Wave Generator ) 5 Mode 4 (Software Triggered Strobe ) 6 Mode 5 (Hardware Triggered Strobe )

Mode 0 (Interrupt On Terminal Count ) The output becomes a logic 0 when the control word is written remains low even after count value loaded in counter. Counter starts decrementing after falling edge of clock The OUT goes high upon reaching the terminal count and remains high till reloading OUT can be used as interrupt Writing a count register, when previous counting is in process first byte when loaded stops the previous count, second byte when loaded starts new count Gate high = normal counting Gate low = counting terminated and current count latched till GATE goes high again

Mode 0 (Interrupt On Terminal Count ) Assuming, CW = 10 ; counter 0 initialized for binary counting, mode 0 and read/write of only LSB

Mode 0 (Interrupt On Terminal Count ) When GATE = 0, counter is held and when GATE = 1, counter continues

Mode 0 (Interrupt On Terminal Count ) If new count is written, counter is loaded with this value in the next clock pulse

Mode 1 (Hardware retriggerable Monoshot ) Gate input is used as trigger input Output remains high till the count is loaded after application of trigger, output goes low and remains low till count becomes zero Another count loaded, when output already low, it does not disturb counting until a new trigger is applied at the gate New counting starts after new trigger pulse

Mode 1 (Hardware retriggerable Monoshot ) For mode 1 GATE act as trigger input, When GATE =1 count is transferred from count register to actual counter

Mode 1 (Hardware retriggerable Monoshot ) This waveform demonstrates retriggerable behavior If another trigger pulse comes,the count is reloaded and output will remain low

Mode 1 (Hardware retriggerable Monoshot ) New count will not be loaded

Do it yourself Assignment - 2 Study all the other 5 modes and prepare a document which will contain theory and related figures.