Lecture 9. - Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK =1.19318 MHz PCLK (for.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

Parul Polytechnic Institute
The 8051 Microcontroller and Embedded Systems
1 Homework Reading –Intel 8254 Programmable Interval Timer (PIT) Data Sheet Machine Projects –Continue on MP3 Labs –Continue in labs with your assigned.
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.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8253/54 Timer Section /54 Timer Description and Initialization
Using the 8254 Timer-Counter Understanding the role of the system’s 8254 programmable Interval-Timer/Counter.
Programmable Interval Timer Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
Analog-to-Digital Converters Lecture L11.2 Section 11.3.
Sequential Circuit Introduction to Counter
Lecture 9 Timer Operations and Programming. 2  Introduction  Summary of timers  Timer programming sequence  Summary of timer SFRs  Timer 0: 8-bit.
The 8051 Microcontroller architecture
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).
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
1 4-Integrating Peripherals in Embedded Systems. 2 Introduction Single-purpose processors  Performs specific computation task  Custom single-purpose.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER
Chapter 4 TIMER OPERATION
CoE3DJ4 Digital Systems Design Chapter 4: Timer operation.
ELEC4601 Microprocessor systems Lab 3 Tutorial
Unit 10.2 Timer Examples. Example – Music Generation Channel 6 – Set up as a timer Output to Generate Square Waves Channel 4 – Set up as a timer Output.
PIT Programming Examples Working with the modes of PIT.
Timers.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
 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.
University of Tehran 1 Microprocessor System Design Timers Omid Fatemi
8254 Timer.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
Jump, Loop, and Call Instructions
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Chapter Microcontroller
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
Module 8 Tutorial  An 8086 system is used for controlling the speed of a motor. The motor can operate at 5 different speeds (1- 5).  The speed.
1 4-Integrating Peripherals in Embedded Systems. 2 Introduction Single-purpose processors  Performs specific computation task  Custom single-purpose.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER. Difference between 8253 and Maximum input clock frequency is 2.6 MHz Maximum input clock frequency.
 The LPC2xxx devices currently have two on- chip UARTS.  Except UART1 has additional modem support.
8255 Programmable Peripheral Interface
Homework Reading Machine Projects Labs
8051 Timers Timers are the peripherals of the 8051 Microcontroller.
FIGURE 6.1 Four‐bit register
Timer Source: under
Programmable Interval Timer
Sequential Logic Counters and Registers
Programmable Interval Timer
DMA CONTROLLER 8257 Features: It is a 4-channel DMA.
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.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
8254 Timer and Counter (8254 IC).
Timers.
Analog-to-Digital Converters
Programmable Interval timer 8253 / 8254
Timer Source: under
Programmable Interval timer 8253 / 8254
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
Pondicherry Engineering College
Timer Source: under
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.
Switching Theory and Logic Design Chapter 5:
Programmable Interval Timer
8253.
Lecture 24.
Presentation transcript:

Lecture 9

- Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK = MHz PCLK (for peripheral Synchronous Devices) Clk Ch0 to IRQ0 CH1 TO DRAM controller Ch2 to PC Speaker

Counter Registers: Counter registers can be used to divide frequency. /16 /8 /4 /2 count

Timing Diagram Bit 0 (/2) Bit 1 (/4) Bit 2 (/8) Bit 3 (/16) : : : : :

Interval Timer Programming: Command Registers 8-bit Command port Need to be programmed before loading the divisor value for a channel. 3 channels, each requires a 16- bit divisor value to generate the output frequency.

Binary = 0 BCD = 1 Mode 0 ~ 5 =000 ~ 101 Ch: 00=0 01=1 10=2 01=Low Byte 10=High Byte 11=Low Byte followed by High Byte

Divisor = 4 Mode = Divisor = 4 Mode = 3 Divisor = 4 Mode = 2 Divisor = 4 Mode = 1

Binary Count: count BCD COUNT=89 99=

Ports & Channels: 3-Channels 16-bit wide divisor value i.e 0~ bit port for each channel therefore the divisor word is loaded serially byte by byte. Port Addresses 43H = Command Port 40H = 8-bit port for Channel 0 41H = 8-bit port for Channel 1 42H = 8-bit port for Channel 2

Programming Concepts for Interval Timer: Load the Command byte into command register required to program the specific channel. The divisor word is then Serially loaded byte by byte.

Connect to interval timer = 1 Turn ON Speaker = 1 Turn OFF Speaker=0 Rest of the bits are used by other devices and should not be changed. 61H Port

Example: Program loads divisor value of 0x21FF Turns ON the speaker and connects it to Interval Timer #include void main() { outportb (0x43,0xB4); outportb (0x42,0xFF); outportb (0x42,0x21); outportb (0x61,inportb(0x61) | 3); getch(); outportb (0x61,inportb(0x61) & 0xFC); }

Timer Count: 40:6CH Incremented every 1/18.2 seconds. Whenever INT8 unsigned long int far *time = unsigned long int far*) 0x C void main() { unsigned long int tx; tx = (*time); tx = tx +18; puts(“Before”); while((*time <= tx); puts(“After”); }