• No results found

ASYNCHRONOUS COUNTERS

N/A
N/A
Protected

Academic year: 2021

Share "ASYNCHRONOUS COUNTERS"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

ASYNCHRONOUS COUNTERS

1. Introduction

Counters are sequential logic circuits that counts the pulses applied at their clock input. They usually have 4 bits, delivering at the outputs the corresponding binary code of the number of pulses occurred at the input.

The counters can be classified according to: - the counting mode:

- up counters – count up from 0 to the maximum value - down counters – count down from the maximum value to 0

- up/down counters – count up or down under the control of an up or down selection input (reversible).

- the working mode:

- asynchronous (ripple) counters - the cells are pipelined and they switch successively

- synchronous counters – the cells switch simultaneously on the same clock.

The basic cell of a counter is the T flip flop. It divides the clock frequency by 2 (when T=logic 1). Connecting n cells, a n bit counter is

obtained (2n maximum capacity). Such counter is in fact a sequential logic

circuit with 2n states. Its output code can be binary (binary counter), BCD

(BCD counter), Gray (Gray counter), exponential (exponential counter).

2. Asynchronous binary counter

Such a counter has the output of a cell as clock for the next cell Qk =

1  k

CK . In the following figure it represented a 4 bit counter architecture.

CKin Q0 Q1 Q2 Q3 1 1 1 1 J K CK R Q Q FF2 J K CK R Q Q FF3 J K CK R Q Q FF1 J K CK R Q Q FF0

(2)

every falling edge on the output Q0. The third flip flop (FF2) has as clock the

output of FF1. It switches on every falling edge on the output Q1. The fourth

flip flop (FF3) has as clock the output of FF2. It switches on every falling

edge on the output Q2. The number of pulses applied at the input can be

deduced from the binary code at the outputs:

NiQ323 Q222 Q1 21 Q02 0

The asynchronous counter can be used in applications where pulses are counted (instruments for measurements). Another application of counters is related to frequency division. Analyzing the waveforms above, the signal on

the output Q0 has the frequency half besides the clock, Q1 is a quarter

besides the clock, Q2 is one eighth besides the clock and Q3 is one sixteenth

besides the clock. Thus we can say the counters are frequency dividers. The dividing ratios are the powers of 2 (2, 4, 8, 16, etc). If other ratios than 2n are needed, the counter must count up to the division ratio and then it must be reset. This is achieved with a feedback that detects the final state and reset the counter. Considering the division ratio K, it is transformed in binary k3k2k1k0. The outputs Qi that correspond to the index i for which ki=1

will be connected through a NAND gate at the Reset input (active on logic 0). After a delay necessary to the signal propagation through circuits, the counter will be initialized (all outputs in logic 0), and the cycle will start again. CKin Q0 Q1 Q2 Q3 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 10 1011 11 1100 12 1101 13 1110 14 1111 15 0000 0

(3)

3. Down counter

The down counter counts from the maximum value down to zero. If the

output Qi is connected to the clock input of the next cell, a down

asynchronous counter is obtained. The codes at its outputs will follow in the reverse order (from 15 to 0).

4. Reversible asynchronous counter

Analyzing the two counters above, we notice that using a circuit that

switches the outputs Qi or Qi at a cell’s clock input, we can change the

counting sense. We can use a multiplexer with 2 inputs connected like in the figure below. The address input of all the multiplexers are connected

together at the input “Sense”. If the input Sens=0  A=0  Y=I0

CKin Q0 Q1 Q2 Q3 VCC J K CK R Q Q FF2 J K CK R Q Q FF3 J K CK R Q Q FF1 J K CK R Q Q FF0 Reset VCC VC C VCC 0000 0 CKin Q0 Q1 Q2 Q3 1111 15 1110 14 1101 13 1100 12 1011 11 1010 10 1001 9 1000 8 0111 7 0110 6 0101 5 0100 4 0011 3 0010 2 0001 1 0000 0 Q0 Q1 Q2 Q3

(4)

1 

i

i Q

CK  the counter counts up. If the input Sens=1  A=1  Y=I1

CKiQi1  the counter counts down.

3. Lab work

(5)

LAB SHEET

1. Input the asynchronous up counter in MaxPlus II and simulate the circuit (16 states, a state is 2 grid periods). Draw the waveforms on the grid below. Measure the delay times (they are different on each output) and write the logic state on the waveforms. Compare the results with the truth table.

Ck Q0 Q1 Q2 Q3

2. Input the inverters between the counting cells and simulate the circuit as a new project (16 states, a state is 2 grid periods). Draw the waveforms on the grid below. What kind of counter is this?

Ck Q0 Q1 Q2 Q3

3. Input in MaxPlus II the reversible counter and simulate it. Draw the waveforms on the grid below (32 states, a state is 2 grid periods). Write the delay times and the logic states on the waveforms.

Ck Sens Q0

References

Related documents

Jamur ini banyak dijumpai hampir pada semua jenis tanah dan merupakan salah satu jenis jamur yang dapat dimanfaatkan sebagai agens hayati pengendalian patogen tanah

Gas Service Provider (GSP) : Supplier of natural gas to core or noncore customers including, but not limited to Energy Service Provider (ESP or Aggregator), Contracted Marketer,

There shall be no liability for the loss due to fortuitous event in one of the following case.. When the parties stipulated that there shall be liability even in case of loss due

One problem associated with PCR of diploid genomic DNA is the preferential amplification of heterozygous alleles. This manifests as allele imbalance in downstream NGS

Appendix: Draft Presidential Statement on Rwanda, Proposed by the Czech Delegation to the UNSC on 28 April 1994. The Security Council is absolutely appalled and horrified

The Catalog of Federal Domestic Assistance (CFDA) Program is a database maintained by the General Services Administration that classifies all federal programs that provide funding

For example, while emphasis- area faculty reported that they were addressing theory, research and academic writing, students reported that they had received this instruction

The City of Erlanger’s Advanced Life Support (ALS) System is designed to provide supplemental advanced medical care to assist the Emergency Medical Services of the cities