Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.

Slides:



Advertisements
Similar presentations
Serial Interface Dr. Esam Al_Qaralleh CE Department
Advertisements

INPUT-OUTPUT ORGANIZATION
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.
Parul Polytechnic Institute
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.
ECE 2211 Microprocessor and Interfacing Chapter 8 The 8088/8086 Microprocessors and their memory and I/O interfaces Br. Athaur Rahman Bin Najeeb Room.
Programmable Interval Timer
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8253/54 Timer Section /54 Timer Description and Initialization
Programmable Interval Timer Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
Direct Memory Access Introduction to 8237
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
8254 Modes Made by: Ryan wahab (8) Modes Gate is low the count will be paused Gate is high Will continue counting Mode 0: An events counter.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
GURSHARAN SINGH TATLA PIN DIAGRAM OF 8085 GURSHARAN SINGH TATLA
Unit-5 CO-MPI autonomous
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
INPUT-OUTPUT ORGANIZATION
Microcomputer & Interfacing Lecture 2
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
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.
1 Chapter 4 Timer Operation (I. Scott MacKenzie).
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.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER
The 8253 Programmable Interval Timer
MICROPROCESSOR INPUT/OUTPUT
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Universal Asynchronous Receiver/Transmitter (UART)
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Timers.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
8279 KEYBOARD AND DISPLAY INTERFACING
Unit - 2 DMA 8237A-5.
8254 Timer.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
8279 KEYBOARD AND DISPLAY INTERFACING
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
8251 USART.
Memory Interface EEE 365 [FALL 2014] LECTURER 12 ATANU K SAHA BRAC UNIVERSITY.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER. Difference between 8253 and Maximum input clock frequency is 2.6 MHz Maximum input clock frequency.
Serial Communications
The 8085 Microprocessor Architecture
Introduction to the processor and its pin configuration
The 8085 Microprocessor Architecture
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer
Basic I/O Interface.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
DMA CONTROLLER 8257 Features: It is a 4-channel DMA.
E3165 DIGITAL ELECTRONIC SYSTEM
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
8254 Timer and Counter (8254 IC).
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Timers.
Programmable Interval timer 8253 / 8254
Programmable Interval timer 8253 / 8254
The 8085 Microprocessor Architecture
UART PC16550 (Universal Asynchronous Receiver/Transmitter) By Derwyn Hollobaugh
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.
Programmable Interval Timer
Presentation transcript:

Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting in binary or BCD with a maximum frequency of 10MHz. Used for controlling real-time events such as real-time clock, events counter, and motor speed and direction control. The timer usually decoded at port address 40H-43H and has following functions: - Generates a basic timer interrupt that occurs at approximately 18.2Hz. Interrupts the micro at interrupt vector 8 for a clock tick. -Causes DRAM memory system to be refreshed. - Provides a timing source to the internal speaker and other devices.

Advanced Microprocessor2 I/O Interface 8254 Functional Description

Advanced Microprocessor3 I/O Interface 8254 Functional Description Timer 0 is programmed to generate an 18.2Hz signal that interrupt the microprocessor at interrupt vector 8 for a clock tick Timer 1 is programmed for 15µs, used in PC’s to request a DMA action used to refresh DRAM Timer 2 is programmed to generate tone on the PC’s speaker D0 to D7, read, write, Chip select & Address pins A1 and A0 are connected to Microprocessor the address inputs used to select any of the internal register for programming, reading, or writing to a counter Tick is used for time program or events

Advanced Microprocessor4 I/O Interface 8254 Functional Description A1, A0:The address inputs select one of the four internal registers with the 8254 as follows: CLK: The clock input is the timing source for each of the internal counters. It is often connected to the PCLK signal from the bus controller.

Advanced Microprocessor5 I/O Interface 8254 Functional Description CS: Chip Select enables the 8254 for programming, and reading and writing. G: The gate input controls the operation of the counter in some modes. OUT: A counter output is where the wave-form generated by the timer is available. : Read/Write causes data to be read/written from the 8254 and often connects to the

Advanced Microprocessor6 I/O Interface Each counter is individually programmed by writing a control word, followed by the initial count. The control word allows the programmer to select the counter, model of operation, binary or BCD count and type of operation (read/write).

