Topics Introduction to Microprocessors

Similar documents
Microprocessor & Interfacing Lecture Programmable Interval Timer

8253 functions ( General overview )

Unit-6 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION

PCL-836 Multifunction countertimer and digital I/O add-on card for PC/XT/ AT and compatibles


Hello and welcome to this Renesas Interactive Course that provides an overview of the timers found on RL78 MCUs.

CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS

QUARTZ-MM PC/104 Counter/Timer & Digital I/O Module

82C54. CMOS Programmable Interval Timer. Description. Features. Pinouts 82C54 (PDIP, CERDIP, SOIC) TOP VIEW. March 1997

DAC A (VCO) Buffer (write) DAC B (AGC) Buffer (write) Pulse Code Buffer (write) Parameter Buffer (write) Figure A.1. Receiver Controller Registers

PERIPHERAL INTERFACING Rev. 1.0

Chapter 6 PROGRAMMING THE TIMERS

Using the Z8 Encore! XP Timer

Multifunction counter board, optically isolated, encoder, incremental counter, timer/counter, SSI, PWM,...

ATmega16A Microcontroller

Microcontroller: Timers, ADC

EIE/ENE 334 Microprocessors

Course Introduction. Content 20 pages 3 questions. Learning Time 30 minutes

Chapter 10 Counter modules

Additional Programs for the Electronics Module Part No

DS1065 EconOscillator/Divider

RV-8564 Application Manual. Application Manual. Real-Time Clock Module with I 2 C-Bus Interface. October /62 Rev. 2.1

CMOS Serial Digital Pulse Width Modulator INPUT CLK MODULATOR LOGIC PWM 8 STAGE RIPPLE COUNTER RESET LOAD FREQUENCY DATA REGISTER

MBI5031 Application Note

20-, 40-, and 60-Bit I/O Expander with EEPROM

a8259 Features General Description Programmable Interrupt Controller

20-, 40-, and 60-Bit IO Expander with EEPROM

ELG3331: Digital Tachometer Introduction to Mechatronics by DG Alciatore and M B Histand

Review for Final Exam

Using the Timer/Event Counter in the HT47R20A-1

A Sequencing LSI for Stepper Motors PCD4511/4521/4541

DIAMOND-MM Multifunction Analog I/O PC/104 Module

Macroblcok MBI5042 Application Note-VB.01-EN

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

EE 308 Apr. 24, 2002 Review for Final Exam

Operating Instructions

USER S MANUAL. Series IP483 Industrial I/O Pack Counter Timer Module

AB-44 APPLICATION BRIEF. Using the 87C51GB SHARON LOPEZ APPLICATIONS ENGINEER. March Order Number

ADC Bit µp Compatible A/D Converter

DS1075 EconOscillator/Divider

HD44102D. (Dot Matrix Liquid Crystal Graphic Display Column Driver) Features. Description. Ordering Information

SC16C550B. 1. General description. 2. Features. 5 V, 3.3 V and 2.5 V UART with 16-byte FIFOs

ELCT 912: Advanced Embedded Systems

Computer Architecture and Organization:

Timer A. Last updated 8/7/18

DS1073 3V EconOscillator/Divider

Application Manual. AB-RTCMC kHz-B5ZE-S3 Real Time Clock/Calendar Module with I 2 C Interface

A MICROPROCESSOR BASED FIRING SCHEME FOR THREE-PHASE CONVERTERS WORKING UNDER A VARIABLE FREQUENCY SUPPLY

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

PCF General description. 2. Features and benefits. 3. Applications. Real-Time Clock (RTC) and calendar

SC16C750B. 1. General description. 2. Features. 5 V, 3.3 V and 2.5 V UART with 64-byte FIFOs

16-Bit Hardware Pulse Width Modulator Data Sheet

PCF General description. 2. Features and benefits. 3. Applications. SPI Real time clock/calendar

DS1621. Digital Thermometer and Thermostat FEATURES PIN ASSIGNMENT

General-Purpose OTP MCU with 14 I/O LInes

Measurement of Time Period of A Simple Pendulum using an Electronic Circuit

MBI5051/MBI5052/MBI5053 Application Note

82C54. CMOS Programmable Intervel Timer. Features. Pinouts. July 11, 2005

LSI/CSI LS BIT MULTI-MODE COUNTER

Chapter 6: Pulse width modulation and the use of programmable interval timers

DS1075. EconOscillator/Divider PRELIMINARY FEATURES PIN ASSIGNMENT FREQUENCY OPTIONS

