asynchronous counter
DESCRIPTION
Create Counter using JK bistables (flip-flop)TRANSCRIPT
Asynchronous Counter
Nugroho Adi P, S.Si, M.Sc [email protected], [email protected] http://aravir-rose.blogspot.com
Counter
Menghitung pulsa
Pulsa
Transmisi radio
Sistem komputer
Jumlah koin yang masuk mesin game
Build Counter
JK bistable
D-type bistable
IC (beli jadi)
Build Counter?
Tahu masalah yang akan ditemukan
Sesuai dengan keperluan (we may not be standart)
It’s fun
Buy Counter?
Cheaper, easier, quicker to build
Consume less total power
Take up less space
How it works?
JK Bistable
J=1, K=1
How it works?
How it works?
menghitung dari nol ke satu
atau
menghitung dari satu ke nol
modulo
jumlah yang bisa dihitung
JK bistable memiliki modulo 2
modulo-2 counter
mod-2 counter
mod-4 counter
mod-4 counter
Q0=0, Q1=0, count=00
Clock, Q0=1, Q1=0, count=01
Clock, Q0=0, Q1=1, count=10
Clock, Q0=1, Q1=1, count=11
mod-4 counter
00, 01, 10, 11, 00 ,01, …
mod-4 counter
mod-8 counter
mod-8 counter
semua menghitung dari nol
Q digunakan untuk output dan
untuk clock bistable berikutnya
NOT Q?
Trailing Edge
The Golden RuleIn trailing edge bistables,
whenever the same pin supplies the next clock and the count output,
the result is an UP COUNTER.
In all other cases it's a down counter.
The Golden Rule
if (Q=(clk AND output) OR (Q’=(clk AND output))
then {UP} else {DOWN}
Leading Edge Counter
Leading Edge Counter
The Golden RuleIn leading edge bistables,
whenever the same pin supplies the next clock and the count output,
the result is an DOWN COUNTER.
In all other cases it's a up counter.
“Count up to anything”
Three Bistables
0,1,2,3,4,5,6,7
0,1,2,3,4,5,0,1?
Three Bistables
Gunakan CLR
beri sinyal 0 ke CLR
saat output bernilai 6 ganti dengan 0
Output 6
Q0=0, Q1=1, Q2=1
saat ini terjadi maka reset semua flip-flopJK
Q2 Q1 Q0
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0 ganti dengan nol
Q2 Q1 Q0
0 0 0
0 0 1
0 1 0
0 1 1 ganti dengan nol
0,1,2,0,1,2,0
Selesai
“Dan dia hidup bahagia selama-lamanya”