ADE Module-5
Kishore Kumar R RLJIT Page 1
Module-5
Chapter 1: Counters
1.1 Decade Counter
1.2 Presettable Counter
1.3 Counter Design as Synthesis problem
1.4 A Digital Clock
1.5 Counter Design using HDL
ADE Module-5
Kishore Kumar R RLJIT Page 2
Decade Counter or MOD-10 counter:
A decade counter counts in a sequence of ten and returns back to 0 after the count of
nine. Decade counter can be designed by using MOD-5 and MOD-2 counters.
Designing Mod-5 Counter:
State table
C B A C+1 B+1 A+1 JC KC JB KB JA KB
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
0 0 1
0 1 0
0 1 1
1 0 0
0 0 0
0 ×
0 ×
0 ×
1 ×
× 1
0 ×
1 ×
× 0
× 1
0 ×
1 ×
× 1
1 ×
× 1
0 ×
ADE Module-5
Kishore Kumar R RLJIT Page 3
MOD-5 Counter Circuit:
Decade Counter (MOD-10):
MOD-10 counter can be designed by cascading MOD-5 counter and adding additional
flip-flop as shown below
ADE Module-5
Kishore Kumar R RLJIT Page 4
MOD-10 Counter circuit:
Truth table: Timing Waveform:
D C B A Count
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
0
1
2
3
4
8
9
10
11
12
Note: this MOD-10 counter has 10 different states, but count is not in straight sequence
MOD-10 Counter:
To get a count in straight sequence, Decade counter can be designed as shown below.
ADE Module-5
Kishore Kumar R RLJIT Page 5
Circuit:
Truth Table: Timing Waveforms:
Note: This mod-10 counter has 10 different states, count is in straight sequence
Presettable Counter:
In Presettable counter, user can set initial state of the counter, after initial state, counter
can be made to count either UP or Down.
MOD-8 Presettable counter with initial state =101 (5):
Figure below shows, MOD-8 counter, to set the initial state 101 (5), apply 101 to parallel
inputs P2P1P0 =101, and apply parallel load =0, hence inversion of parallel load 1 will be applied
to one of inputs of all NAND gates, at flip-flop inputs for NAND gate are 11 hence its output 0 is
applied to PRESET of FF-A, hence output of a FF-A is 1, similarly at FF-B PRESET=1 and
CLR=0, hence output of FF-B is 0, and at FF-C PRESET=0 and CLR=1, hence FF-C output is 1,
now state of counter QCQBQA=101, after this state if Parallel Load is made 1, hence all
ADE Module-5
Kishore Kumar R RLJIT Page 6
PRESET and RESET inputs are deactivated, since counter is designed as UP-counter, it
increments the count by 1 on every negative clock cycle.
Truth Table:
PL P2 P1 P0 QC QB QA
0
1
1
1
1
1
1
1
1 0 1
× × ×
× × ×
× × ×
× × ×
× × ×
× × ×
× × ×
1 0 1
1 1 0
1 1 1
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
ADE Module-5
Kishore Kumar R RLJIT Page 7
Counter Design as Synthesis Problem:
Designing MOD-6 Counter:
State table:
JA =1 and KA=1
ADE Module-5
Kishore Kumar R RLJIT Page 8
MOD-6 Circuit-Diagram:
Problem: Design self-correcting MOD-6 counter in which all the unused states leads to
state CBA=000
State Table:
Cn Bn An Cn+1 Bn+1 An+1 JC KC JB KB JA KA
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
0 0 0
0 0 0
0 0 0
0 ×
0 ×
0 ×
1 ×
× 0
× 1
× 1
× 1
0 ×
1 ×
× 0
× 1
0 ×
0 ×
× 1
× 1
1 ×
× 1
1 ×
× 1
1 ×
× 1
0 ×
× 1
ADE Module-5
Kishore Kumar R RLJIT Page 9
Mod-6 self-correcting circuit:
Problem: Design Self-correcting MOD-5 Synchronous Down counter using JK Flip-Flops,
Assume 100 as next state for all unused states.
ADE Module-5
Kishore Kumar R RLJIT Page 10
ADE Module-5
Kishore Kumar R RLJIT Page 11
Problem: Design and explain working of Asynchronous decade counter with a suitable
diagram.
To design decade counter which has 10 states, four flip-flops are required, for
Asynchronous UP-counter, output of flip-flop is connected to clock input of next flip-flop, to
have 10 states (0-9), after the state 9(1001) counter should get reset, resetting of counter can be
done using RESET inputs of all flip-flops, in decade counter, RESET input is activated using
NAND gates when state 10 (QDQCQBQA = 1010) occurs.
ADE Module-5
Kishore Kumar R RLJIT Page 12
Truth table:
Timing waveform:
ADE Module-5
Kishore Kumar R RLJIT Page 13
ADE Module-5
Kishore Kumar R RLJIT Page 14
Define Counter. Design a synchronous counter for the Sequence 0412604
Using JK Flip-Flop.
State table:
C B A C+1 B+1 A+1 Jc Kc JB KB JA KA
0 0 0
1 0 0
0 0 1
0 1 0
1 1 0
1 0 0
0 0 1
0 1 0
1 1 0
0 0 0
1 X
X 1
0 X
1 X
X 1
0 X
0 X
1 X
X 0
X 1
0 X
1 X
X 1
0 X
0 X
ADE Module-5
Kishore Kumar R RLJIT Page 15
Circuit:
Problem: Design Modulo-4 irregular counter with following sequence using D-Flip-Flop
Digital Clock:
Counters can be used to construct an ordinary clock which displays hours, minutes and
seconds, power supply to the counter is usually 60Hz 120V ac, when this signal frequency is
divided by 60 we get a clock signal with one cycle per sec, if resulting waveform is divided by
60 again we get one clock cycle per minute, if this resulting waveform is divided by 60 again we
get one cycle per hour,
ADE Module-5
Kishore Kumar R RLJIT Page 16
Block diagram of digital clock:
The first divide by 60 counter divides 60Hz power signal to 1Hz square waveform, the
second divide by 60 counter changes state on every second, and has 60 discrete states, it can be
used to display seconds and hence referred as seconds counter,
Third divide by 60 counter changes state on every minute, and 60 discrete states, it can be
used to display minutes, and referred as minutes counter.
The last counter changes state on every 60 minutes(hour), if it is divided by 12 it will
have 12 states, that can be decoded to provide signals to display correct hour, this is referred to
as Hours counter.
Counter Design Using HDL:
Program: Write Verilog code for MOD-8 Up counter
ADE Module-5
Kishore Kumar R RLJIT Page 17
Program: Write Verilog code for MOD-8 down counter
module DC (CLK, PRESET, Q);
input CLK,PRESET;
output [2:0]Q;
reg [2:0]Q;
always @ (negedge clk or negedge PRESET)
If (~PRESET) Q=3’b111;
else Q=Q – 1;
endmodule
Important Questions
1. Define Counter. Design a synchronous counter for the sequence 0412604 using
JK Flip-Flop JAN-17 (12 M)
2. Explain Digital clock with neat diagram JAN&JUL-17 (4 M)
3. Define Counter. Design a synchronous counter for the sequence 0412604 using
SR Flip-Flop JUL-17 (12 M)
4. Design self-correcting MOD-6 Counter.
5. Explain Presettable MOD-8 counter
6. Design and explain working of Decade counter
7. Write Verilog code for MOD-8 Up counter
8. Design MOD-3 counter
9. Design Modulo-4 irregular counter with following sequence using D-Flip-Flop