DATASHEET 82C54. Features. Pinouts. CMOS Programmable Interval Timer. FN2970 Rev 6.00 Page 1 of 23. Sep 15, FN2970 Rev 6.00.

AN4507 Application note

C16450 Universal Asynchronous Receiver/Transmitter. Function Description. Features. Symbol

Electronic Instrumentation

PCF2129 Integrated RTC/TCXO/Crystal

PCF85063ATL. 1. General description. 2. Features and benefits. 3. Applications. Tiny Real-Time Clock/calendar with alarm function and I 2 C-bus

Module -18 Flip flops

CMOS Serial Digital Pulse Width Modulator INPUT CLK MODULATOR LOGIC PWM 8 STAGE RIPPLE COUNTER RESET LOAD FREQUENCY DATA REGISTER

Perpetual Calendar using the HT1382

Linear Integrated Circuits

(THEORY) (ANALOG) (DIGITAL) (SOFTWARE) (HOME) Matjaz Vidmar, S53MV (ex YU3UMV, YT3MV)

FM COUNTER MODULE

HD66702 (LCD-II/E20) (Dot Matrix Liquid Crystal Display Controller/Driver) Description. Features

Universal Driver Software User Guide FP-GPIO96 FeaturePak 96-bit digital I/O module For Version and later

CprE 288 Introduction to Embedded Systems (Output Compare and PWM) Instructors: Dr. Phillip Jones

8XC51FA FB FC PCA Cookbook

HCC/HCF40102B HCC/HCF40103B

DS1803 Addressable Dual Digital Potentiometer

CHAPTER III THE FPGA IMPLEMENTATION OF PULSE WIDTH MODULATION

Multivibrators. Department of Electrical & Electronics Engineering, Amrita School of Engineering

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

OBSOLETE. Bus Compatible Digital PWM Controller, IXDP 610 IXDP 610

Complete Self-Test. Plug-in Module Self-Test

11 Counters and Oscillators

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation

GA A23281 EXTENDING DIII D NEUTRAL BEAM MODULATED OPERATIONS WITH A CAMAC BASED TOTAL ON TIME INTERLOCK

SC16C650B. 1. General description. 2. Features. 5 V, 3.3 V and 2.5 V UART with 32-byte FIFOs and infrared (IrDA) encoder/decoder

16-Bit PWM Dead Band Generator Data Sheet

SLWS138B GC1012B 3.3V DIGITAL TUNER CHIP DATASHEET. October This datasheet contains information which may be changed at any time without notice.

a6850 Features General Description Asynchronous Communications Interface Adapter

Lecture 12 Timer Functions

EE251: Thursday October 25

Digital Electronics 8. Multiplexer & Demultiplexer

Double Data Rate (DDR) SDRAM MT46V64M4 16 Meg x 4 x 4 banks MT46V32M8 8 Meg x 8 x 4 banks MT46V16M16 4 Meg x 16 x 4 banks

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

LSI Computer Systems, Inc Walt Whitman Road, Melville, NY (631) FAX (631) BIT QUADRATURE COUNTER

IP-48ADM16TH. High Density 48-channel, 16-bit A/D Converter. REFERENCE MANUAL Version 1.6 August 2008

F²MC-16FX FAMILY ALL SERIES PROGRAMMABLE PULSE GENERATOR 16-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

LV-Link 3.0 Software Interface for LabVIEW

Transcription:

Topics 2244 Introduction to Microprocessors Chapter 8253 Programmable Interval Timer/Counter Suree Pumrin,, Ph.D. Interfacing with 886/888 Programming Mode 2244 Introduction to Microprocessors 2 8253/54 Timer (I) The 8253/54 Programmable interval timer is used to generate a lower frequency for various uses, e.g., the beep sound CS A x A x Port Counter Counter Counter 2 Control register 8253/54 is not selected 8253/54 Timer (II) There are three counters. The input frequency can be divided from to 65536. Input clock frequency is -2 2 MHz for 8253, up to 8 MHz for 8254, and up to MHz for 8254-2. 2. Shape of the output frequency: Square-wave One-shot Square-wave with various duty cycles. Gate is used to enable (High) or disable (Low) the counter. Bidirectional bus D-D7 D7 is connected to D-D7 D7 of the system bus. 2244 Introduction to Microprocessors 3 2244 Introduction to Microprocessors 4

