SlideShare a Scribd company logo
1 of 25
Not
Possible To
Generate
Accurate
Time
Delays
Using Delay
Routines in
8086
Intel’s Programmable
Counter/ Timer Device
(8253/8254) Facilitates
• Accurate Time Delays
• Minimizes Load On Mp
• Real Time Clock
• Event Counter
• Digital One Shot
• Square Wave Generator
• Complex Waveform Generator
Counters:
 Three Counters – C1,C2 & C3
 Each 16 Bit Identical Presettable
 Down Counter Operates In BCD /Hex
 Controlled By Loading Count To Command Word Register
 “On The Fly” Reading
Control Logic:
 CS – Logic 0 – Enables 8254
 RD – Logic 0 – Tells Microprocessor Reads Count From 8254
 WR – Logic 0 – Tells Microprocessor Writes Count/ Command
Into 8254
 A1,a0 – Address Input Pins To Select Modes And Counters
Data Buffers:
 8 Bit Bidirectional D0-d7 Connected To Data Bus Of Microprocessor
 In  Reads Data From Peripheral
 Out  Writes Data To Peripheral
Control Word Register:
 Accepts 8 Bit Control Word Written By Microprocessor
 Can Only Be Written ( Not Read)
 Control Word Chooses One Of The Six Modes Of Operation
CS RD WR A1 A0 OPERATION
0 1 0 0 0 Write Counter 0
0 1 0 0 1 Write Counter 1
0 1 0 1 0 Write Counter 2
0 1 0 1 1 Write Control Word
0 0 1 0 0 Read Counter 0
0 0 1 0 1 Read Counter 1
0 0 1 1 0 Read Counter 2
0 0 1 1 1 No Operation ( Tristated )
0 1 1 X X No Operation ( Tristated )
1 X X X X 8254 Not Selected
Read Operations
 There are three possible methods for reading the
counters:
1. a simple read operation
2. the Counter Latch Command
3. the Read-Back Command
1. 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.
2. 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.
3. 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 and is accessed by a
read from that counter
Status register:
•Shows the state of the output pin
•Check the counter is in null state (0) or not
•How the counter is programmed
8254
Modes Of
Operation
Mode 0
Interrupt On
Terminal
Count
Mode 1
Programmable
Monoshot
Mode 2 Rate
Generator
Mode 3
Square Wave
Generator
Mode 4
Software
Triggered
Strobe
Mode 5
Hardware
Triggered
Strobe
1. Mode 0 (Interrupt On Terminal Count )
2. Mode 1 (Programmable Monoshot )
3. Mode 2 (Rate Generator )
4. Mode 3 (Square Wave Generator )
5. Mode 4 (Software Triggered Strobe )
6. Mode 5 (Hardware Triggered Strobe )
8254 Modes Of Operation
Modes of Operation
 Mode 0:
Events
counter
(used for
system
time)
 Mode 1: One
shot pulse
Modes of Operation
 Mode 2:
Continuous
pulses
 Mode 3:
Continuous
square-wave
Modes of Operation
 Mode 4:
Software
triggered
one-shot
pulse
 Mode 5:
Hardware
triggered
one-shot
pulse
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 & 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 1: One-shot mode.
 Monostable multivibrator
 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 2: Rate Generator / Divide by N Counter
 When N is loaded as count  after N pulses  OUT goes low for
only one clock cycle then, count N is reloaded  OUT becomes
high for N clock pulses
 The number of clock pulses between the two low pulses is equal
to the count loaded
 Gate  logic 0  no counting
 Gate  logic 1  normal counting
Mode 3: SQUARE WAVE RATE GENERATOR
1. When count N loaded is even  output remains HIGH for half
the count and LOW for the rest half of the count
2. When count N loaded is odd  output remains HIGH for
(N+1)/2 and low for (N-1)/2.
3. Repeated operation gives square wave
4. Generates a continuous square-wave with G set to 1.
5. If count is even, 50% duty cycle otherwise OUT is high 1 cycle
longer.
 After mode is set output goes high
 When count is loaded counting down starts on reaching terminal
count output goes low for only one clock cycle, and then again
output goes HIGH
 The above said low pulse can be used as a strobe for interfacing
MP with peripherals
 When GATE is LOW  counting is inhibited and count is latched
If a new count is loaded while counting, previous counting stops
and new counting started in next clock cycle
Mode 4: Software triggered Strobe
 This mode generates a strobe in response to the rising edge at the trigger
 Mode is used to generate a delayed strobe in response to an externally
generated signal
 Once mode is programmed and counter loaded, OUT goes HIGH
 Counter starts counting after the rising edge of the trigger (GATE)
 The OUTPUT goes LOW for one clock period, when the terminal count is
reached
 Output will not go LOW until the counter content becomes zero after the rising