More Related Content

PPTX
8255 PPI
PPTX
Lcd interfaing using 8051 and assambly language programming
PPTX
Interrupts in 8085
PPTX
state diagrams of flip flops
PPTX
PPTX
latches
PPTX
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
PDF
Programmable Peripheral Interface 8255
8255 PPI
Lcd interfaing using 8051 and assambly language programming
Interrupts in 8085
state diagrams of flip flops
latches
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
Programmable Peripheral Interface 8255

What's hot (20)

PPTX
JK flip flop in Digital electronics
PPTX
Key board interfacing with 8051
PPTX
Latches and flip flops
PPTX
8251 USART
PPT
Time delays & counter.ppt
PDF
Mealy state machine
PPTX
Combinational Circuits & Sequential Circuits
PDF
Verilog-Behavioral Modeling .pdf
PPT
8251 universal synchronous asynchronous receiver transmitter
PPTX
Types of flip flops ppt
PPTX
Compilers
PPTX
Interfacing memory with 8086 microprocessor
PDF
State space analysis
DOCX
Hardware-Software Codesign
PPTX
Logic simplification sop and pos forms
PPTX
Restoring & Non-Restoring Division Algorithm By Sania Nisar
PPTX
Pic ppt 13104022(4th_year)
PPTX
Flipflop
JK flip flop in Digital electronics
Key board interfacing with 8051
Latches and flip flops
8251 USART
Time delays & counter.ppt
Mealy state machine
Combinational Circuits & Sequential Circuits
Verilog-Behavioral Modeling .pdf
8251 universal synchronous asynchronous receiver transmitter
Types of flip flops ppt
Compilers
Interfacing memory with 8086 microprocessor
State space analysis
Hardware-Software Codesign
Logic simplification sop and pos forms
Restoring & Non-Restoring Division Algorithm By Sania Nisar
Pic ppt 13104022(4th_year)
Flipflop
Ad