Advanced Microprocessor7 I/O Interface Programming the 8254 Each counter may be programmed with a count of 1 to FFFFH. Minimum count is 1 all modes except 2 and 3 with minimum count of 2. Each counter has a program control word used to select the way the counter operates. If two bytes are programmed, then the first byte (LSB) stops the count, and the second byte (MSB) starts the counter with the new count. There are 6 modes of operation for each counter: Mode0, Mode1, Mode2, MOde3, Mode4, Mode5

Advanced Microprocessor8 I/O Interface Programming the 8254 Modes of operation  Mode 0: An events counter enabled with G. The output becomes a logic 0 when the control word is written and remains there until N plus the number of programmed counts.  Mode 1: One-shot mode. The G input triggers the counter to output a 0 pulse for count clocks.Counter reloaded if G is pulsed again.

Advanced Microprocessor9 I/O Interface Programming the 8254 Modes of operation  Mode 2: Counter generates a series of pulses 1 clock pulse wide. The separation between pulses is determined by the count. The cycle is repeated until reprogrammed or G pin set to 0.  Mode 3: Generates a continuous square-wave with G set to 1. If count is even, 50% duty cycle otherwise OUT is high 1 cycle longer.

Advanced Microprocessor10 I/O Interface Programming the 8254 Modes of operation  Mode 4: Software triggered one-shot (G must be 1).  Mode 5: Hardware triggered one-shot. G controls similar to Mode 1. Trigger with count of 5

Advanced Microprocessor11 I/O Interface

Advanced Microprocessor12 I/O Interface Read Operations There are three possible methods for reading the counters: a simple read operation the Counter Latch Command the Read-Back Command Simple read operation : The Counter which is selected with the A1, A0 inputs, the CLK input of the selected Counter must be inhibited by using either the GATE input or external logic. Otherwise, the count may be in the process of changing when it is read, giving an undefined result.

Advanced Microprocessor13 I/O Interface Counter Latch Command: SC0, SC1 bits select one of the three Counters two other bits, D5 and D4, distinguish this command from a Control Word If a Counter is latched and then, some time later, latched again before the count is read, the second Counter Latch Command is ignored. The count read will be the count at the time the first Counter Latch Command was issued.

Advanced Microprocessor14 I/O Interface Read-back control command: The read-back control, word is used When it is necessary for the contents of more than one counter to be read at a same time. Count : logic 0, select one of the Counter to be latched Status : logic 0, Status must be latched to be read status of a counter is accessed by a read from that counter

Advanced Microprocessor15 I/O Interface Status register: shows the state of the output pin check the counter is in NULL state (0) or not how the the counter is programmed

