SlideShare a Scribd company logo
Counter and Sequencer Design Digital Logic and  Software Principles © University of Wales Newport 2009 This work is licensed under a  Creative Commons Attribution 2.0 License .
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Counter & Sequence Design
Counters There are two design methodologies, these being: Asynchronous Design Synchronous Design The choice of method will depend upon a number of factors including: Speed at which the counter is to operate Ease of design We will look at both methods. Counter & Sequence Design
Asynchronous Design If we have a JK bistable and the J and K inputs are set at logic 1 then it will act as a toggle bistable. If we have a number of these in a line then we will have the following: We will assume the bistables are falling edge triggered. The timing diagram on the next slide shows how the Q outputs vary as the clock is pulsed. J K Q Q Ck J K Q Q Ck J K Q Q Ck 1 1 1 1 1 1 Clock Q A Q B Q C
clock Q A Q B Q C                       1 0 1 * Note that this acts as a counter – after the 5 th  pulse on the clock the outputs read 1 0 1 (Q C , Q B , Q A ). This type of counter can suffer from a delay in the reading being correct – let us look in detail at the change marked with an  asterisk .
The timing diagram shows an expanded version of the previous diagram around the moment marked with an asterisk.  t is the delay through a single JK bistable.  In total we have a possible delay of 3t With an “n” bit counter we could have a maximum delay before the count is correct of nt.  This may be a problem with fast counters. clock Q A Q B Q C t t t
Assuming that the delay is not a problem we can simply extend the number of bits in the counter by adding more JK bistables. To count up to 15 we would need 4 bistables To count up to 255 we would need 8 bistables To count up to 1023 we would need 10 bistables To count up to 65535 we would need 16 bistables If the count needs to stop at a certain value and return to zero (e.g. a decade counter … 0    9 then back to 0) then this can achieved by recognising the next number and immediately resetting the bistables to 0. Counter & Sequence Design
Decade Counter. The normal 4 bit counter is converted in the following way The  NAND  recognises 1010 (10) and resets Q D Clock Q A J K Q Q Ck 1 1 Cl Pr 1 Q B J K Q Q Ck 1 1 Cl Pr 1 Q C J K Q Q Ck 1 1 Cl Pr 1 J K Q Q Ck 1 1 Cl Pr 1 1 1 1 1
It is possible to have quite complex count sequences: 1 1 1 1 Counter & Sequence Design Q D Clock Q A J K Q Q Ck 1 1 Cl Pr Q B J K Q Q Ck 1 1 Cl Pr Q C J K Q Q Ck 1 1 Cl Pr J K Q Q Ck 1 1 Cl Pr
The count sequence is as follows: Assume count starts at 0000 Count rises until we hit 0111 (7) – the  right NAND  recognises this. Q A  and Q C  are reset and Q D  is set – 1010 (10) Count now continues until we hit 1101 (13) – the  left NAND  recognises this. Q C  and Q D  are reset – 0001 (1) The sequence is therefore: 0 – 1 – 2 – 4 – 5 – 6 – 10 – 11 – 12 – 1 – 2 – 3 -  etc Counter & Sequence Design
The design of asynchronous sequencers is not ideal as we must momentarily hit the number that will trigger the jump. This means that for a short time a number appears on the outputs which should not be there – in our previous example  0111 (7)  and  1101 (13). This may lead to false triggering of other parts of the logic circuit. Synchronous design does away with this problem as the sequence is designed into the circuit. It also does away with the problem of delays as all bistable change at the same moment in time. Counter & Sequence Design
Synchronous Design Before we look at the design methodology, we need to look back at the operation of the JK bistable. If we know the current state of the bistables output and we know what we wish it to be after the clock, we can use the table to determine what J and K need to equal. There are four possible “before and after the clock” conditions. Counter & Sequence Design J K Qn+1 0 0 Qn 0 1 0 1 0 1 1 1 Qn
Consider the situation where Qn = 0 and after the clock pulse we want it to stay at 0 i.e. Qn+1 = 0 What must J and K equal for this to be the situation? Either of these would give the desired effect. Combining these we can say: As long as  What about the rest? Counter & Sequence Design
Consider the situation where Qn = 0 and after the clock pulse we want it to change to 1 i.e. Qn+1 = 1 Combining these we can say: As long as Consider the situation where Qn = 1 and after the clock pulse we want it to change to 0 i.e. Qn+1 = 0 Combining these we can say: As long as Counter & Sequence Design
Consider the situation where Qn = 1 and after the clock pulse we want it to stay at 1 i.e. Qn+1 = 1 Combining these we can say: As long as Summarising this gives us: We can now use this to design a synchronous counter or sequencer. Counter & Sequence Design Qn Qn+1 J K 0 0 0 1 1 0 1 1
Design sequence – fill in the table -  3 bit binary counter Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Counter & Sequence Design
C K  – This can be realised using  C J  - This can be realised using B K  - This can be realised using B J  - This can be realised using A K  - This can be realised using A J  - This can be realised using Counter & Sequence Design A C B 0 0 0 1 1 1 1 0 0 1 A C B 0 0 0 1 1 1 1 0 0 1
We can now construct the logic diagram for the counter. Note the clock goes to each bistable. The Cl and Pr are not required but must be connected to logic 1. This counter is more complex to design but the correct count number is reached in 1t – this is true for any number of JK bistables in the counter Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
Design a counter which counts from 1 to 5 then back to 1  i.e. 001    010    011    100    101    001    010 etc Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
C K  – This can be realised using  C J  - This can be realised using B K  - This can be realised using B J  - This can be realised using A K  - This can be realised using A J  - This can be realised using If there are spaces in the Karnaugh map fill them with X’s Counter & Sequence Design A C B 0 0 0 1 1 1 1 0 0 1
You will note that only five out of the possible eight combinations of Q A , Q B  and Q C  have been used. It is important to know what happens if the system starts in one of the three which are unused. Counter & Sequence Design Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
We can see that 000 (0) goes to 110 (6) goes to 111 (7) goes to Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
We can now draw the  State Diagram Counter & Sequence Design
Design a sequencer with the following sequence built in. i.e. 011    111    010    101    000    011    111 etc Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
C K  – This can be realised using  C J  - This can be realised using B K  - This can be realised using B J  - This can be realised using A K  - This can be realised using A J  - This can be realised using We have a number of options as to what to use for the J and K inputs – we will select the first one in each line. Once again we only use five out of the possible eight combinations of QA, QB and QC. It is good practice to check the solution.  Counter & Sequence Design
We can see that 001 (1) goes to  100 (4) goes to  110 (6) goes to Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
We can now draw the  State Diagram Counter & Sequence Design
[object Object],[object Object],Cl A   Pr B ,  Pr C If state 100 (4) occurs it is “kicked” into state 011 (3). This effectively corrects a bad design ,[object Object],[object Object],Counter & Sequence Design
We can see that 001 (1) goes to 100 (4) goes to  110 (6) goes to  New combination is fine. Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
We can now draw the  State Diagram Now we can look at the logic diagram. Counter & Sequence Design
Design a sequencer which will follow the sequence of a set of UK traffic lights. Counter & Sequence Design Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
Counter & Sequence Design This resource was created by the University of Wales Newport and released as an open educational resource through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme. © 2009 University of Wales Newport This work is licensed under a  Creative Commons Attribution 2.0 License . The JISC logo is licensed under the terms of the Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales Licence.  All reproductions must comply with the terms of that licence. The HEA logo is owned by the Higher Education Academy Limited may be freely distributed and copied for educational purposes only, provided that appropriate acknowledgement is given to the Higher Education Academy as the copyright holder and original publisher. The name and logo of University of Wales Newport is a trade mark and all rights in it are reserved.  The name and logo should not be reproduced without the express authorisation of the University.