Similar to 15CS32 ADE Module 5 (20)

PDF
Chapter 5 counter1
PPTX
Unit-III.pptx
PDF
Chapter 5 counter
PPSX
Dee2034 chapter 5 counter
PPT
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
PPT
chapter 4
PPTX
Unit 2 - Single Purpose Processors
PDF
classification of counters and its types
PDF
J_002-CONTADORjdudududjduwisux6c7eES.pdf
PDF
a simple bcd counter project
PPT
counters and registers
PPT
counters_and_registers_5 lecture fifth.ppt
PPTX
Lecture-32-33.pptx
PPT
P1111214158
PPT
Logic Design - Chapter 8: counters
PDF
Ijecet 06 07_005
PDF
07 seq logicii-ix2
PPTX
Up counters,down and registers ppt.pptx
PDF
Assignment#6
Chapter 5 counter1
Unit-III.pptx
Chapter 5 counter
Dee2034 chapter 5 counter
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
chapter 4
Unit 2 - Single Purpose Processors
classification of counters and its types
J_002-CONTADORjdudududjduwisux6c7eES.pdf
a simple bcd counter project
counters and registers
counters_and_registers_5 lecture fifth.ppt
Lecture-32-33.pptx
P1111214158
Logic Design - Chapter 8: counters
Ijecet 06 07_005
07 seq logicii-ix2
Up counters,down and registers ppt.pptx
Assignment#6
Ad

More from RLJIT (9)

PDF
15CS32 ADE Module 4
PDF
15CS32 ADE Module 3
PDF
15CS32 Ade module 1
PDF
15CSL48 MP&MC manual
PDF
15CS44 MP & MC module 5
PDF
15CS44 MP & MC Module 4
PDF
15CS44 MP &MC Module 3
PDF
15CS44 MP & MC Module 2
PDF
15CS44 MP & MC Module 1
15CS32 ADE Module 4
15CS32 ADE Module 3
15CS32 Ade module 1
15CSL48 MP&MC manual
15CS44 MP & MC module 5
15CS44 MP & MC Module 4
15CS44 MP &MC Module 3
15CS44 MP & MC Module 2
15CS44 MP & MC Module 1

Recently uploaded (20)