edge of any trigger
 GATE is used as trigger input
Mode 5: Hardware triggered Strobe
8254 Timer Modes

More Related Content

What's hot

Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unitrishi ram khanal
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacingAmitabh Shukla
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.pptDr.YNM
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollersHiran Gabriel
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notesDr.YNM
 
I2C BUS
I2C BUSI2C BUS
I2C BUSp_ayal
 
Embedded Hardware Design.pptx
Embedded Hardware Design.pptxEmbedded Hardware Design.pptx
Embedded Hardware Design.pptxAbhaySharma207975
 
Switched capacitor filter
Switched capacitor filter Switched capacitor filter
Switched capacitor filter Minh Anh Nguyen
 
Programmable Peripheral Interface 8255
 Programmable Peripheral Interface   8255 Programmable Peripheral Interface   8255
Programmable Peripheral Interface 8255Dr.P.Parandaman
 
Fpga(field programmable gate array)
Fpga(field programmable gate array) Fpga(field programmable gate array)
Fpga(field programmable gate array) Iffat Anjum
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 

What's hot (20)

Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
 
SHLD and LHLD instruction
SHLD and LHLD instructionSHLD and LHLD instruction
SHLD and LHLD instruction
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing
 
82C55 PPI (1).ppt
82C55 PPI (1).ppt82C55 PPI (1).ppt
82C55 PPI (1).ppt
 
CMOS Logic Circuits
CMOS Logic CircuitsCMOS Logic Circuits
CMOS Logic Circuits
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollers
 
sistemas numericos de los plc's
sistemas numericos de los plc'ssistemas numericos de los plc's
sistemas numericos de los plc's
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
I2C BUS
I2C BUSI2C BUS
I2C BUS
 
8251 USART
8251 USART8251 USART
8251 USART
 
Embedded Hardware Design.pptx
Embedded Hardware Design.pptxEmbedded Hardware Design.pptx
Embedded Hardware Design.pptx
 
Parallel Adder
Parallel Adder Parallel Adder
Parallel Adder
 
Timers in Arduino
Timers in ArduinoTimers in Arduino
Timers in Arduino
 
Switched capacitor filter
Switched capacitor filter Switched capacitor filter
Switched capacitor filter
 
Programmable Peripheral Interface 8255
 Programmable Peripheral Interface   8255 Programmable Peripheral Interface   8255
Programmable Peripheral Interface 8255
 
8253ppt
8253ppt8253ppt
8253ppt
 
Fpga(field programmable gate array)
Fpga(field programmable gate array) Fpga(field programmable gate array)
Fpga(field programmable gate array)
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 

Similar to 8254 Timer Modes

8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijayVijay Kumar
 
Timer
TimerTimer
TimerAisu
 
unit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxunit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxDrVikasMahor
 
IC 8253 - Microprocessor
IC 8253 - Microprocessor IC 8253 - Microprocessor
IC 8253 - Microprocessor Vatsal N Shah
 
Interfacing with Timer IC.pptx interfacing with timer ic
Interfacing with Timer IC.pptx interfacing with timer icInterfacing with Timer IC.pptx interfacing with timer ic
Interfacing with Timer IC.pptx interfacing with timer icSunilAcharya37
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptxSujalKumar73
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.pptkhushiduppala
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)Amr Ahmed
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav Raikar
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav RaikarDigital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav Raikar
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav RaikarGauravRaikar3
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Ramadan Ramadan
 

Similar to 8254 Timer Modes (20)

8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay
 
Timer
TimerTimer
Timer
 
unit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxunit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptx
 
IC 8253 - Microprocessor
IC 8253 - Microprocessor IC 8253 - Microprocessor
IC 8253 - Microprocessor
 
Interfacing with Timer IC.pptx interfacing with timer ic
Interfacing with Timer IC.pptx interfacing with timer icInterfacing with Timer IC.pptx interfacing with timer ic
Interfacing with Timer IC.pptx interfacing with timer ic
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
 
Peripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controllerPeripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controller
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt
 
3942936.ppt
3942936.ppt3942936.ppt
3942936.ppt
 
Assembler4
Assembler4Assembler4
Assembler4
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
8253
82538253
8253
 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)
 
control unit
control unitcontrol unit
control unit
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
8253,8254
8253,8254 8253,8254
8253,8254
 
Timers
TimersTimers
Timers
 
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav Raikar
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav RaikarDigital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav Raikar
Digital clock (mod counters)using DSCH (DIGITAL SCHEMATIC) by Gaurav Raikar
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
 

Recently uploaded

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

