SlideShare a Scribd company logo
By
K. Vijay Kumar
Assistant Professor
Dept. of ECE
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
8253
• 8253 can
operate at
frequency
from dc to
2mhz
8254-ADVANCED VERSION OF 8253
• 8254 can operate with higher clock
Frequency Range ( DC To 8 Mhz AND 10 Mhz
FOR 8254-2)
• Includes Status Read Back Command That
Latches The Count And Status Of Counters
 Compatible with All Intel and Most other Microprocessors and Handles Inputs from DC
to 10 MHz
 8 MHz 8254 and 10 MHz 8254-2
 The Intel 8254 is a counter/timer device designed to solve the common timing control
problems in microcomputer system design.
 It provides three independent 16-bit counters, each capable of handling clock inputs up
to 10 MHz
 Binary or BCD counting
 Single a +5V Supply and Standard Temperature Range
 Six Programmable Counter Modes and All modes are software programmable. The 8254
is a superset of the 8253.
 The 8254 uses HMOS technology and comes in a 24-pin plastic or CERDIP package.
 Used for controlling real-time events such as real-time clock, events counter, and motor
speed and direction control.
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
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
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 2: Rate Generator / Divide By N Counter
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.
Mode 3: Square Wave Generator
 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
Mode 5: Hardware triggered Strobe
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 Programmable Interval Timer by vijay

More Related Content

What's hot

APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
Azad Mishra
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
KanchanPatil34
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
SIVA NAGENDRA REDDY
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
ShivamSood22
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
8085 instruction set
8085 instruction set8085 instruction set
I/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architectureI/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architecture
kavitha muneeshwaran
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 
8086
80868086
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
Vikas Gupta
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
MdFazleRabbi18
 
8086 signals
8086 signals8086 signals
8086 signals
mpsrekha83
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
Senthil Kumar
 
Read & write
Read & writeRead & write
Read & write
malaybpramanik
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
Sudhanshu Janwadkar
 
axi protocol
axi protocolaxi protocol
axi protocol
Azad Mishra
 

What's hot (20)

APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
8253ppt
8253ppt8253ppt
8253ppt
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Lpc2148 i2c
Lpc2148 i2cLpc2148 i2c
Lpc2148 i2c
 
I/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architectureI/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architecture
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
8086
80868086
8086
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
8086 signals
8086 signals8086 signals
8086 signals
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
 
Read & write
Read & writeRead & write
Read & write
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
axi protocol
axi protocolaxi protocol
axi protocol
 

Viewers also liked

Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
Gaurav Verma
 
Lec14
Lec14Lec14
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instructionkashif Shafqat
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with types
Ravinder Rautela
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
MNM Jain Engineering College
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 

Viewers also liked (7)

Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
Lec14
Lec14Lec14
Lec14
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
8086 instruction set with types
8086 instruction set with types8086 instruction set with types
8086 instruction set with types
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 

Similar to 8254 Programmable Interval Timer by vijay

8254.pptx
8254.pptx8254.pptx
8254.pptx
ranjeeta29
 
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
DrVikasMahor
 
Timer
TimerTimer
TimerAisu
 
8254 PIT
8254 PIT8254 PIT
8254 PIT
deval patel
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacingAmitabh Shukla
 
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 ic
SunilAcharya37
 
5.programmable interval timer 8253
5.programmable interval timer 82535.programmable interval timer 8253
5.programmable interval timer 8253
MdFazleRabbi18
 
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
Prof. 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
মেহরাব শুভ
 
8253
82538253
3942936.ppt
3942936.ppt3942936.ppt
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
khushiduppala
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
ragupathi90
 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)
Amr Ahmed
 
8255.pdf
8255.pdf8255.pdf
8255.pdf
someshdash1
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
SujalKumar73
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
Futura infotech
 
Assembler4
Assembler4Assembler4
Assembler4
Omar Sanchez
 

Similar to 8254 Programmable Interval Timer by vijay (20)

8254.pptx
8254.pptx8254.pptx
8254.pptx
 
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
 
Timer
TimerTimer
Timer
 
8254 PIT
8254 PIT8254 PIT
8254 PIT
 
8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing8254 timer - Microprocessor and interfacing
8254 timer - Microprocessor and interfacing
 
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
 
5.programmable interval timer 8253
5.programmable interval timer 82535.programmable interval timer 8253
5.programmable interval timer 8253
 
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
 
8253
82538253
8253
 
3942936.ppt
3942936.ppt3942936.ppt
3942936.ppt
 
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
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)
 
8253,8254
8253,8254 8253,8254
8253,8254
 
8255.pdf
8255.pdf8255.pdf
8255.pdf
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
Assembler4
Assembler4Assembler4
Assembler4
 

More from Vijay Kumar

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
Vijay Kumar
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor
Vijay Kumar
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
Vijay Kumar
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
Vijay Kumar
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
Vijay Kumar
 
8085 instruction set and addressing modes
8085 instruction set and addressing modes8085 instruction set and addressing modes
8085 instruction set and addressing modes
Vijay Kumar
 
8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description 8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description
Vijay Kumar
 