More Related Content

What's hot

Mod 10 synchronous counter updated
Mod 10 synchronous counter updatedMod 10 synchronous counter updated
Mod 10 synchronous counter updated
DANISHAMIN950
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous counters
Lee Diaz
 
Counters
CountersCounters
Counters
Ketaki_Pattani
 
Basics Counters
Basics Counters Basics Counters
Basics Counters
Danial Mirza
 
Counter
CounterCounter
Counter
Naufal Qodari
 
Dee2034 chapter 5 counter
Dee2034 chapter 5 counterDee2034 chapter 5 counter
Dee2034 chapter 5 counter
SITI SABARIAH SALIHIN
 
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
GauravRaikar3
 
Counters
CountersCounters
Counters
umair khan
 
MSI Counters
MSI CountersMSI Counters
MSI Counters
Abhilash Nair
 
Chapter 5 counter
Chapter 5 counterChapter 5 counter
Chapter 5 counter
CT Sabariah Salihin
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter Design
GargiKhanna1
 
Johnson counter
Johnson counterJohnson counter
Johnson counter
Muhammad Anas Sabir
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
SUBHA SHREE
 
15CS32 ADE Module 5
15CS32 ADE Module 515CS32 ADE Module 5
15CS32 ADE Module 5
RLJIT
 
