![Page 1: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/1.jpg)
Chapter4: Counter and
DAC & ADC Part-I
Asst.Prof.Dr.Supakit Nootyaskool
![Page 2: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/2.jpg)
Objective
• Recognize type of flipflops and realize difference between rising edge/falling edge trigger.
• Clarify mechanism inside a counter circuit and express technique of counting up/down.
• Explain and illustrate concept of convert analog signal to digital signal.
![Page 3: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/3.jpg)
Topic
• Combinational logic vs Sequential logic circuit• Rising/Falling edge trigger• JK-flipflop• D-flipflop• T-flipflop• Frequency division circuit• First-in first-out circuit• Counter circuit• Analog signal to Digital signal concept
![Page 4: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/4.jpg)
World of digital logic circuit
Combinational logic circuit
Sequential logic circuit
![Page 5: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/5.jpg)
Key characteristics
Combinational logic circuit
Sequential logic circuit
• Memoryless• Output instant in time• No clock signal
• Memory• Output depends on
previous states• Related clock signal
![Page 6: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/6.jpg)
Rising/Falling edge trigger
![Page 7: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/7.jpg)
Flip-flop symbols in rising/falling edge trigger
Some textbook for rising/falling edge trigger called positive/negative edge trigger
![Page 8: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/8.jpg)
Circuit detects positive edge trigger
![Page 9: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/9.jpg)
Activity 4.1 Delay time measurement in the positive-edge trigger circuit
![Page 10: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/10.jpg)
Set-Reset Flip-flop (SR-flipflop)
SR flipflop is two types by the structure of logic gate.
NOR gate SR-flipflop NAND gate SR-flipflop
![Page 11: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/11.jpg)
Set-Reset Flip-flop (SR-flipflop)
Truth table
NOR gate SR-flipflop
S R Q
0 0 No change
0 1 1 = Set
1 0 0 = Reset
1 1 Restrict Combination
![Page 12: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/12.jpg)
Example application uses SR-flipflop
• Debounced switch
![Page 13: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/13.jpg)
JK Flip-flop
• Invented by Jack Kilby• The JK flip-flop modified from SR flip-flop by
adding a clock input to prevent the invalid output condition that occurs when both S and R are equal to logic “1”.
![Page 14: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/14.jpg)
![Page 15: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/15.jpg)
Clk J K Q Description
No clock ? ? ? No change
0 0 ? No change
0 1 ?->0 Reset
1 0 ?->1 Set
1 1 0->11->0
Toggle
JK Flip-flop Truth table
![Page 16: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/16.jpg)
JK flip-flop in timing states
![Page 17: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/17.jpg)
Application used JK flip-flop
![Page 18: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/18.jpg)
Making D flip-flop from JK
Clk J K Q Description
No clock ? ? ? No change
0 1 ?->0 Store “0”
1 0 ?->0 Store “1”
D
Q
Q
![Page 19: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/19.jpg)
T Flip-flop from D and JK
Clk (T) Q Description
No clock ? No change
?->0 Store “0”
D
Q
Q
T
J
K Q
Q
T
![Page 20: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/20.jpg)
4-bit Latch circuit
![Page 21: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/21.jpg)
Frequency division circuit
![Page 22: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/22.jpg)
4-bit First-in First-out (FIFO)
![Page 23: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/23.jpg)
Counter circuit
• The digital circuit has divided type of counter circuit by focusing at a characteristic of input clock to the gate in the circuit.
Asynchronous circuit
Synchronous circuit
![Page 24: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/24.jpg)
Asynchronous counter
clock
q0
q0
q1
q2
q3
0 1 2 3 4 5 6 7 8
![Page 25: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/25.jpg)
![Page 26: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/26.jpg)
2-bit Asynchronous count up/down circuit
![Page 27: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/27.jpg)
Delay-time problem in asynchronous counter circuit
![Page 28: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/28.jpg)
Asynchronous counter issue
![Page 29: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/29.jpg)
Asynchronous vs Synchronous counter
J
Q
Q
K
J
Q
Q
K
“1” “1”
q0 q1
J
Q
Q
K
J
Q
Q
K
“1”
q0 q1
• Clock or control signal getting from previous states
• Easy design the counter circuit.
• Not suitable for a critical time system.
• A clock signal controls all states
• Complexity for design counter circuit.
• Proper for the critical time system
![Page 30: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/30.jpg)
Example 3-bit synchronous counter-up
![Page 31: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/31.jpg)
Analog signal vs Digital signal
![Page 32: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/32.jpg)
Analog signal vs Digital signal
Analog signals are continuous-time signals changing the wave from continuously.
![Page 33: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/33.jpg)
Analog signal vs Digital signalDigital signals are discrete-time signals limited by number of bits and the sampling rate.
![Page 34: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/34.jpg)
Signal Property
![Page 35: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/35.jpg)
Which one is the low frequency?
![Page 36: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/36.jpg)
Which one is the low frequency?
Suppose: 1 block = 1msA wave form = 5.5 = 5.5ms
Freq = 1/Time= 1/5.5x10E-3= 181.8Hz
![Page 37: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/37.jpg)
Activity 4.2 Frequency calculation
Suppose: 1 block = 1msA wave form = 5.5 = 5.5ms
Freq = 1/Time= 1/5.5x10E-3= 181.8Hz
![Page 38: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/38.jpg)
Amplitude, Voltage, Level
Suppose: 1 block = 1.5voltThe wave has 4 blocks
Volt = 1.5x4= 6volt
![Page 39: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/39.jpg)
Modulation
A+B=C
![Page 40: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/40.jpg)
Activity 4.3 AM Simulation with Excel
![Page 41: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/41.jpg)
Convert Analog Signal to Digital Signal
• Step1: Analog signal
![Page 42: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/42.jpg)
Convert Analog Signal to Digital Signal
• Step2: Define the number of levels (bits)
Suppose: 4 levels
![Page 43: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/43.jpg)
Convert Analog Signal to Digital Signal
• Step3: Define the number of sampling
Suppose: 5 samples / 1 cycle
![Page 44: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/44.jpg)
Convert Analog Signal to Digital Signal
• Step4: Map the level and sampling to the signal
Suppose: 5 samples / 1 cycle
![Page 45: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/45.jpg)
Convert Analog Signal to Digital Signal
• Step5: Reading digital signal
Sequence: 1011010010
00
01
10
11
![Page 46: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/46.jpg)
Activity 4.4 Drawing 8 levels and 10 sampling
![Page 47: Chapter4: Counter and DAC & ADC Part-I161.246.38.75/download/ics/slide04.pdfJK Flip-flop • Invented by Jack Kilby • The JK flip-flop modified from SR flip-flop by adding a clock](https://reader033.vdocument.in/reader033/viewer/2022060817/609680fa57619504a534f08a/html5/thumbnails/47.jpg)
Reference
• https://www.quora.com/What-is-an-application-of-an-RS-flip-flop
• https://electronics.stackexchange.com/questions/jk-flip-flop-toggle