Architecture of the 8253/54 8253/54 Control Word Format 2244 Introduction to Microprocessors 5 2244 Introduction to Microprocessors 6 Control Word (I) D Binary number divisor -FFFFH Divisor = 65536 if the counter is loaded with for both the low and the high bytes. BCD divisor -9999H Divisor = if the counter is loaded with for both the low and the high bytes. D, D2, and D3: Mode selection Mode : Interrupt on terminal count Mode : Programmable one-shot Mode 2: Rate generator Mode 3: Square wave rate generator Mode 4: Software triggered strobe Mode 5: Hardware triggered strobe Control Word (II) D4 and D5 for RL and RL RL and RL indicate the size of the divisor. Read/write the least significant byte (LSB) only Read/write the most significant byte (MSB) only Read/write the LSB first then followed by the MSB We can write the value of the divisor into 8253/54 timer and read the contents of the counter at any time. D6 and D7 are used to select which of the three counters: counter (), counter (), and counter 2 (). 2244 Introduction to Microprocessors 7 2244 Introduction to Microprocessors 8

Mode : Interrupt on terminal count Mode : Programmable one-shot It is used to generate an interrupt to the microprocessor after a certain interval of time. The output is initially low after the mode is set. The output remains LOW after the count value is loaded in the counter. The process of decrementing the counter continues till the terminal count is reached, i.e., the count become zero and the output goes HIGH. The T output remains high until it reloads a new mode of operation or new count. The GATE signal is high for normal counting. When GATE goes low counting is terminated and the current count is latched till the GATE goes high h again. 2244 Introduction to Microprocessors 9 The 8253/54 can be used as a monostable multivibrator. The gate input is used as trigger input in this mode. Normally, the output remains high until the count is loaded and a trigger is applied. The duration of the quasistable of the monostable multivibrator is decided by the count loaded in the count register. 2244 Introduction to Microprocessors Mode 2: Rate generator Mode 3: Square wave rate generator Divide by N counter. The output is normally high after initialization. If N is loaded as the count value, after N pulses, the output becomes low for one clock cycle. Whenever the count becomes zero another low pulse is generated at the output. 2244 Introduction to Microprocessors It is similar to mode 2. When, the count N loaded is EVEN, half of the count will be high and half of the count will be low. When, the count N loaded is ODD, the first clock pulse decrements it by. Then half of the remaining count will be high and half of the remaining count will be low. 2244 Introduction to Microprocessors 2

Mode 4: Software triggered strobe Mode 5: Hardware triggered strobe After the mode is set, the output goes high. The counter automatically begins to decrement (count down) one clock c pulse after it is loaded with the initial value through software. When the GATE signal goes low the count is latched. On the terminal count, the output goes low for one clock cycle, and then again goes high. This low pulse can be used as a strobe. 2244 Introduction to Microprocessors 3 This mode generates a strobe in response to an externally generated signal. It is similar to mode 4 except that the counting is initiated by a signal at the gate input, i.e., it is hardware triggered instead of software triggered. t After it is initialized, the output goes high. The counter starts counting after the rising edge of the trigger input (GATE). When the terminal count is reached, the output goes low for one clock cycle. 2244 Introduction to Microprocessors 4 Example Pin CS of a given 8253/54 is activated by binary address A7-A2 A2 =. Find the port addresses assigned to this 8253/54. Counter Port address = = 94H Counter Port address = = 95H Counter 2 Port address = = 96H Control register Port address = = 97H Find the configuration for this 8253/54 if the control register is programmed as follows. MOV AL, OUT 97H, AL D7-D6 D6 = select counter D5-D4 D4 = the low byte read/write is followed by the high byte. D3-D D = select mode 3 (square wave) D = select the binary counting Example 2 Use the port addresses in Ex. to program counter 2 for binary count of mode 3 (square wave) to divide CLK2 by number C26AH and find the frequency of OUT2 if CLK2 =.8 MHz. The control word = MOV AL, B6H ; counter 2, mode 3, binary OUT 97H, AL ; send it to control register MOV AX,C26AH ; load the divisor OUT 96H, AL ; send the low byte to counter 2 MOV AL, AH OUT 96H, AL ; send the high byte to counter 2 The output frequency for OUT2 =.8 MHz is divided by C26AH (4977 D). OUT 2 frequency is a square wave of 36 Hz. 2244 Introduction to Microprocessors 5 2244 Introduction to Microprocessors 6

Example 3 8253 Chip Connections in the PC Using the port address in Ex., show the programming of counter to divide CLK by,, producing the mode 3 square wave. Use the BCD option in the control byte. MOV AL, 77H OUT 97H, AL SUB AL, AL OUT 95H, AL OUT 95H, AL ; counter, mode 3, BCD ; send it to control register ; AL = load the divisor for, ; send the low byte ; send the high byte SUB AL, AL ; AL = load the divisor for, 2244 Introduction to Microprocessors 7 2244 Introduction to Microprocessors 8