Ripple counter
Ripple counterRipple counter
Ripple counter
chandkec
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
KanchanPatil34
 
Ring counter
Ring counterRing counter
Ring counter
Ghufran Hasan
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
Mantra VLSI
 
Counters
Counters Counters
Counters
Bilal Mirza
 
Counters
CountersCounters

What's hot (20)

Mod 10 synchronous counter updated
Mod 10 synchronous counter updatedMod 10 synchronous counter updated
Mod 10 synchronous counter updated
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous counters
 
Counters
CountersCounters
Counters
 
Basics Counters
Basics Counters Basics Counters
Basics Counters
 
Counter
CounterCounter
Counter
 
Dee2034 chapter 5 counter
Dee2034 chapter 5 counterDee2034 chapter 5 counter
Dee2034 chapter 5 counter
 
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
 
Counters
CountersCounters
Counters
 
MSI Counters
MSI CountersMSI Counters
MSI Counters
 
Chapter 5 counter
Chapter 5 counterChapter 5 counter
Chapter 5 counter
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter Design
 
Johnson counter
Johnson counterJohnson counter
Johnson counter
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
 
15CS32 ADE Module 5
15CS32 ADE Module 515CS32 ADE Module 5
15CS32 ADE Module 5
 
Ripple counter
Ripple counterRipple counter
Ripple counter
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
Ring counter
Ring counterRing counter
Ring counter
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
Counters
Counters Counters
Counters
 
Counters
CountersCounters
Counters
 

Viewers also liked

Shift registers
Shift registersShift registers
Shift registers
Ravi Maurya
 
Counters
CountersCounters
Counters
Lee Diaz
 
Counters In Digital Logic Design
Counters In Digital Logic DesignCounters In Digital Logic Design
Counters In Digital Logic Design
Syed Abdul Mutaal
 
Shift Register
Shift RegisterShift Register
Shift Register
Vanitha Chandru
 
Digital 9 16
Digital 9 16Digital 9 16
Digital 9 16
Sayan Chakraborty
 
14827 shift registers
14827 shift registers14827 shift registers
14827 shift registers
Sandeep Kumar
 
Overview of Shift register and applications
Overview of Shift register and applicationsOverview of Shift register and applications
Overview of Shift register and applications
Karthik Kumar
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
 
Semiconductor
SemiconductorSemiconductor
Semiconductor
Yong Heui Cho
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registers
Rai University
 
Cpu registers
Cpu registersCpu registers
Cpu registers
Puneet Rajput
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
Sanjeev Patel
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
Sanjeev Patel
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
Wan Afirah
 
Instruction code
Instruction codeInstruction code
Instruction code
Dr. Abhineet Anand
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
Anuj Modi
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unit
Anuj Modi
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
techbed
 
Computer memory
Computer memoryComputer memory
Computer memory
nikunjandy
 
Computer Memory
Computer MemoryComputer Memory
Computer Memory
Forrester High School
 

Viewers also liked (20)

Shift registers
Shift registersShift registers
Shift registers
 
Counters
CountersCounters
Counters
 
Counters In Digital Logic Design
Counters In Digital Logic DesignCounters In Digital Logic Design
Counters In Digital Logic Design
 
Shift Register
Shift RegisterShift Register
Shift Register
 
Digital 9 16
Digital 9 16Digital 9 16
Digital 9 16
 
14827 shift registers
14827 shift registers14827 shift registers
14827 shift registers
 
Overview of Shift register and applications
Overview of Shift register and applicationsOverview of Shift register and applications
Overview of Shift register and applications
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Semiconductor
SemiconductorSemiconductor
Semiconductor
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registers
 
Cpu registers
Cpu registersCpu registers
Cpu registers
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
 
Instruction code
Instruction codeInstruction code
Instruction code
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unit
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
 
Computer memory
Computer memoryComputer memory
Computer memory
 
Computer Memory
Computer MemoryComputer Memory
Computer Memory
 

Similar to Counter And Sequencer Design- Student

Counter - by Zakariya Hossain
Counter - by Zakariya HossainCounter - by Zakariya Hossain
Counter - by Zakariya Hossain
Zakariya Hossain
 
