Académique Documents
Professionnel Documents
Culture Documents
A Design Example
switch
after
inversion
Mechanical switch
Not an instant, once-only make-or-break
Spring loaded contacts literally bounce
20ns
Single-output switch
Since all you see is bouncing value
timing-based solution can be employed
5ms
5ms 5ms
noisy
debounced
time
noisy debounced
Finite Timer
State clrTimer
timerDone (5ms)
Machine
clrTimer
S0
noisytimerDone noisy
noisy
noisy
clrTimer
S0
noisytimerDone noisy
noisy
noisy
clrTimer
S0
noisytimerDone noisy
noisy
noisy
noisytimerDone
noisytimerDone
debounced
noisytimerDone S1
As mentioned, Mealy
noisy/clrTimer machines often require
fewer states
ECE 238L Debounce 2006
Page 19
Reduce FSM to Logic
NS = CSnoisytimerDone + CSnoisy + CSnoisytimerDone
S0 = CS S1 = CS noisy = N timerDone = T
NT
CS 00 01 11 10
0 1
1 1 1 1
NS = noisytimerDone + CStimerDone
debounced = CS
debounced = CS
noisy
timerDone D Q debounced == CS
CS clrTimer
noisy
noisy debounced
Finite Timer
State clrTimer
timerDone (5ms)
Machine
noisytimerDone
noisytimerDone
18
18
+1 0 18 18 18-input
timerDone
18 D Q AND
0 1
clrTimer clk
18
18
+1 18 18 18-input
timerDone
18 D Q AND
clrTimer
clk
d17-d0
000000000000000001 output
A
Cin
A
Called a half-adder
Cin
Will add 2 bits together
and generate sum and carry.
ECE 238L Debounce 2006
Page 32
Building the +1 Circuit - Version #2
S2 S1 S0
A2 A1 A0