PPTX
MAD Unit - 3 User Interface and Data Management (Diploma IT)
PPTX
Agentic Artificial Intelligence (Agentic AI).pptx
PPTX
Software Engineering and software moduleing
PPTX
Wireless sensor networks (WSN) SRM unit 2
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PDF
electrical machines course file-anna university
PPTX
Solar energy pdf of gitam songa hemant k
PPTX
Environmental studies, Moudle 3-Environmental Pollution.pptx
PDF
Unit1 - AIML Chapter 1 concept and ethics
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PDF
Project_Mgmt_Institute_-Marc Marc Marc .pdf
PPTX
CT Generations and Image Reconstruction methods
PDF
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
PDF
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
PPTX
Principal presentation for NAAC (1).pptx
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PPTX
mechattonicsand iotwith sensor and actuator
PPT
UNIT-I Machine Learning Essentials for 2nd years
MAD Unit - 3 User Interface and Data Management (Diploma IT)
Agentic Artificial Intelligence (Agentic AI).pptx
Software Engineering and software moduleing
Wireless sensor networks (WSN) SRM unit 2
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
electrical machines course file-anna university
Solar energy pdf of gitam songa hemant k
Environmental studies, Moudle 3-Environmental Pollution.pptx
Unit1 - AIML Chapter 1 concept and ethics
Management Information system : MIS-e-Business Systems.pptx
MLpara ingenieira CIVIL, meca Y AMBIENTAL
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
Project_Mgmt_Institute_-Marc Marc Marc .pdf
CT Generations and Image Reconstruction methods
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
Principal presentation for NAAC (1).pptx
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
mechattonicsand iotwith sensor and actuator
UNIT-I Machine Learning Essentials for 2nd years

