Beruflich Dokumente
Kultur Dokumente
Introduction
Chap. 7의 내용
z How FFs and logic gates can be combined to produce different types of counters
and registers
Divided into 2 parts
z Part I : principles of counter operation, various counter circuit arrangement, and
representative IC counters
z Part II : counter application, types of IC register, and troubleshooting
Ripple Counter
z The FFs respond one after another in a kind of rippling effect
z The terms asynchronous counter and ripple counter interchangeably
Asynch
Synch
Exam. 7-1) Some time later the clock pulses are removed, and the counter FFs
read 0011. How many clock pulses have occurred?
z 3 + 16 = 19 + 16 = 35 + 16 = 51 …..
Frequency Division
z For any counter, the output from the last FF(MSB) divides the input clock
frequency by the MOD number of the counter
z MOD-16 Counter = Divide-by-16 Counter : division by 2 for each FF Fig. 7-2
Exam. 7-3) How many FFs are required for the MOD-60 counter? : Fig. 7-3
z There is no integer power of 2 that will equal 60 : 26 = 64
z In the section 7-4 we will see how to modify the basic counter so that any MOD
number can be obtained.
0 1 0 1 0
For proper counter operation
z Tclock ≥ N x tpd fmax = 1 /( N x tpd ) 0 0 1 1 0
» Exam) 74LS112, tpd = tPHL = 24 ns 01
0 0 0 0
4 FFs : fmax = 1 / 4 x 24 ns = 10.4 MHz
* FF 개수 증가
The total propagation delay
증가하고 fmax 감소
© Korea Univ. of Tech. & Edu.
Digital Systems Chap. 7 Counters and Registers Dept. of Info. & Comm.
7-5
Exam. 7-6) Determine the MOD number and the frequency at the D output of the
counter in Fig.7-8(a)
z D C B A = 1 1 1 0 = 14 일 때 NAND output = 0 (Clear Input) : MOD 14
z 30 kHz/14 = 2.14 kHz
Exam. 7-9) What problems might be caused if the Up/Down signal changes levels
on the NGT of the clock ?
z Possible Problems : Unpredictable results of FF
» the J and K inputs change at about the same time that a NGT occurs at their CLK input.
z Effects : Predictable results of FF (No problems)
» the effects of the change in the control signal must propagate through two gates before
reaching the J, K inputs (결국 다음 Clock에서 Up/Down 동작이 가능함)
A 0 1 0 1
B 0 0 1 1
C 0 0 0 0
D 0 0 0 0
some delay
4 5 4
1 0
1 1 1 1
1 0
0
1 1 1 1
1
PL
active low = 0
z Fig. 7-14
0 0 0 0 1 1 1 1 1 1 0
0 0 0 0 1 1 1 1 1 1 0
0 0 1 1 0 0 1 1 1 1 0
0 1 0 1 0 1 0 0 0 1 0
0 0 0 0 0 1 1 1
0 0 0 1 1 0 0 0
0 1 1 1 1 0 0 0
0 0 0 1 1 0 1 1
7 8 9 9
0 1 0 0 0 0 0 1 1 1 0
1 0 0 0 0 0 0 0 0 0 1
1 0 0 0 1 0 0 0 0 0 1
1 1 0 1 0 1 0 1 1 0 1
Exam. 7-13) Compare two counter 74ALS163 (Synch Load) and 74ALS191 (
Asynch Load) : Fig. 7-18
z 0001 : initial
z 1100 = C(12) : reload
z (a) mod number
»163 : mod-12 0001~ 1100
»191 : mod-11 0001 ~ 1011
1100 : temp. state
z (b) waveform
z (c) reason why
»163 : synch load
»191 : asynch load 0 1 1 0
0 0 1 0
Multistage Arrangement 0 1 0 0
1 1 0 1
z Fig. 7-19
1 10
0 10
1 00
1 01
Exam. 7-14) How many AND gates are required to decode all of the states of a
MOD-32 counter? What are the inputs to the gate that decodes for 21
z MOD-32 counter has 32 possible states : 32 개 AND gate 필요
z 1 0 1 0 1(21) : E, D, C, B, A
Active-LOW Decoding
z NAND gates are used in place of AND gates
Exam. 7-15) Generate a control waveform which could be used to control devices
such as a motor, solenoid valve, or heater.
z Control Signal Generation (On/Off control) : Fig. 7-21
z The X output is HIGH between the counts of 8 and 14 for each cycle of counter
Number 0
C B A=000
C B A=111
Number 7
C B A=111
C B A=000
Pres ent State Input Equ. Input Equ. Input Equ. Next State
C B A JC KC JB KB JA KA C B A
0 0 0 0 0 0 0 1 1 0 0 1
0 0 1 0 0 1 1 1 1 0 1 0
0 1 0 0 0 0 0 1 1 0 1 1
0 1 1 1 0 1 1 1 1 1 0 0
1 0 0 0 1 0 0 0 0 0 0 0
1 0 1 0 1 1 1 0 0 0 1 1
1 1 0 0 1 0 0 0 0 0 1 0
1 1 1 1 1 1 1 0 0 0 0 1
Design Procedure
z 1) Determine the desired number of bits(FFs) and the desired counting sequence
» FFs = 3 개, Desired Sequence = 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, ….
z 2) Draw the state transition diagram : Fig. 7-26
z 3) Tabulate present/next state table : Tab. 7-5
» Use the state transition diagram to setup a present/next state table
z 4) Tabulate circuit excitation table : Tab. 7-6
» Add a column to this table for each J and K input by using Tab. 7-3
JK F/F J K Q(t+1)
Q(t) Q(t+1) J K 0 0 Q(t) no change
Tab. 7-2 0 0 0 X 0 1 0 clear to 0
0 1 1 X 1 0 1 set to 1
1 0 X 1 1 1 Q(t)' Complement
1 1 X 0
z 5) Design logic circuits to generate the levels required at each J and K input
» FF A : Fig. 7-27 JA = C, KA =1
» FF B : Fig. 7-28(a) J B = A C , K B = A + C
» FF C : Fig. 7-28(b) J C = AB , K C = 1
z 6) Implement the final expressions : Fig. 7-29
Stepper Motor Control
z Step Motor Drive Circuit (with Direction Control) : Fig. 7-30(a)
z State Transition Diagram : Fig. 7-30(b)
z Circuit Excitation Table : Tab. 7-7
z K-map Simplification : Fig. 7-31
z Implementation : Fig. 7-32
Synchronous counter design with D FF : Mod-5 in Tab. 7-8
z Circuit Excitation Table : Tab. 7-8
z K-map Simplification : Fig. 7-33
z Implementation : Fig. 7-34
7-15 IC Registers
1) Parallel in/Parallel out : 74174
2) Serial in/Serial out : 74166
3) Parallel in/Serial out : 74165
4) Serial in/Parallel out : 74164
7-16 Parallel in/Parallel out : 74174
74ALS174( 6 bit register ) : Fig. 7-62
Exam. 7-16) How to connect 74ALS174 so that D5 → D4 → D3 → D2 → D1 → D0
( = data input at D5 and data output at Q0 ).
z serial shift register : Fig. 7-63
Exam. 7-17) How to connect two 74ALS174 to operate as a 12 bit shift register.
z connect the Q0 of the first IC to the D5 of the second IC.
Holding
Exam. 7-18) The input waveforms are applied to a 74HC166. Determine the
resultant output waveform : Fig. 7-65
z The first data input bit will finally show up at the output QH at t8
Exam. 7-19) Examine the 74HC165 and determine (a) the conditions
necessary to load the register with parallel data, (b) the conditions necessary
for the shifting operation : Fig. 7-66
z (a) SH/LD = 0 : only Q7 will be externally available
z (b) SH/LD = 1, CP INH = 0, and PGT Clock Pulse at CP
Exam. 7-20) Determine the output signal at Q7
z Fig. 7-67
Q0 Q7 Q0 Q7
0 1
1 0 0
0 1 0 0
1 0 1 0 1
0 1 0 1 0 1
0 0 1 0 1 0 0
1 0 0 1 0 1 0 1
1 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1
1000 0100
VCC
R 1 0 0 0
1 2 3 4
C 74LS14 74LS14
0→1
10
10
4
4
0
PRE
PRE
PRE
PRE
2 5 12 9 2 5 12 9
D Q D Q D Q D Q
3 6 11 8 3 6 11 8
CLK Q CLK Q CLK Q CLK Q
CLR
CLR
CLR
CLR
1
0 →1 0 →1 0 →1
13
13
V T+ =1.7V
0 1
Preset
Q0
000 100
IC Shift-Register Counters
z Ring/Johnson Counter는 너무 간단하게 구현 됨으로 전용 IC가 거의 없다
z CMOS Johnson-Counter : 74HC4017, 74HC4022
7-21 Troubleshooting
Exam. 7-22) Determine the cause of the incorrect circuit behavior in Fig. 7-74
z 이상 증상 : MOD-4 ( 0100 ), not MOD-12 ( 1100 )
z 이상 원인 :
» Open between the QD output and pin 2 on the NAND : QD High input = 1
p. 384, Fig. 7-16 » Detect state 0100 instead of 1100 : QD(1) and QC(1) = NAND output (0) = CLR
Exam. 7-23) The variable frequency divider operates “sometimes” : Intermittent fault
problem in Fig. 7-75
z The schematic for the circuit block : 8-bit down (DNUP=1) counter with parallel load
» The desired divide-by factor : initial value (parallel load) is applied to input f[7..0]
» NAND2 input (MXMN) : 0000 0000일 때 initial value is loaded
z 이상 증상 : 255, 100, 15 분주에서 문제 발생 Tab. 7-9
» A divide-by factor is 4 less than the value that was actually applied to the input.
z 이상 원인 :
» Every failure occurred when f2 = 1, that bit doesn’t seem to be getting in.
» The logic probe indicates the pin is LOW regardless of the value for f2 (short to GND).
© Korea Univ. of Tech. & Edu.
Digital Systems Chap. 7 Counters and Registers Dept. of Info. & Comm.
7-46
AHDL SISO shift register : Fig. 7-77 SISO register simulation : Fig. 7-78
VHDL SISO shift register : Fig. 7-79
AHDL PISO register : Fig. 7-80 PISO register simulation : Fig. 7-81
VHDL PISO register : Fig. 7-82
Exam. 7-24) Design of a universal 4 bit shift register. Requirements are:
z 4 synchronous modes of operation: hold, shift left, shift right, and parallel load
z 2 input bits (mode selection) select the operation to be performed
6 clock one-shot
trig_was ≠ trig
trig_was trig
one-shot