asynchronous counter

39
Asynchronous Counter Nugroho Adi P, S.Si, M.Sc [email protected], [email protected] htt p://aravir-rose.blogspot.com

Upload: aravir-rose

Post on 26-Jun-2015

410 views

Category:

Education


2 download

DESCRIPTION

Create Counter using JK bistables (flip-flop)

TRANSCRIPT

Page 1: Asynchronous Counter

Asynchronous Counter

Nugroho Adi P, S.Si, M.Sc [email protected], [email protected] http://aravir-rose.blogspot.com

Page 2: Asynchronous Counter

Counter

Menghitung pulsa

Page 3: Asynchronous Counter

Pulsa

Transmisi radio

Sistem komputer

Jumlah koin yang masuk mesin game

Page 4: Asynchronous Counter

Build Counter

JK bistable

D-type bistable

IC (beli jadi)

Page 5: Asynchronous Counter

Build Counter?

Tahu masalah yang akan ditemukan

Sesuai dengan keperluan (we may not be standart)

It’s fun

Page 6: Asynchronous Counter

Buy Counter?

Cheaper, easier, quicker to build

Consume less total power

Take up less space

Page 7: Asynchronous Counter

How it works?

JK Bistable

J=1, K=1

Page 8: Asynchronous Counter

How it works?

Page 9: Asynchronous Counter

How it works?

menghitung dari nol ke satu

atau

menghitung dari satu ke nol

Page 10: Asynchronous Counter

modulo

jumlah yang bisa dihitung

JK bistable memiliki modulo 2

modulo-2 counter

mod-2 counter

Page 11: Asynchronous Counter

mod-4 counter

Page 12: Asynchronous 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

Page 13: Asynchronous Counter

mod-4 counter

00, 01, 10, 11, 00 ,01, …

Page 14: Asynchronous Counter

mod-4 counter

Page 15: Asynchronous Counter

mod-8 counter

Page 16: Asynchronous Counter

mod-8 counter

Page 17: Asynchronous Counter

semua menghitung dari nol

Q digunakan untuk output dan

untuk clock bistable berikutnya

NOT Q?

Page 18: Asynchronous Counter
Page 19: Asynchronous Counter
Page 20: Asynchronous Counter
Page 21: Asynchronous Counter
Page 22: Asynchronous Counter
Page 23: Asynchronous Counter
Page 24: Asynchronous Counter

Trailing Edge

Page 25: Asynchronous Counter

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.

Page 26: Asynchronous Counter

The Golden Rule

if (Q=(clk AND output) OR (Q’=(clk AND output))

then {UP} else {DOWN}

Page 27: Asynchronous Counter

Leading Edge Counter

Page 28: Asynchronous Counter

Leading Edge Counter

Page 29: Asynchronous 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.

Page 30: Asynchronous Counter

“Count up to anything”

Page 31: Asynchronous Counter

Three Bistables

0,1,2,3,4,5,6,7

0,1,2,3,4,5,0,1?

Page 32: Asynchronous Counter

Three Bistables

Gunakan CLR

beri sinyal 0 ke CLR

saat output bernilai 6 ganti dengan 0

Page 33: Asynchronous Counter

Output 6

Q0=0, Q1=1, Q2=1

saat ini terjadi maka reset semua flip-flopJK

Page 34: Asynchronous Counter

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

Page 35: Asynchronous Counter
Page 36: Asynchronous Counter
Page 37: Asynchronous Counter

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

Page 38: Asynchronous Counter
Page 39: Asynchronous Counter

Selesai

“Dan dia hidup bahagia selama-lamanya”