8254 – SOFTWARE PROGRAMMABLE TIMER

Slides:



Advertisements
Similar presentations
Lecture 08: 8253/4 Timer and Music
Advertisements

Microprocessor & Interfacing
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer 2 Port (A,B), No Bidirectional.
Design of Microprocessor-Based Systems Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology I/O System Design.
Programmable Interval Timer
8253/54 Timer Section /54 Timer Description and Initialization
8255 – PROGRAMMABLE PARALLEL
Programmable Interval Timer Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41.
Serial I/O - Programmable Communication Interface
Engineering 4862 Microprocessors Lecture 24
Interrupt Processing Haibo Wang ECE Department
8.4 Instruction Execution Times TOBIN PROC FAR SUB AX,AX MOV DX,AX MOV CX,4 NEXTD: PUSH CX SUB BP,BP MOV CX,4 GETNUM: RCL BX,1 RCL BP,1 LOOP GETNUM.
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
8254 Programmable Interval Timer
ENEE 440 Chapter Timer 8254 Register Select The 8254 timer is actually 3 timers in one. It is an upgraded version of the 8253 timer which was.
Engineering 4862 Microprocessors Lecture 27 Cheng Li EN-4012
Dec Hex Bin 13 D ORG ; THIRTEEN 8253/54 Timer.
8253 TIMER. Engr 4862 Microprocessors 8253 / 8254 Timer A.k.a. PIT (programmable Interval Timer), used to bring down the frequency to the desired level.
PIT: Programmable Interval Timer
8254 Counter/Timer Counter Each of the three counter has 3 pins associated CLK: input clock frequency- 8 MHz OUT GATE: Enable (high) or disable.
The 8253 Programmable Interval Timer
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
PIT Programming Examples Working with the modes of PIT.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
ECE291 Computer Engineering II Lecture 12 Josh Potts University of Illinois at Urbana- Champaign.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
University of Tehran 1 Microprocessor System Design Timers Omid Fatemi
8254 Timer.
PPI-8255.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8086 – I/O Interfacing - I/O mapped I/O
8251 USART.
DEPARTMENT OF ELECTRONICS ENGINEERING
Lecture # 14. RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Serial mode of data transfer
Format of Assembly language
Microprocessor and Assembly Language
8253 / 8254 Timer A.k.a. PIT (programmable Interval Timer), used to bring down the frequency to the desired level Three counters inside 8253/8254. Each.
Homework Reading Machine Projects Labs
Timer and Interrupts.
Discussions on hw5 Objectives:
Diagram of microprocessor interface with IO devices
Interrupts – (Chapter 12)
Computer Organization & Assembly Language Chapter 3
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer 8254 LECTURE 3
SERIAL PORT PROGRAMMING
Basic Microprocessor Architecture
Serial Communication: RS-232 (IEEE Standard)
8253 Timer In software programming of 8085, it has been shown that a delay subroutine can be programmed to introduce a predefined time delay. The delay.
8254 Timer and Counter (8254 IC).
Discussions on hw5 Objectives:
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Timer.
Memory organization On- chip memory Off-chip memory
Serial Communication Interface: Using 8251
Timers.
Programmable Interval timer 8253 / 8254
Microprocessor Lab CSL1543 0:0:2
Programmable Peripheral Interface
Programmable Interval timer 8253 / 8254
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Programmable Interval Timer
Presentation transcript:

8254 – SOFTWARE PROGRAMMABLE TIMER

Control Word Format - 8254

8253/54 Operation Modes Mode 0: Interrupt on terminal count The output is initially low, and remain low for the duration of the count if GATE=1. When the terminal count is reached, the output will go high and remain high until a new control word or new count number is loaded If GATE becomes low at the middle of the count, the count will stop and the output will be low. The count resumes when the GATE becomes high again 􀃎 This in effect adds to the total time the output is low.

MODE 0: INTERRUPT ON TERMINAL COUNT

Modes of Operation six modes (0–5) of available to each of the 8254 counters each mode functions with the CLK input, the gate (G) control signal, and OUT signal Figure 11–35  The six modes of operation for the 8254-2 programmable interval timer. The G input stops the count when 0 in modes 2, 3, and 4.