Sequential Logic
Sequential LogicSequential Logic
counters and registers
counters and registerscounters and registers
counters and registers
MeenaAnusha1
 
counters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.pptcounters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.ppt
ImranAhmadAhmad
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.ppt
RaziyaSultana30
 
Lec 25 26_27
Lec 25 26_27Lec 25 26_27
Lec 25 26_27
Zain Ul Abedeen
 
Lect06
Lect06Lect06
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
TamiratDejene1
 
Lecture-32-33.pptx
Lecture-32-33.pptxLecture-32-33.pptx
Lecture-32-33.pptx
AqeelAbbas94
 
QC-UNIT 2.ppt
QC-UNIT 2.pptQC-UNIT 2.ppt
QC-UNIT 2.ppt
khan188474
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Katrina Little
 
Sequential Circuit Design-2.pdf
Sequential Circuit Design-2.pdfSequential Circuit Design-2.pdf
Sequential Circuit Design-2.pdf
ShivarkarSandip
 
Flip Flop.pdf
Flip Flop.pdfFlip Flop.pdf
Flip Flop.pdf
ShivarkarSandip
 
Sequential Ckt.pdf
Sequential Ckt.pdfSequential Ckt.pdf
Sequential Ckt.pdf
ShivarkarSandip
 
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
SANTIAGO PABLO ALBERTO
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 
Counters r012
Counters  r012Counters  r012
Counters r012
arunachalamr16
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
EasyStudy3
 
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptEET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
BeautyKumar1
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
RLJIT
 

Similar to Counter And Sequencer Design- Student (20)

Counter - by Zakariya Hossain
Counter - by Zakariya HossainCounter - by Zakariya Hossain
Counter - by Zakariya Hossain
 
Sequential Logic
Sequential LogicSequential Logic
Sequential Logic
 
counters and registers
counters and registerscounters and registers
counters and registers
 
counters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.pptcounters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.ppt
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.ppt
 
Lec 25 26_27
Lec 25 26_27Lec 25 26_27
Lec 25 26_27
 
Lect06
Lect06Lect06
Lect06
 
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
 
Lecture-32-33.pptx
Lecture-32-33.pptxLecture-32-33.pptx
Lecture-32-33.pptx
 
QC-UNIT 2.ppt
QC-UNIT 2.pptQC-UNIT 2.ppt
QC-UNIT 2.ppt
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
Sequential Circuit Design-2.pdf
Sequential Circuit Design-2.pdfSequential Circuit Design-2.pdf
Sequential Circuit Design-2.pdf
 
Flip Flop.pdf
Flip Flop.pdfFlip Flop.pdf
Flip Flop.pdf
 
Sequential Ckt.pdf
Sequential Ckt.pdfSequential Ckt.pdf
Sequential Ckt.pdf
 
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
Electrónica digital: Diseño de contador con flip-flop tipo JK y D haciendo de...
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Counters r012
Counters  r012Counters  r012
Counters r012
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptEET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
 

More from School of Design Engineering Fashion & Technology (DEFT), University of Wales, Newport

Introduction to fourier analysis
Introduction to fourier analysisIntroduction to fourier analysis
Semiconductor theory
Semiconductor theorySemiconductor theory
Number codes
Number codesNumber codes
Decoders student
Decoders studentDecoders student
Number codes students
Number codes studentsNumber codes students
Logic gates
Logic gatesLogic gates
Design considerations
Design considerationsDesign considerations
Number bases
Number basesNumber bases
Logic Equation Simplification
Logic Equation SimplificationLogic Equation Simplification
Stabilised Power Supplies
Stabilised Power SuppliesStabilised Power Supplies
Amplifier Compensation
Amplifier CompensationAmplifier Compensation
Chapter 6 Probability
Chapter 6  ProbabilityChapter 6  Probability
Chapter 4 Integration
Chapter 4  IntegrationChapter 4  Integration

More from School of Design Engineering Fashion & Technology (DEFT), University of Wales, Newport (13)

Introduction to fourier analysis
Introduction to fourier analysisIntroduction to fourier analysis
Introduction to fourier analysis
 
Semiconductor theory
Semiconductor theorySemiconductor theory
Semiconductor theory
 
Number codes
Number codesNumber codes
Number codes
 
Decoders student
Decoders studentDecoders student
Decoders student
 