Advanced Microprocessor16 I/O Interface Programmable Communications Interface: 16550, A universal asynchronous receiver/transmitter (UART). it capable of operating speed: 0 to 1.5M Baud (Baud is # of bits transmitted/sec, including start, stop, data and parity). It includes: - A programmable Baud rate generator. - Separate FIFO buffers for input and and output data (16 bytes each). Asynchronous serial data: Asynchronous serial data are transmitted and received without a clock or timing signal. Two 10-bit frames of asynchronous serial data, start bit, 7 data bit, parity & stop bit.

Advanced Microprocessor17 I/O Interface functional description: this device is available as 40-pin DIP( dual in-line package) or as a 44-pin PLCC ( plastic lead less chip) two separate sections are responsible for data communications - Receiver & Transmitter can function : - simplex: transmit only, eg:FM radio station -half-duplex: transmit and receive but not simultaneously eg: CB( citizen band) station - full-duplex: transmit and receive simultaneously eg : telephone

Advanced Microprocessor18 I/O Interface main feature, has internal receiver & transmitter FIFO memories, each 16 Bytes deep. the UART, requires attention only from the microprocessor after receiving 16 bytes of data it holds 16 bytes before the microprocessor must wait for the ‘ transmitter. the FIFO makes UART ideal when interfacing to high speed systems

Advanced Microprocessor19 I/O Interface The can control a modem through and the modem is called the data set the is called the data terminal Pin function:  A0, A1 and A2: Select an internal register for programming and data transfer..

Advanced Microprocessor20 I/O Interface  : Address strobe used to latch address and chip select. Not needed on Intel systems - connected to ground.  : Clock signal from Baud rate generator in transmitter.  CS0, CS1, : Chip selects must all be active enable the UART  : Clear to send -- indicates that the modem or data set is ready to exchange information. (Used in half-duplex to turn the line around).  D7-D0: The data bus pins are connected to the microprocessor data bus.  : The data carrier detect -- used by the modem to signal the that a carrier is present.  DDIS: Disable driver output -- set to 0 to indicate that the microprocessor is reading data from the UART. Used to change direction of data flow through a buffer.

Advanced Microprocessor21 I/O Interface  : Data set ready is an input to 16550, indicates that the modem (data set) is ready to operate.  : Data terminal ready is an output, indicates that the data terminal (16550) is ready to function.  INTR: Interrupt request is an output to the microprocessor, used to request an interrupt. Receiver error, Data received, Transmit buffer empty  MR: Master reset, connect to system RESET  : User defined output pins for modem or other device.  RCLK: Receiver clock, clock input to the receiver section of the UART. Always 16X the desired receiver Baud rate.

Advanced Microprocessor22 I/O Interface  : Ring indicator input, set to 0 by modem to indicate telephone is ringing.  RD, : Read inputs (either can be used), cause data to be read from the register given by the address inputs  :Request-to-send, signal to modem, indicating UART wishes to send data.  SIN, SOUT: Serial data pins, in and out.  : Receiver ready, used to transfer received data via DMA techniques.  :Transmitter ready, used to transfer transmitter data via DMA  WR, :Write (either can be used), connects to microprocessor write signal to transfer commands and data to  XIN, XOUT: Main clock connections -- a crystal oscillator can be used.

Advanced Microprocessor23 I/O Interface Programming 16550: the programming is a two part process - initialization dialog - operational dialog Initializing 16550: Initialization dialog, occurs after a hardware or software reset, Consists of two parts - line control register - baud rate generator must be programmed Line control register selects: number of stop & parity bit( even or odd) Baud rate generator: programmed with a divisor that determine the baud rate of the transmission section

Advanced Microprocessor24 I/O Interface Line control register: programmed by outputting information to I/O ports 011 Right most 2 bits, selects the number of transmitted data bits (5,6,7or 8) Stop bits: S = 1, 1.5 stop bits used for 5 data bits, 2 used for 6, 7 or 8. next 3 bits: ST(stick), P and PE used to send even or odd parity, to send no parity or to send a 1 or a 0 in the parity bit position for all data.

Advanced Microprocessor25 I/O Interface SB = 1, used to send a break to be transmitted on SOUT. A break is at least two frame of logic 0 data. software is responsible for timing the transmission, to end the break SB return to logic 0 DL = 1, enables programming of the baud rate divisor.

Advanced Microprocessor26 I/O Interface Programming the baud rate: Baud rate generator is programmed with a divisor that sets baud rate of transmitter. Baud rate generator is programmed at 000 and 001 ( A2,A!,A0). Port 000 used to hold least significant part, 001 most significant part Value used depends on external clock/crystal frequency. For MHz crystal : - 10,473 divisor value 110 band rate, - 30 divisor value gives 38,400 baud Note : the actual number programmed into baud rate generator causes, to produce a clock that is 16 times the desired baud rate eg : if 240 is programmed into baud rate divisor, Baud rate = MHz / (16X240) = 4800 baud.

Advanced Microprocessor27 I/O Interface FIFO control register for 16550: register enable the transmitter & receiver and clears the transmitter & receiver FIFO. provides control for interrupts Sending serial data : line status register, contains the information about - error conditions - state of the transmitter & receiver the register is tested before a byte is transmitted or can be received

Advanced Microprocessor28 I/O Interface Suppose a program wants to send data out SOUT. It needs to pool the TH bit to determine if transmitter is ready to receive data. Receiving serial data: To receive information, the DR bit is tested.

Advanced Microprocessor29 I/O Interface UART error: Operation: It is also a good idea to check for errors. Parity error: Received data has wrong error, transmission bit flip due to noise. Framing error: Start and stop bits not in their proper places. This usually results if the receiver is receiving data at the incorrect baud rate. Overrun error: Data has overrun the internal receiver FIFO buffer. Software is failing to read the data from UART before the FIFO is full. ( BI )Break indicator bit: Software should check for this as well, i.e. two consecutive frames of 0s.

Advanced Microprocessor30 I/O Interface Examples, interfaced to the 8088 at ports 00F0H – 00F7H

Advanced Microprocessor31 I/O Interface Here port F3H accesses the line control register F0H & F1H access the baud rate divisor register after the line control register & baud rate divisor are programmed, still it is not ready to function program the FIFO control register, at port F2H