• Tidak ada hasil yang ditemukan

COUNTERS AND COUNTERS AND REGISTERS

N/A
N/A
Protected

Academic year: 2023

Membagikan "COUNTERS AND COUNTERS AND REGISTERS"

Copied!
24
0
0

Teks penuh

(1)

Chapter 7

COUNTERS AND COUNTERS AND

REGISTERS REGISTERS

Instructor: Afroza Sultana

(2)

Asynchronous (ripple) Counters

Each FF output drives the clock input of the next FF This

Each FF output drives the clock input of the next FF. This type of counter is called Asynchronous counter.

The FFs do not change states in exact synchronism with the applied clock signal.

There is a delay between the response of successive FFs.

(3)

Frequency Division

f f/2 f/4 f/8 f/16

In any counter, the signal at the output of the last FF(i.e., the MSB) will have a frequency equal to the input clock frequency divided by the MOD number of the counter.

(4)

Asynchronous Down Counter

Counting Sequence

C B A 1 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0

(5)

MOD Counters

MOD Number: The MOD no is equal to the no of states that the counter goes through in each states that the counter goes through in each complete cycle before it recycles back to its starting state.

The MOD no can be increased simply by adding more FFs. That is

MOD no = 2N MOD no = 2N

where N is the number of FFs.

Counters can be designed having MOD no <2N.

(6)

Counters with MOD Numbers < 2

N

Th b i h t i li it d t MOD 2N

The basic asynchronous counter is limited to MOD no = 2N.

The Basic counter can be modified to produce counter with MOD no < 2N by allowing the counter to skip some states.

MOD-6 counter produced by clearing a MOD-8 counter when a count of six occurs.

(7)

Counters with MOD Numbers < 2

N

A NAND gate is connected to the asynchronous clear inputs of each FF so that counter immediately goes to inputs of each FF so that counter immediately goes to the 000 state.

The counting sequence is , thereforeg q , C BA

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1

1 1 0 (temporary state)

(8)

Changing the MOD number

MOD-10 (decade) ripple counter

MOD-14 ripple counter

(9)

Propagation delay in ripple counters

(10)

Problems in using Ripple Counter

For proper counter operation, we need clock time Tclock ≥ N X tpd

where N= no of FF

d th l k f

and the max clock frequency

fmax = 1 / (N × tpd )

Asynchronous counters are not useful at very high frequencies, especially for large number of bits.

(11)

Synchronous (Parallel) Counters

ƒ All FFs are triggered simultaneously by the clock input pulses

ƒ All FFs are triggered simultaneously by the clock input pulses.

ƒ Overcome the problem caused by FF propagation delay.

ƒ Only the LSB ff has its J and K inputs permanently HIGH.

ƒ Requires more circuitry than does the asynchronous counter.

(12)

Circuit operation

Only those FFs that are supposed t t l th t NGT h ld h

to toggle on that NGT should have J=K=1 when that NGT occurs.

Each FF should have its J and K

i t t d th t th

inputs connected so that they are HIGH only when the outputs of all

l d FF i th HIGH t t

lower-order FFs are in the HIGH state

(13)

Counters with MOD Numbers < 2

N

(14)

Advantage of Synchronous counters h

over Asynchronous

States are changed simultaneously.

The propagation delays of the FFs do not add together to produce the overall delay.

Total delay = FF tpd + AND gate tpd

The total delay does not depend on the no of FFs.

(15)

Synchronous Down and UP/Down Counters

(16)

Presettable Counters

(17)

Presettable Counters

When the counter can be preset to any desired starting count either asynchronously or asynchronously.

The asynchronous PRESET and CLEAR inputs are used to perform asynchronous presetting.

Apply desired count to the data inputs PApply desired count to the data inputs P22, P, P11 and Pand P00.

Apply a LOW pulse to the input PL.

This procedure will perform an asynchronous transfer of P2, P1 and P0 levels into FFs Q2, Q1 and Q0.

This jam transfer occurs independently of the J, K, and CLK inputs.

The effect of the CLK input will be disabled as long as PL is in its

The effect of the CLK input will be disabled as long as PL is in its active-LOW state because each FF will have one of its

asynchronous inputs activated while PL=0.

Once PL returns HIGH the FFs can respond to their CLK inputs and

Once PL returns HIGH, the FFs can respond to their CLK inputs and can resume the counting up operation starting from the count

that was loaded into the counter.

(18)

IC Registers IC Registers

Registers can be classified by the way data is entered for storage, and by the way data is ouputted from the register

ouputted from the register.

Parallel In / Parallel OutParallel In / Parallel Out (PIPO)(PIPO)Serial In / Serial Out (SISO)Parallel In / Serial Out (PISO)Serial In / Parallel Out (SIPO)

(19)

Parallel In / Parallel Out

PIPO (74ALS174)

(20)

Serial In / Serial Out

A serial in/serial out shift register will have data loaded into it one bit at a time.

The data will move one bit at a time with each clock pulse through the set of flip-flops toward the other end

f th i t of the register.

With continued clocking, the data will then exit the register one bit at a time in the same order as it was register one bit at a time in the same order as it was originally loaded.

(21)

Serial In / Serial Out

(22)

Th 74HC166 ( d l th 74ALS166) b d

Serial In / Serial Out

The 74HC166 (and also the 74ALS166) can be used as a serial in/serial out register.

It is an eight-bit shift register of which only FF QIt is an eight bit shift register of which only FF QHH isis accessible.

The serial data is input on SER and will be stored in FF Q

QA.

The serial output is obtained at the other end of the shift register on QH.

register on QH.

Parallel data can also be synchronously loaded into it.

If SH/LD= 1, the register function will be serial shifting, while a LOW will parallel load data via the A through H inputs.

The synchronous serial shifting and parallel loading

The synchronous serial shifting and parallel loading functions can be inhibited (disabled) by applying a HIGH to the CLK INH control input.

(23)

Parallel In / Serial Out

PISO (74HC165) PISO (74HC165)

(24)

Serial In / Parallel Out

SIPO (74ALS164)

Referensi

Dokumen terkait

elements in the remaining n-s positions are larger than or n-s positions are larger than or equal to the pivot (see next slide for an algorithm). equal to the pivot (see next