Number codes students
Number codes studentsNumber codes students
Number codes students
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Design considerations
Design considerationsDesign considerations
Design considerations
 
Number bases
Number basesNumber bases
Number bases
 
Logic Equation Simplification
Logic Equation SimplificationLogic Equation Simplification
Logic Equation Simplification
 
Stabilised Power Supplies
Stabilised Power SuppliesStabilised Power Supplies
Stabilised Power Supplies
 
Amplifier Compensation
Amplifier CompensationAmplifier Compensation
Amplifier Compensation
 
Chapter 6 Probability
Chapter 6  ProbabilityChapter 6  Probability
Chapter 6 Probability
 
Chapter 4 Integration
Chapter 4  IntegrationChapter 4  Integration
Chapter 4 Integration
 

Recently uploaded

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Counter And Sequencer Design- Student

  • 1. Counter and Sequencer Design Digital Logic and Software Principles © University of Wales Newport 2009 This work is licensed under a Creative Commons Attribution 2.0 License .
  • 2.
  • 3. Counters There are two design methodologies, these being: Asynchronous Design Synchronous Design The choice of method will depend upon a number of factors including: Speed at which the counter is to operate Ease of design We will look at both methods. Counter & Sequence Design
  • 4. Asynchronous Design If we have a JK bistable and the J and K inputs are set at logic 1 then it will act as a toggle bistable. If we have a number of these in a line then we will have the following: We will assume the bistables are falling edge triggered. The timing diagram on the next slide shows how the Q outputs vary as the clock is pulsed. J K Q Q Ck J K Q Q Ck J K Q Q Ck 1 1 1 1 1 1 Clock Q A Q B Q C
  • 5. clock Q A Q B Q C         1 0 1 * Note that this acts as a counter – after the 5 th pulse on the clock the outputs read 1 0 1 (Q C , Q B , Q A ). This type of counter can suffer from a delay in the reading being correct – let us look in detail at the change marked with an asterisk .
  • 6. The timing diagram shows an expanded version of the previous diagram around the moment marked with an asterisk. t is the delay through a single JK bistable. In total we have a possible delay of 3t With an “n” bit counter we could have a maximum delay before the count is correct of nt. This may be a problem with fast counters. clock Q A Q B Q C t t t
  • 7. Assuming that the delay is not a problem we can simply extend the number of bits in the counter by adding more JK bistables. To count up to 15 we would need 4 bistables To count up to 255 we would need 8 bistables To count up to 1023 we would need 10 bistables To count up to 65535 we would need 16 bistables If the count needs to stop at a certain value and return to zero (e.g. a decade counter … 0  9 then back to 0) then this can achieved by recognising the next number and immediately resetting the bistables to 0. Counter & Sequence Design
  • 8. Decade Counter. The normal 4 bit counter is converted in the following way The NAND recognises 1010 (10) and resets Q D Clock Q A J K Q Q Ck 1 1 Cl Pr 1 Q B J K Q Q Ck 1 1 Cl Pr 1 Q C J K Q Q Ck 1 1 Cl Pr 1 J K Q Q Ck 1 1 Cl Pr 1 1 1 1 1
  • 9. It is possible to have quite complex count sequences: 1 1 1 1 Counter & Sequence Design Q D Clock Q A J K Q Q Ck 1 1 Cl Pr Q B J K Q Q Ck 1 1 Cl Pr Q C J K Q Q Ck 1 1 Cl Pr J K Q Q Ck 1 1 Cl Pr
  • 10. The count sequence is as follows: Assume count starts at 0000 Count rises until we hit 0111 (7) – the right NAND recognises this. Q A and Q C are reset and Q D is set – 1010 (10) Count now continues until we hit 1101 (13) – the left NAND recognises this. Q C and Q D are reset – 0001 (1) The sequence is therefore: 0 – 1 – 2 – 4 – 5 – 6 – 10 – 11 – 12 – 1 – 2 – 3 - etc Counter & Sequence Design
  • 11. The design of asynchronous sequencers is not ideal as we must momentarily hit the number that will trigger the jump. This means that for a short time a number appears on the outputs which should not be there – in our previous example 0111 (7) and 1101 (13). This may lead to false triggering of other parts of the logic circuit. Synchronous design does away with this problem as the sequence is designed into the circuit. It also does away with the problem of delays as all bistable change at the same moment in time. Counter & Sequence Design
  • 12. Synchronous Design Before we look at the design methodology, we need to look back at the operation of the JK bistable. If we know the current state of the bistables output and we know what we wish it to be after the clock, we can use the table to determine what J and K need to equal. There are four possible “before and after the clock” conditions. Counter & Sequence Design J K Qn+1 0 0 Qn 0 1 0 1 0 1 1 1 Qn
  • 13. Consider the situation where Qn = 0 and after the clock pulse we want it to stay at 0 i.e. Qn+1 = 0 What must J and K equal for this to be the situation? Either of these would give the desired effect. Combining these we can say: As long as What about the rest? Counter & Sequence Design
  • 14. Consider the situation where Qn = 0 and after the clock pulse we want it to change to 1 i.e. Qn+1 = 1 Combining these we can say: As long as Consider the situation where Qn = 1 and after the clock pulse we want it to change to 0 i.e. Qn+1 = 0 Combining these we can say: As long as Counter & Sequence Design
  • 15. Consider the situation where Qn = 1 and after the clock pulse we want it to stay at 1 i.e. Qn+1 = 1 Combining these we can say: As long as Summarising this gives us: We can now use this to design a synchronous counter or sequencer. Counter & Sequence Design Qn Qn+1 J K 0 0 0 1 1 0 1 1
  • 16. Design sequence – fill in the table - 3 bit binary counter Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
  • 17.
  • 18. C K – This can be realised using C J - This can be realised using B K - This can be realised using B J - This can be realised using A K - This can be realised using A J - This can be realised using Counter & Sequence Design A C B 0 0 0 1 1 1 1 0 0 1 A C B 0 0 0 1 1 1 1 0 0 1
  • 19. We can now construct the logic diagram for the counter. Note the clock goes to each bistable. The Cl and Pr are not required but must be connected to logic 1. This counter is more complex to design but the correct count number is reached in 1t – this is true for any number of JK bistables in the counter Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
  • 20. Design a counter which counts from 1 to 5 then back to 1 i.e. 001  010  011  100  101  001  010 etc Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
  • 21. C K – This can be realised using C J - This can be realised using B K - This can be realised using B J - This can be realised using A K - This can be realised using A J - This can be realised using If there are spaces in the Karnaugh map fill them with X’s Counter & Sequence Design A C B 0 0 0 1 1 1 1 0 0 1
  • 22. You will note that only five out of the possible eight combinations of Q A , Q B and Q C have been used. It is important to know what happens if the system starts in one of the three which are unused. Counter & Sequence Design Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
  • 23. We can see that 000 (0) goes to 110 (6) goes to 111 (7) goes to Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
  • 24. We can now draw the State Diagram Counter & Sequence Design
  • 25. Design a sequencer with the following sequence built in. i.e. 011  111  010  101  000  011  111 etc Counter & Sequence Design Present State Next State A B C A B C A B C J K J K J K
  • 26. C K – This can be realised using C J - This can be realised using B K - This can be realised using B J - This can be realised using A K - This can be realised using A J - This can be realised using We have a number of options as to what to use for the J and K inputs – we will select the first one in each line. Once again we only use five out of the possible eight combinations of QA, QB and QC. It is good practice to check the solution. Counter & Sequence Design
  • 27. We can see that 001 (1) goes to 100 (4) goes to 110 (6) goes to Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
  • 28. We can now draw the State Diagram Counter & Sequence Design
  • 29.
  • 30. We can see that 001 (1) goes to 100 (4) goes to 110 (6) goes to New combination is fine. Counter & Sequence Design Present State A B C Next State A B C J K J K J K A B C
  • 31. We can now draw the State Diagram Now we can look at the logic diagram. Counter & Sequence Design
  • 32. Design a sequencer which will follow the sequence of a set of UK traffic lights. Counter & Sequence Design Clock C J K Q Q Ck B J K Q Q Ck A J K Q Q Ck
  • 33. Counter & Sequence Design This resource was created by the University of Wales Newport and released as an open educational resource through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme. © 2009 University of Wales Newport This work is licensed under a Creative Commons Attribution 2.0 License . The JISC logo is licensed under the terms of the Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales Licence.  All reproductions must comply with the terms of that licence. The HEA logo is owned by the Higher Education Academy Limited may be freely distributed and copied for educational purposes only, provided that appropriate acknowledgement is given to the Higher Education Academy as the copyright holder and original publisher. The name and logo of University of Wales Newport is a trade mark and all rights in it are reserved. The name and logo should not be reproduced without the express authorisation of the University.