DLD Lab#14

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

TITLE:

Implementation and Designing of Registers and


Counters.

DLD LAB: #14

DEPT: CS-03

DATE OF EXPERIMENT: 24/5/23

GROUP MEMBERS
NAME:
RIJA MOBIN IFRAH JANNAT EMAN SHAHID

REG NO:
37 40 44
OBJECTIVES:
• TO INTERPERT DATESHEETS of counter ICs and registers.
• To design and implementation of shift registers using ICs.
• To design and implementation of counter using ICs.

EQUIPMENTS:
• Logic gates (IC 74195, 7476, 4027).
• Connecting wires
• LEDs
• Logic probes/states

INTRODUCTION:
COUNTERS:
Counters are electronic devices used to count numbers of events or occurrences of the
particular signals over time. A binary counter is made of flip flops which are memory
elements that can store a binary value of (0 or 1). Each flip flop represents a bit in the
counter. E.g 4-bit counter has four flip flops labeled as Q3,Q2,Q1 and Q0 represents a most
significant bit(MSB) at least significant bit(LSB). Initially we set outputs of flip flops at 0 and
when the pulse arrives, the first flip flop (LSB) toggles it output from 0 to 1. There are two
types of counters includes:
1. Synchronous
2. Asynchronous

ASYNCHRONOUS:
Asynchronous counter is also known as ripple, it consist of series of flip flops connected in
cascading manner and it drivens by the pulse through an external clock. The output of each
flip flops serves as the clock input for the next flip flop in the sequence. Due to propagation
delay inherents in electronic circuits, the updated of the first flip flop takes some time to
propagate through the circuit and reach the subsequent flip flops. This delay gives rise to
the term “ripple counter”. Here we mention the counter and pulses of 2-bit asynchronous
binary counter.

2-bit asynchronous binary counter:


SYNCHRONOUS:
Synchronous counters are a type of digital circuit used to count events. Unlike
asynchronous counters, synchronous counters use synchronized clock signals for all flip-
flops in the counter, ensuring accurate and synchronous counting. It has an internal clock
so the flip flops driven by a single common pulse. When the clock signal transitions from
low to high (rising edge), all flip-flops in the counter simultaneously sample their inputs and
update their outputs based on the current state. This simultaneous update ensures
synchronous counting.
2-bit synchronous binary counter:
ASYNCHRONOUS DECADE COUNTERS
(RIPPLE):
An asynchronous decade counter, also known as an asynchronous ripple counter, is a
specific type of asynchronous counter that counts in a decimal (base-10) sequence. It is
composed of a series of flip-flops connected in a cascading manner. where each flip-flop
represents a specific digit in the decimal count. Each flip-flop within the counter counts from
0 to 9 before resetting to 0. When a flip-flop reaches its maximum count value (9), it
generates a carry signal or an overflow signal. This carry signal becomes the clock input for
the next higher-order flip-flop, causing it to increment its count. This creates the ripple
effect, where each flip-flop generates a carry to the next flip-flop, resulting in the decimal
counting sequence. The way that asynchronous decade counter counts the number of states
in their sequences is similar to truncated sequences. Truncating the count of an
asynchronous decade counter by limiting the number of flip-flops or digits used in the
counter. For example, using fewer flip-flops in the counter will result in a truncated count
sequence that covers a smaller range, such as counting from 0 to 7 instead of 0 to 9.
SYNCHRONOUS DECADE COUNTERS:
A synchronous decade counter is a type of digital circuit used to count in a decimal (base-
10) sequence with synchronous operation. It uses synchronized clock signals for all flip-
flops, ensuring accurate and simultaneous counting. As the clock signal transitions, the
updated outputs from the flip-flops cause the counter to progress through the counting
sequence. Each flip-flop in the counter represents a specific digit of the decimal count, from
the least significant digit to the most significant digit. The count sequence follows a binary
pattern, where each flip-flop counts from 0 to 9 before resetting to 0. Synchronous decade
counters ensure that all flip-flops within the counter change their states at the same time,
eliminating timing issues and glitches.
REGISTERS:
A register consists of multiple flip-flops connected in a specific configuration to store and
manipulate binary data. Registers in flip-flop-based circuits operate synchronously. The
storage and transfer of data are synchronized with the clock signal. The input data is
sampled and stored during a specific clock phase, often referred to as the clock edge. The
stored data is then propagated to the output during another clock phase, ensuring
coordinated and reliable data handling. Shift registers are a type of sequential circuit that
consists of a series of flip-flops connected together to form a shift register chain. They are
widely used in digital systems for shifting data in a serial manner. The key characteristic of
shift registers is their ability to move data through the register, shifting it one bit at a time.
Left Shift Register: In a left shift register, the data is shifted towards the left side. This means
that each bit in the register moves one position to the left on each clock cycle.
Right Shift Register: In a right shift register, the data is shifted towards the right side.
This means that each bit in the register moves one position to the right on each clock cycle.
There are several types of shift registers.
• Serial-In, Serial-Out (SISO) Shift Register
• Serial-In, Parallel-Out (SIPO) Shift Register
• Parallel-In, Serial-Out (PISO) Shift Register
• Parallel-In, Parallel-Out (PIPO) Shift Register

SERIAL INPUT SERIAL OUTPUT (SISO):