15CS32 ADE Module 5

  • 1. ADE Module-5 Kishore Kumar R RLJIT Page 1 Module-5 Chapter 1: Counters 1.1 Decade Counter 1.2 Presettable Counter 1.3 Counter Design as Synthesis problem 1.4 A Digital Clock 1.5 Counter Design using HDL
  • 2. ADE Module-5 Kishore Kumar R RLJIT Page 2 Decade Counter or MOD-10 counter: A decade counter counts in a sequence of ten and returns back to 0 after the count of nine. Decade counter can be designed by using MOD-5 and MOD-2 counters. Designing Mod-5 Counter: State table C B A C+1 B+1 A+1 JC KC JB KB JA KB 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 × 0 × 0 × 1 × × 1 0 × 1 × × 0 × 1 0 × 1 × × 1 1 × × 1 0 ×
  • 3. ADE Module-5 Kishore Kumar R RLJIT Page 3 MOD-5 Counter Circuit: Decade Counter (MOD-10): MOD-10 counter can be designed by cascading MOD-5 counter and adding additional flip-flop as shown below
  • 4. ADE Module-5 Kishore Kumar R RLJIT Page 4 MOD-10 Counter circuit: Truth table: Timing Waveform: D C B A Count 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 2 3 4 8 9 10 11 12 Note: this MOD-10 counter has 10 different states, but count is not in straight sequence MOD-10 Counter: To get a count in straight sequence, Decade counter can be designed as shown below.
  • 5. ADE Module-5 Kishore Kumar R RLJIT Page 5 Circuit: Truth Table: Timing Waveforms: Note: This mod-10 counter has 10 different states, count is in straight sequence Presettable Counter: In Presettable counter, user can set initial state of the counter, after initial state, counter can be made to count either UP or Down. MOD-8 Presettable counter with initial state =101 (5): Figure below shows, MOD-8 counter, to set the initial state 101 (5), apply 101 to parallel inputs P2P1P0 =101, and apply parallel load =0, hence inversion of parallel load 1 will be applied to one of inputs of all NAND gates, at flip-flop inputs for NAND gate are 11 hence its output 0 is applied to PRESET of FF-A, hence output of a FF-A is 1, similarly at FF-B PRESET=1 and CLR=0, hence output of FF-B is 0, and at FF-C PRESET=0 and CLR=1, hence FF-C output is 1, now state of counter QCQBQA=101, after this state if Parallel Load is made 1, hence all
  • 6. ADE Module-5 Kishore Kumar R RLJIT Page 6 PRESET and RESET inputs are deactivated, since counter is designed as UP-counter, it increments the count by 1 on every negative clock cycle. Truth Table: PL P2 P1 P0 QC QB QA 0 1 1 1 1 1 1 1 1 0 1 × × × × × × × × × × × × × × × × × × × × × 1 0 1 1 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0
  • 7. ADE Module-5 Kishore Kumar R RLJIT Page 7 Counter Design as Synthesis Problem: Designing MOD-6 Counter: State table: JA =1 and KA=1
  • 8. ADE Module-5 Kishore Kumar R RLJIT Page 8 MOD-6 Circuit-Diagram: Problem: Design self-correcting MOD-6 counter in which all the unused states leads to state CBA=000 State Table: Cn Bn An Cn+1 Bn+1 An+1 JC KC JB KB JA KA 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 × 0 × 0 × 1 × × 0 × 1 × 1 × 1 0 × 1 × × 0 × 1 0 × 0 × × 1 × 1 1 × × 1 1 × × 1 1 × × 1 0 × × 1
  • 9. ADE Module-5 Kishore Kumar R RLJIT Page 9 Mod-6 self-correcting circuit: Problem: Design Self-correcting MOD-5 Synchronous Down counter using JK Flip-Flops, Assume 100 as next state for all unused states.
  • 10. ADE Module-5 Kishore Kumar R RLJIT Page 10
  • 11. ADE Module-5 Kishore Kumar R RLJIT Page 11 Problem: Design and explain working of Asynchronous decade counter with a suitable diagram. To design decade counter which has 10 states, four flip-flops are required, for Asynchronous UP-counter, output of flip-flop is connected to clock input of next flip-flop, to have 10 states (0-9), after the state 9(1001) counter should get reset, resetting of counter can be done using RESET inputs of all flip-flops, in decade counter, RESET input is activated using NAND gates when state 10 (QDQCQBQA = 1010) occurs.
  • 12. ADE Module-5 Kishore Kumar R RLJIT Page 12 Truth table: Timing waveform:
  • 13. ADE Module-5 Kishore Kumar R RLJIT Page 13
  • 14. ADE Module-5 Kishore Kumar R RLJIT Page 14 Define Counter. Design a synchronous counter for the Sequence 0412604 Using JK Flip-Flop. State table: C B A C+1 B+1 A+1 Jc Kc JB KB JA KA 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 1 X X 1 0 X 1 X X 1 0 X 0 X 1 X X 0 X 1 0 X 1 X X 1 0 X 0 X
  • 15. ADE Module-5 Kishore Kumar R RLJIT Page 15 Circuit: Problem: Design Modulo-4 irregular counter with following sequence using D-Flip-Flop Digital Clock: Counters can be used to construct an ordinary clock which displays hours, minutes and seconds, power supply to the counter is usually 60Hz 120V ac, when this signal frequency is divided by 60 we get a clock signal with one cycle per sec, if resulting waveform is divided by 60 again we get one clock cycle per minute, if this resulting waveform is divided by 60 again we get one cycle per hour,
  • 16. ADE Module-5 Kishore Kumar R RLJIT Page 16 Block diagram of digital clock: The first divide by 60 counter divides 60Hz power signal to 1Hz square waveform, the second divide by 60 counter changes state on every second, and has 60 discrete states, it can be used to display seconds and hence referred as seconds counter, Third divide by 60 counter changes state on every minute, and 60 discrete states, it can be used to display minutes, and referred as minutes counter. The last counter changes state on every 60 minutes(hour), if it is divided by 12 it will have 12 states, that can be decoded to provide signals to display correct hour, this is referred to as Hours counter. Counter Design Using HDL: Program: Write Verilog code for MOD-8 Up counter
  • 17. ADE Module-5 Kishore Kumar R RLJIT Page 17 Program: Write Verilog code for MOD-8 down counter module DC (CLK, PRESET, Q); input CLK,PRESET; output [2:0]Q; reg [2:0]Q; always @ (negedge clk or negedge PRESET) If (~PRESET) Q=3’b111; else Q=Q – 1; endmodule Important Questions 1. Define Counter. Design a synchronous counter for the sequence 0412604 using JK Flip-Flop JAN-17 (12 M) 2. Explain Digital clock with neat diagram JAN&JUL-17 (4 M) 3. Define Counter. Design a synchronous counter for the sequence 0412604 using SR Flip-Flop JUL-17 (12 M) 4. Design self-correcting MOD-6 Counter. 5. Explain Presettable MOD-8 counter 6. Design and explain working of Decade counter 7. Write Verilog code for MOD-8 Up counter 8. Design MOD-3 counter 9. Design Modulo-4 irregular counter with following sequence using D-Flip-Flop