8085 microprocessor Architecture and Pin description
8085 microprocessor Architecture and Pin description 8085 microprocessor Architecture and Pin description
8085 microprocessor Architecture and Pin description
Vijay Kumar
 
8086 Microprocessor Instruction set
8086 Microprocessor Instruction set8086 Microprocessor Instruction set
8086 Microprocessor Instruction set
Vijay Kumar
 
Input output devices
Input output devicesInput output devices
Input output devices
Vijay Kumar
 
Microprocessors evolution introduction to microprocessor
Microprocessors  evolution introduction to microprocessorMicroprocessors  evolution introduction to microprocessor
Microprocessors evolution introduction to microprocessor
Vijay Kumar
 
Memory types
Memory typesMemory types
Memory types
Vijay Kumar
 
Memory
MemoryMemory
Memory
Vijay Kumar
 
Evolution of INTEL Microprocessor
Evolution of INTEL MicroprocessorEvolution of INTEL Microprocessor
Evolution of INTEL Microprocessor
Vijay Kumar
 
Origin of Microprocessor and Classification of Microprocessor
Origin of Microprocessor and  Classification of Microprocessor Origin of Microprocessor and  Classification of Microprocessor
Origin of Microprocessor and Classification of Microprocessor
Vijay Kumar
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
Vijay Kumar
 
Embedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayEmbedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijay
Vijay Kumar
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay Kumar
Vijay Kumar
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar
Vijay Kumar
 
Rs 232 & usb ieee1394 communication
Rs 232 & usb  ieee1394 communicationRs 232 & usb  ieee1394 communication
Rs 232 & usb ieee1394 communicationVijay Kumar
 

More from Vijay Kumar (20)

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
8085 instruction set and addressing modes
8085 instruction set and addressing modes8085 instruction set and addressing modes
8085 instruction set and addressing modes
 
8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description 8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description
 
8085 microprocessor Architecture and Pin description
8085 microprocessor Architecture and Pin description 8085 microprocessor Architecture and Pin description
8085 microprocessor Architecture and Pin description
 
8086 Microprocessor Instruction set
8086 Microprocessor Instruction set8086 Microprocessor Instruction set
8086 Microprocessor Instruction set
 
Input output devices
Input output devicesInput output devices
Input output devices
 
Microprocessors evolution introduction to microprocessor
Microprocessors  evolution introduction to microprocessorMicroprocessors  evolution introduction to microprocessor
Microprocessors evolution introduction to microprocessor
 
Memory types
Memory typesMemory types
Memory types
 
Memory
MemoryMemory
Memory
 
Evolution of INTEL Microprocessor
Evolution of INTEL MicroprocessorEvolution of INTEL Microprocessor
Evolution of INTEL Microprocessor
 
Origin of Microprocessor and Classification of Microprocessor
Origin of Microprocessor and  Classification of Microprocessor Origin of Microprocessor and  Classification of Microprocessor
Origin of Microprocessor and Classification of Microprocessor
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 
Embedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayEmbedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijay
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay Kumar
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar
 
Rs 232 & usb ieee1394 communication
Rs 232 & usb  ieee1394 communicationRs 232 & usb  ieee1394 communication
Rs 232 & usb ieee1394 communication
 

Recently uploaded

NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
Nettur Technical Training Foundation
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 

Recently uploaded (20)

NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 

8254 Programmable Interval Timer by vijay

  • 1. By K. Vijay Kumar Assistant Professor Dept. of ECE
  • 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. 8253 • 8253 can operate at frequency from dc to 2mhz 8254-ADVANCED VERSION OF 8253 • 8254 can operate with higher clock Frequency Range ( DC To 8 Mhz AND 10 Mhz FOR 8254-2) • Includes Status Read Back Command That Latches The Count And Status Of Counters
  • 4.  Compatible with All Intel and Most other Microprocessors and Handles Inputs from DC to 10 MHz  8 MHz 8254 and 10 MHz 8254-2  The Intel 8254 is a counter/timer device designed to solve the common timing control problems in microcomputer system design.  It provides three independent 16-bit counters, each capable of handling clock inputs up to 10 MHz  Binary or BCD counting  Single a +5V Supply and Standard Temperature Range  Six Programmable Counter Modes and All modes are software programmable. The 8254 is a superset of the 8253.  The 8254 uses HMOS technology and comes in a 24-pin plastic or CERDIP package.  Used for controlling real-time events such as real-time clock, events counter, and motor speed and direction control.
  • 5.
  • 6.
  • 7. 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
  • 8. 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
  • 9. 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
  • 10.
  • 11. 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
  • 12. 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
  • 13. 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
  • 14.
  • 15. 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
  • 16.
  • 17. 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
  • 18. Mode 2: Rate Generator / Divide By N Counter
  • 19.
  • 20. 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.
  • 21. Mode 3: Square Wave Generator
  • 22.  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
  • 23.
  • 24. 24
  • 25.  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
  • 26. Mode 5: Hardware triggered Strobe
  • 27. 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.
  • 28. 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.
  • 29. 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
  • 30. Status register: •Shows the state of the output pin •Check the counter is in null state (0) or not •How the counter is programmed