8254 Timer Modes

  • 1.
  • 2. Not Possible To Generate Accurate Time Delays Using Delay Routines in 8086 Intel’s Programmable Counter/ Timer Device (8253/8254) Facilitates • Accurate Time Delays • Minimizes Load On Mp • Real Time Clock • Event Counter • Digital One Shot • Square Wave Generator • Complex Waveform Generator
  • 3.
  • 4.
  • 5.
  • 6. Counters:  Three Counters – C1,C2 & C3  Each 16 Bit Identical Presettable  Down Counter Operates In BCD /Hex  Controlled By Loading Count To Command Word Register  “On The Fly” Reading Control Logic:  CS – Logic 0 – Enables 8254  RD – Logic 0 – Tells Microprocessor Reads Count From 8254  WR – Logic 0 – Tells Microprocessor Writes Count/ Command Into 8254  A1,a0 – Address Input Pins To Select Modes And Counters
  • 7. Data Buffers:  8 Bit Bidirectional D0-d7 Connected To Data Bus Of Microprocessor  In  Reads Data From Peripheral  Out  Writes Data To Peripheral Control Word Register:  Accepts 8 Bit Control Word Written By Microprocessor  Can Only Be Written ( Not Read)  Control Word Chooses One Of The Six Modes Of Operation
  • 8. CS RD WR A1 A0 OPERATION 0 1 0 0 0 Write Counter 0 0 1 0 0 1 Write Counter 1 0 1 0 1 0 Write Counter 2 0 1 0 1 1 Write Control Word 0 0 1 0 0 Read Counter 0 0 0 1 0 1 Read Counter 1 0 0 1 1 0 Read Counter 2 0 0 1 1 1 No Operation ( Tristated ) 0 1 1 X X No Operation ( Tristated ) 1 X X X X 8254 Not Selected
  • 9.
  • 10. Read Operations  There are three possible methods for reading the counters: 1. a simple read operation 2. the Counter Latch Command 3. the Read-Back Command 1. 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.
  • 11. 2. 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.
  • 12. 3. 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 and is accessed by a read from that counter
  • 13. Status register: •Shows the state of the output pin •Check the counter is in null state (0) or not •How the counter is programmed
  • 14. 8254 Modes Of Operation Mode 0 Interrupt On Terminal Count Mode 1 Programmable Monoshot Mode 2 Rate Generator Mode 3 Square Wave Generator Mode 4 Software Triggered Strobe Mode 5 Hardware Triggered Strobe
  • 15. 1. Mode 0 (Interrupt On Terminal Count ) 2. Mode 1 (Programmable Monoshot ) 3. Mode 2 (Rate Generator ) 4. Mode 3 (Square Wave Generator ) 5. Mode 4 (Software Triggered Strobe ) 6. Mode 5 (Hardware Triggered Strobe ) 8254 Modes Of Operation
  • 16. Modes of Operation  Mode 0: Events counter (used for system time)  Mode 1: One shot pulse
  • 17. Modes of Operation  Mode 2: Continuous pulses  Mode 3: Continuous square-wave
  • 18. Modes of Operation  Mode 4: Software triggered one-shot pulse  Mode 5: Hardware triggered one-shot pulse
  • 19. 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 & 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
  • 20. Mode 1: One-shot mode.  Monostable multivibrator  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
  • 21. Mode 2: Rate Generator / Divide by N Counter  When N is loaded as count  after N pulses  OUT goes low for only one clock cycle then, count N is reloaded  OUT becomes high for N clock pulses  The number of clock pulses between the two low pulses is equal to the count loaded  Gate  logic 0  no counting  Gate  logic 1  normal counting
  • 22. Mode 3: SQUARE WAVE RATE GENERATOR 1. When count N loaded is even  output remains HIGH for half the count and LOW for the rest half of the count 2. When count N loaded is odd  output remains HIGH for (N+1)/2 and low for (N-1)/2. 3. Repeated operation gives square wave 4. Generates a continuous square-wave with G set to 1. 5. If count is even, 50% duty cycle otherwise OUT is high 1 cycle longer.
  • 23.  After mode is set output goes high  When count is loaded counting down starts on reaching terminal count output goes low for only one clock cycle, and then again output goes HIGH  The above said low pulse can be used as a strobe for interfacing MP with peripherals  When GATE is LOW  counting is inhibited and count is latched If a new count is loaded while counting, previous counting stops and new counting started in next clock cycle Mode 4: Software triggered Strobe
  • 24.  This mode generates a strobe in response to the rising edge at the trigger  Mode is used to generate a delayed strobe in response to an externally generated signal  Once mode is programmed and counter loaded, OUT goes HIGH  Counter starts counting after the rising edge of the trigger (GATE)  The OUTPUT goes LOW for one clock period, when the terminal count is reached  Output will not go LOW until the counter content becomes zero after the rising edge of any trigger  GATE is used as trigger input Mode 5: Hardware triggered Strobe