8253/54 Operation Modes • Mode 1: HW triggered / programmable one shot The triggering must be done through the GATE input by sending a 0-to-1 pulse to it. Steps: Load the count register A 0-to-1 pulse must be sent to the GATE input to trigger the count. After sending the 0-to-1 pulse to GATE, OUT becomes low and stays low for a duration of N*T, then becomes high and stays high until the GATE is triggered again If during the activation, a retriggered happened, then restart the down counting

MODE 1: HARDWARE RETRIGGERABLE ONE-SHOT

8253/54 Operation Modes Mode 2: Rate Generator (Divide-by-N counter) In Mode2, if GATE=1, OUT will be high for N*T,goes low only for one clock pulse, then counter isreloaded automatically, and the process continues indefinitely. 􀃎 Whole period: (N+1) * T

MODE 2: RATE GENERATOR

8253/54 Operation Modes Mode 3: Square wave rate generator Most commonly used

MODE 3: SQUARE WAVE MODe

8253/54 Operation Modes Mode 4: Software triggered strobe Similar to Mode2, except that the counter is not reloaded automatically In Mode4, if GATE=1, the output will go high when loading the count, it will stay high for duration N*T. After the count reaches zero, it becomes low for one clock pulse, then goes high again and stays high until a new command word or new count is loaded To repeat the strobe, the count must be reloaded

MODE 4: SOFTWARE TRIGGERED STROBE

8253/54 Operation Modes Mode 5: Hardware triggered strobe Similar to Mode4, except that the triggering must be done with the GATE input The count starts only when a 0-to-1 pulse is sent to the GATE input If GATE retriggered during the counting, it will restart the down counting

MODE 5: HARDWARE TRIGGERED STROBE (RETRIGGERABLE)

Single handshake I/O Double handshake I/O SENDER DATA LINES PORT DEVICE RECEIVER STB ACK Double handshake I/O SENDER RECEIVER DATA LINES STB ACK PORT DEVICE STB# ACK#

8255 PPI - Programmable Peripheral Interface

Port Hardware

8251 UNIVERSAL SYNCHRONOUS SYNCHRONOUS RECEIVER TRANSMITTER (USART)

There are two types of control word.   Table 1 Operation between a CPU and 8251 Control Words There are two types of control word. 1. Mode instruction (setting of function) 2. Command (setting of operation)

CONTROL WORD(ASYNC. MODE)

CONTROL WORD(SYNC. MODE)

COMMAND WORD

STATUS WORD

DTE DCE INTERFACE USING 8251 MODEM MODEM TXD TERMINAL 2 TERMINAL 1 TXD DTR DTR DSR DSR TELEPHONE LINE RTS RTS CD CD CTS CTS RXD RXD

Typical Printer Cable Centronics male DB25P (male) 36 pins Connects to PC Centronics male 36 pins Connects to printer

Port Addresses

Printer Interfacing

Timing waveform for printer interfacing

POP DS CODE SEGMENT ASSUME CS:CODE POP DI START:PUSH CS POP SI POP DS CLI MOV AH,25H ;TO MODIFY THE CONTENT OF IVT MOV AL,00H LEA DX,TSR INT 21H STI ;SET INTURRUPT FLAG MOV AH,31H ;TO TERMINATE TSR PROGRAM TSR PROC FAR MOV AX,CODE ;BCOZ WE DECLARE MSG IN CODE SEGMENT MOV DS,AX PUSH AX PUSH BX PUSH CX PUSH DX PUSH BP PUSH SP PUSH SI PUSH DI PUSH DS LEA DX,MSG MOV AH,09H POP DS POP DI POP SI POP SP POP BP POP DX POP CX POP BX POP AX MOV AH,4CH ;TERMINATION OF ISR ONLY NOT TSR INT 21H IRET TSR ENDP MSG DB 10,13,"DIVISION ERROR$" CODE ENDS END START

CODE SEGMENT ASSUME CS:CODE START:MOV AL,12H MOV DL,00H DIV DL MOV AH,4CH INT 21H CODE ENDS END START