Serial Input Serial Output (SISO) shift registers are sequential circuits that take in data
serially at the input and shift it out serially at the output. When the clock signal transitions,
the data present at the input of the first flip-flop is transferred to the input of the next flip-
flop in the register. The data continues to shift through the register bit by bit on each clock
cycle. The last bit in the register eventually reaches the output. SISO shift registers have a
single serial output line where the shifted data is outputted one bit at a time. The output bit
corresponds to the last flip-flop in the shift register chain. The number of clocks required in
a Serial Input Serial Output (SISO) shift register depends on the number of bits in the
register and the desired operation.
SERIAL INPUT PARALLEL OUTPUT (SIPO):
Serial Input Parallel Output (SIPO) shift registers are sequential circuits that receive data
serially at the input and output it in parallel at the output. SIPO shift registers have a single
serial data input line where data is inputted one bit at a time. SIPO shift registers have
multiple parallel output lines where the shifted data is outputted in parallel. Each output
line corresponds to a flip-flop in the shift register chain. After the required number of clock
cycles, all the bits will be available in parallel at the output. for an n-bit SIPO shift register, n
clock cycles are needed to shift all the bits through the register and output them in parallel.
Each clock cycle causes the data to shift by one position within the register.

PARALLEL INPUT SERIAL OUTPUT (PISO):


The Parallel Input Serial Output (PISO) shift register is a sequential circuit that receives data
in parallel at its input and outputs it serially. Prior to shifting the data, the parallel data
needs to be loaded into the flip-flops of the shift register. This is done by activating a
parallel load signal, which enables the transfer of data from the parallel inputs to the flip-
flops. Once the parallel data is loaded into the flip-flops, the clock signal causes the data to
shift through the register, one bit at a time. On each clock cycle, the data in each flip-flop is
transferred to the next flip-flop in the chain. The PISO shift register has a single serial
output line where the shifted data is outputted one bit at a time.
LOAD MODE:
The Load mode refers to a specific operating mode or functionality of a sequential circuit,
often found in registers or shift registers. In this mode, the circuit allows the parallel loading
of data into its storage elements, such as flip-flops or latches. In the Load mode, a control
signal (commonly referred to as the Load is activated to enable the loading of data into the
storage elements. This signal triggers the circuit to capture and store the applied data. When
the Load signal is active, the data present on the input lines is transferred to the storage
elements. The circuit latches or loads the input data into its storage elements in parallel.

SHIFT MODE:
The Shift mode refers to a specific operating mode or functionality of a sequential circuit,
typically found in shift registers. In the Shift mode, the circuit performs the shifting of data
within its storage elements, typically flip-flops or latches, to create a serial data flow. The Shift
mode can have two directions: left shift or right shift. In a left shift, the data moves from
higher-order positions to lower-order positions within the register. In a right shift, the data
moves from lower-order positions to higher-order positions. The shift operation is controlled
by the clock signal. The clock signal determines the timing at which the shifting occurs. In some
shift registers, such as Serial In Serial Out (SISO) or Serial In Parallel Out (SIPO) registers, the
shift operation involves serial input or output.

PARALLEL INPUT PARALLEL OUTPUT (PIPO):


The Parallel Input Parallel Output (PIPO) shift register is a sequential circuit that receives
data in parallel at its input and outputs it in parallel.
Prior to shifting the data, the parallel data needs to be loaded into the flip-flops of the shift
register. This is done by activating a parallel load signal, which enables the transfer of data
from the parallel inputs to the flip-flops. Once the parallel data is loaded into the flip-flops,
the clock signal causes the data to remain stored in the flip-flops. The data does not shift
through the register like in other types of shift registers. Each flip-flop maintains its state
and retains the corresponding input data bit. The PIPO shift register has multiple parallel
output lines where the stored data is outputted in parallel.

TASK RESULT
Task1(Asynchronous) Procedure:
1.Take 2 4027 flipflop ICs.
2.Give inputs of J and K of both flipflops as 1.
3.Give a DC clock at CLK of first IC.
4.Take NOT of output Q of first flipflop and give it as an input to CLK of second IC.
5.Now, attach a 100ohm resistance to output(Q) of first IC and connect it to an Led.
It gives LSB.
6.Connect an LED to output Q of second IC that gives MSB.
7.We can confirm its output using its diagram below.
Task2(Synchronous)
Procedure:
1.Take 2 4027 flipflop ICs and give input 1 to J and K of first flipflop.
2.Give DC clock at CLK of first flipflop IC and same to CLK of second IC.
3.Now, give output Q of first flipflop as an input to J and K of second flipflop.
4.Connect Output Q of first flipflop to an Led that gives LSB.
5.Attach an LED to output Q of second IC that gives MSB.
6.We can observe its output using its diagram of outputs given below.

Task3(Asynchronous Decade Counter) Procedure:


1.Take four 7476 ICs and give input 1 to their J and Ks.
2.Give an input of DC clock at CLK of first IC and attach outputs of each IC as an input
at CLK of other ICs.
3.Attach output Q of second and forth flipflops to a NAND gate and give its output
to R of all 4 ICs.
4.Now, attach all 4 outputs Q of each IC to an LED, connect each LED to 100ohm
resistance and then ground it.
5.Output of first IC gives LSB and last gives MSB.
6.We can verify its outputs by following:

CONCLUSION:
Synchronous counters have numerous applications in real-world scenarios, such as their
utilization in controlling moving machines, multiplexing circuits, and alarm clocks. A
prominent and essential example Of a synchronous counter in everyday life is the digital clock.
On the other hand, asynchronous counters find their use in frequency dividers, ring and
counters, and various other contexts. An elevator floor indicator serves as a practical
illustration of an asynchronous counter in action. In multi-story buildings equipped with
elevators, these indicators display the current floor number. Hence, both synchronous and
asynchronous counters play vital roles in performing diverse tasks within our reality.

You might also like