10 counter and decoder 2.ppt

30
Counters Pendahuluan

Upload: rofik-besuki

Post on 21-Dec-2015

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10 Counter and Decoder 2.ppt

CountersPendahuluan

Page 2: 10 Counter and Decoder 2.ppt

Frequency DivisionA frequency divider can be

constructed from J-K flip-flops by taking the output of one cell to the clock input of the next.

The J and K inputs of each flip-flop are set to 1 to produce a toggle at each cycle of the clock input.

For each two toggles of the first cell, a toggle is produced in the second cell, so its output is at half the frequency of the first.

The output of the fourth cell is 1/16 the clock frequency. The same device is useful as a binary counter.

Page 3: 10 Counter and Decoder 2.ppt

Binary Counting A binary counter can be

constructed from J-K flip-flops by taking the output of one cell to the clock input of the next.

The J and K inputs of each flip-flop are set to 1 to produce a toggle at each cycle of the clock input.

For each two toggles of the first cell, a toggle is produced in the second cell, and so on down to the fourth cell.

This produces a binary number equal to the number of cycles of the input clock signal. This device is sometimes called a "ripple through" counter.

The same device is useful as a frequency divider.

Page 4: 10 Counter and Decoder 2.ppt

Counters

Binary count sequence Asynchronous counters Synchronous counters Aplikasi

Page 5: 10 Counter and Decoder 2.ppt

Binary count sequence

home

Page 6: 10 Counter and Decoder 2.ppt

Asynchronous counters

Page 7: 10 Counter and Decoder 2.ppt

Asynchronous counters

Page 8: 10 Counter and Decoder 2.ppt

Asynchronous counters

Page 9: 10 Counter and Decoder 2.ppt

Synchronous counters

Page 10: 10 Counter and Decoder 2.ppt

Synchronous counters

Page 11: 10 Counter and Decoder 2.ppt

Synchronous counters

Page 12: 10 Counter and Decoder 2.ppt

Synchronous counters

Page 13: 10 Counter and Decoder 2.ppt

Synchronous counters

home

Page 14: 10 Counter and Decoder 2.ppt

Example

Page 15: 10 Counter and Decoder 2.ppt

Example

home

Page 16: 10 Counter and Decoder 2.ppt

BCD or Decade Counter

A BCD counter or decade counter can be constructed from a staight binary counter by terminating the "ripple-through" counting when the count reaches decimal 9 (binary 1001).

Since the next toggle would set the two most significant bits, a NAND gate tied from those two outputs to the asynchronous clear line will start the count over after 9.

Page 17: 10 Counter and Decoder 2.ppt

Counter and DecoderThe 14-pin 7490 counter chip and the 16-pin decoder chip are often used together to drive 7-segment displays.

Page 18: 10 Counter and Decoder 2.ppt

Frequency Counter

A frequency counter can be made from a binary counter and a decoder/display unit.

In the schematic below an AND gate is used as an input device. The unknown frequency is applied to one input of the AND and sample pulses of precise time interval are applied to the other.

When the sample pulse is high, the input signal is transferred to the counter.

The number of counts divided by the sample time interval gives the frequency.

Page 19: 10 Counter and Decoder 2.ppt

Frequency Counter In the design shown,

there is another practical element: after the count is done, there must be time to view the result on the display, so a third input to the AND gate is taken from a J-K flip-flop.

The input reaches the counter only when both the sample pulse and the J-K flip-flop are high (counts are collected on alternate sample pulses).

This provides an interval when the frequency is displayed. On each positive-going edge of the J-K, a one-shot multivibrator is triggered to send a pulse for resetting the counter.

Page 20: 10 Counter and Decoder 2.ppt

Shift Register

Binary data can be shifted from one flip-flop to the next on each clock pulse.

The shift from left to right here is the kind of data transfer that occurs in a serial transfer.

Page 21: 10 Counter and Decoder 2.ppt

Data Handling Systems

Both data about the physical world and control signals sent to interact with the physical world are typically "analog" or continuously varying quantities.

In order to use the power of digital electronics, one must convert from analog to digital form on the experimental measurement end and convert from digital to analog form on the control or output end of a laboratory system.

Page 22: 10 Counter and Decoder 2.ppt

Analog-to-Digital Conversion

This is a sample of the large number of analog-to-digital conversion methods.

The basic principle of operation is to use the comparator principle to determine whether or not to turn on a particular bit of the binary number output.

It is typical for an ADC to use a digital-to-analog converter (DAC) to determine one of the inputs to the comparator.

Digital Ramp ADC Successive Approximation ADC Flash ADC

Page 23: 10 Counter and Decoder 2.ppt

Digital Ramp ADC

The output of the DAC is applied to the other terminal of the comparator. Since the output of the DAC is increasing with the counter, it will trigger

the comparator at some point when its voltage exceeds the analog input. The transition of the comparator stops the binary counter, which at that

point holds the digital value corresponding to the analog voltage.

Conversion from analog to digital form inherently involves comparator action where the value of the analog voltage at some point in time is compared with some standard.

A common way to do that is to apply the analog voltage to one terminal of a comparator and trigger a binary counter which drives a DAC.

Page 24: 10 Counter and Decoder 2.ppt

Successive Approximation ADC

The successive approximation ADC is much faster than the digital ramp ADC because it uses digital logic to converge on the value closest to the input voltage.

A comparator and a DAC are used in the process.

Illustration of 4-bit SAC with 1 volt step size (after Tocci, Digital Systems).

Page 25: 10 Counter and Decoder 2.ppt

Flash ADC

llustrated is a 3-bit flash ADC with resolution 1 volt (after Tocci).

The resistor net and comparators provide an input to the combinational logic circuit, so the conversion time is just the propagation delay through the network - it is not limited by the clock rate or some convergence sequence.

It is the fastest type of ADC available, but requires a comparator for each value of output (63 for 6-bit, 255 for 8-bit, etc.)

Such ADCs are available in IC form up to 8-bit and 10-bit flash ADCs (1023 comparators) are planned.

The encoder logic executes a truth table to convert the ladder of inputs to the binary number output.

Page 26: 10 Counter and Decoder 2.ppt

Digital-to-Analog Conversion

When data is in binary form, the 0's and 1's may be of several forms such as the TTL form where the logic zero may be a value up to 0.8 volts and the 1 may be a voltage from 2 to 5 volts.

The data can be converted to clean digital form using gates which are designed to be on or off depending on the value of the incoming signal. Data in clean binary digital form can be converted to an analog form by using a summing amplifier.

For example, a simple 4-bit D/A converter can be made with a four-input summing amplifier.

More practical is the R-2R Network DAC.

Page 27: 10 Counter and Decoder 2.ppt

Four-Bit D/A Converter

This approach is not satisfactory for a large number of bits because it requires too much precision in the summing resistors. This problem is overcome in the R-2R network DAC.

One way to achieve D/A conversion is to use a summing amplifier.

Page 28: 10 Counter and Decoder 2.ppt

R-2R Ladder DAC

The summing amplifier with the R-2R ladder of resistances shown produces the output

where the D's take the value 0 or 1. The digital inputs could be TTL voltages which close the switches on a logical 1 and leave it grounded for a logical 0. This is illustrated for 4 bits, but can be extended to any number with just the resistance values R and 2R.

Page 29: 10 Counter and Decoder 2.ppt

R-2R Ladder DAC Details

Page 30: 10 Counter and Decoder 2.ppt

Thevenin Example: R-2R Ladder