## Conversion of D flip-flop to SR and JK flip flop

In the last article, we have discussed “how to convert JK flip-flop into SR, D and T type of flip-flop”. Today we are going to learn about the conversion of D flip-flop. We can convert D flip-flop into SR and JK flip-flop by using the suitable combinational circuit. Combinational circuits for this purpose can be designed easily by using conversion tables and K-Maps. Let us see how to convert D flip-flop into different types of flip-flops.

### 1. Conversion of D flip-flop into SR flip-flop:

For converting D flip-flop to SR flip-flop, we use S and R as external inputs and D is the actual input to the flip-flop. S, R, and Qn makes eight possible combinations, but S=R=1 is an invalid combination. So, the corresponding entries for Qn+1 and D are don’t cares. Then we have to express D in terms of S, R, and Qn for the design of required flip-flop.

The conversion table, K-Maps and logic diagram for the conversion of D flip-flop into SR flip-flop is shown below:   ### 2. Conversion of D flip-flop into JK flip-flop:

In case of conversion of D flip-flop to JK flip-flop, we have to use J and K as the external inputs and D as the input of the actual flip-flop. J, K, and Qn make eight possible combinations. Express D in terms of J, K, and Qn.

The conversion table, K-Maps and logic diagram for the conversion of D flip-flop into JK flip-flop is shown below:   You may also like:

## Conversion of JK flip flop to SR flip flop, T and D flip flop

Hello friends, in this article, we will learn Conversion of JK flip flop to SR, T, and D flip flop. We will cover, introduction, Conversion tables, Logic diagrams, and K-maps for the same.

## Conversion of JK flip flop

### Introduction:

We have discussed “how to convert SR flip flop into JK and D type of flip flop” in the last article. Now we are going to convert JK flip flop into different types of flip-flops.

As explained in the last article, if we want to convert one type of flip flop into another type of flip flop, first we have to design a combinational circuit and after that connect it to the inputs of the actual flip flop. So that the outputs of the combinational circuit will be the inputs of the actual flip flop and then it will produce the same output as that of the required flip flop.

We can convert JK flip flop into SR, T, and D type of flip-flops.

### 1)      Conversion of JK flip flop to SR flip flop:

In case of converting JK flip flop into SR flip flop, external inputs (inputs of a combinational circuit) are S and R, while J and K are the inputs of the actual flip flop.

So we have to get values of J and K in terms of S, R, and Qn. Thus we prepare a conversion table S, R, Qn, Qn+1, J and K.

The external inputs S and R and the output Qn can make 8 combinations. For each combination find the corresponding Qn+1.

In the SR flip flop, the combination S=1 and R=1 is not permitted. So, the corresponding output is invalid and, therefore the corresponding J and K are don’t cares.

Complete the table by writing the values of J and K required getting each Qn+1 from the corresponding Qn.

The conversion table, K-maps and Logic diagram for the conversion of JK flip flop to SR flip flop is shown below:

##  K-Maps

### 2)      Conversion of JK flip flop to T flip flop:

For the conversion of JK flip flop to T type of flip flop, T will be the external input (input of combinational circuit) and the output of this combinational circuit is connected to the inputs of actual flip flop (J and K).

Then we prepare a conversion table and using this table express J and K in terms of T and Qn.

The conversion table, K-Maps and logic diagram for the conversion of JK flip flop to T type of flip flop is shown below:

### 3)      Conversion of JK flip flop to D flip flop:

In case of converting JK flip flop into D flip flop, D is the external input of the combinational circuit, whereas J and K are the inputs of the actual flip flop.

D and Qn make four combinations. So, prepare a conversion table and using this table express J and K in terms of D and Qn.

The conversion table, K-map and logic diagram for the conversion of JK flip flop to D flip flop is shown below:

## Conversion of SR Flip Flop to JK and D Flip Flop

Hello friends, in this article, we will learn Conversion of SR flip flop to JK and D flip flop. We will cover, introduction, Conversion tables, Logic diagrams, and K-maps for the same.

## Conversion of SR Flip Flop

### Introduction:

For the conversion of one type of flip flop into another type of flip flop, we are required to design a combinational circuit. The inputs of the required flip flop are given to this combinational circuit. The output of combinational circuit is nothing but the input of the actual flip flop which we are going to convert into another type. Then the output of the actual flip is the output of required flip flop.

### Conversion of SR flip flop:

We can convert SR flip flop into JK and T type of flip flop.

### 1)      SR flip flop to JK flip flop:

The following figure shows the conversion table, K-maps, and Logic diagram for the conversion of SR flip flop to JK flip flop.

K-Map

In this case we are required to convert SR flip flop into JK flip flop. Therefore we have to first design and connect the combinational circuit to the input of SR flip flop so that it will produce same outputs as that of JK flip flop. Here the external inputs are J and K. S and R will be the outputs of designed combinational circuit which are inputs of actual flip flop. We write a truth table with J, K, Qn, Qn+1, S and R. where Qn is the present state of the flip flop and Qn+1 will be the next state obtained when the particular J and K inputs are applied.

J, K and Qn can have eight combinations. For each combination of J, K and Qn find the corresponding Qn+1, i.e. determine to which next state the JK flip flop will go from the present state Qn if the present inputs J and K are applied. Now complete the table by writing the values of S and R required to get each Qn+1 from the corresponding Qn. i.e. write what values of S and R are required to change the state of the flip flop from Qn to Qn+1.

### 2)      SR flip flop to D flip flop:

Similarly, for the conversion of SR flip flop into the D flip flop, we have connected the combinational circuit to the inputs of the SR flip flop. In this case D the external input of the circuit. The output of the combinational circuit is connected to the inputs of the actual flip flop i.e. SR flip flop. Then the output of this flip flop will be the same as D flip flop.

The conversion table, K-maps, and Logic diagram for the conversion of SR flip flop to D flip flop. Logic Diagram

## Quine-Mcclusky method for minimization of logic function:

Question: minimize the following logic function using Quine Mcclusky method: Y(A,B,C,D) =? m(0,1,3,7,8,9,11,15)

### Table 1:

Make a table of four columns. In the first column, we have to write a group i.e. the number of ‘1’s present in given minterms. For example first group having zero times ‘1’s i.e. there is no ‘1’ in that row (see column of variables), whereas in the second group that is group having one time ‘1’, there are two possible cases first is 1=0001 and second is 8=1000 in both cases ‘1’ is present only one time. Just follow it for all the given minterms. We will discuss the remark column in the second table.

Table 2:

Now here is the second table. In the second table, we have to do the same thing only the difference is that, we have to refer to the first table. For the first group i.e. group ‘0’ (0,1) and (0,8) have only one digit different (see the third column of table1). So put ‘-’ in that place. (keep in mind that group ‘0’ means there should not any ‘1’ in that row). Similarly, for group ‘1’ there should present ‘1’ only ones. Now check the remark column of the first table. When we take (0,1) for the first group, we have to fill remark column.

Table 3:

The same procedure is repeated here in the third table. In this table, there will be two ‘-’s. Fill the remark column of the second table when you select minterms for next table.

Table of prime implicants (PI):

Finally, the following table is of prime implicants. If you observe last table (table 3) carefully, the minterms for each group are same only the position is different, for example for first group ‘0’ there are 0,1,8,9 which is nothing but 0,8,1,9. So we have to fill prime implicants with corresponding variables of the third table. There is (-00-) it means B’C’ since A and D are absent. Similarly (-0-1) means B’D and so on. Now in the final step, we have to round those minterms which has single ‘X’ in its column. And here is our final answer i.e. corresponding PI terms which are (B’C’+CD).

## L293D DC Motor Driver IC : ### Purpose:

that have power supply Voltage and Current rates higher than MCU
(microcontroller) can provide. It will also cover controlling rotation speed using PWM signal generated by microcontroller. For better understanding basic electricity knowledge needed (such as what is capacitor and DC voltage polarity). At the end of this tutorial reader should be able to use L293D motor driver in his project for controlling at least 2 DC motors. For what motor driver is needed?
Usually microcontrollers are power supplied by low voltage power supply and in the meantime it’s required to controll DC motors at the higher Power consumption rate than controller can provide, so not to burn out you microcontroller you will need an intermediate device to convert voltage levels and steer high current.

DC Motors – polarity/direction and PWM/speed
As we already know DC motors rotation direction depends on the polarity of its power supply(ex. +/- forward , -/+ backward). So if we can control polarity of power supplied applied to motor we’ll be able to control rotation direction.
Simple way to make it is to use switchers like in the picture bellow.

### DESCRIPTION

L293D from Texas Instruments is designed to provide bidirectional current up to 600mA at voltages from 4,5V to 36V. It has two independent channels (it means can control 2 DC motors) that are designed to work in positive-supply
applications
The Device is a monolithic integrated high voltage, high current four channel driver designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoids, DC and stepping motors) and switching power transistors. To simplify use as two bridges each pair of channels
is equipped with an enable input. A separate supply input is provided for the logic, allowing operation at a lower voltage and internal clamp diodes
are included. This device is suitable for use in switching applications
at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic
package which has 4 center pins connected together and used for heatsinking
The L293DD is assembled in a 20 lead surface mount which has 8 center pins connected together and used for heatsinking.

Every data that you will ever need you will find in its datasheet. I will present you only summary data that is needed for a simply current flow direction control. L293D allows control of any load with currents not bigger than 600mA; this current can rise up to 1A in case of using heat-sink.
Channel 1
PIN 1 – enables channel 1 for steering first load (in our case 12V dc motor)
PIN 2, 7 – logical level input (can be from MCU any I/O port pin)
PIN 3, 6 – Power output 1 (here we are connecting 12V DC motor)
Channel 2
PIN 9 – enables channel 2 for steering first load (in our case 12V dc motor)
PIN 10, 15 – logical level input (can be from MCU any I/O port pin)
PIN 11, 14 – Power output 2 (here we are connecting 12V DC motor)

Power supply
PIN 8 – Power supply for logic part of our bridge. From 4,5V to 7V.
PIN 16 – Power supply for controlled load. From 4,5 to 36V and up to 600mA
PIN 4, 5, 12, 13 – Ground(-) and heat sink connection. l293d Motor driver ic

## Registers:

We know that a Flip-Flop can store a 1 bit of digital information (1 or 0) .It is also referred as 1-bit register. Registers find application in a verity of information in digital systems including microprocessor. For example Intel’s 8085 microprocessor contains seven 8-bit registers and five 1-bit registers.

The data can be entered in serial (1-bit at a time) or in parallel form (all the bits simultaneously) and can be retrieved in serial or parallel form. Data in serial form is called temporal code where as data in parallel form is called special code. A 4-bit data 1010 is shown in fig a) and in parallel form in fig b).

Registers are classified depending upon the way in which the data are entered and retrieved. There are four possible modes of operations:

1. Serial-in ,serial-out (SISO)
2. Serial-in, parallel-out (SIPO)
3. Parallel-in, series-out (PISO)
4. Parallel-in, parallel-out (PIPO)

Registers can be designed using various Flip-Flops (S-R or J-K as D-type) and are also available as MSI devices.

Registers in which data are entered or/and taken out in serial form are referred as shift registers, since bits are shifted in the Flip-Flops with the occurrence of clock pulses either in the right direction or in the left direction or in both the directions (Bi-directional). IC74295A is a bi-directional shift register.

A register is referred as universal register if it be operated in all the four possible modes and also as bi-directional registers. For example 74194 is a universal register.

## Universal Shift Register:

A universal shift register is a bidirectional register, whose input can either in serial form or in parallel form and whose output can also be either in serial form or in parallel form.

Following figure shows the logic diagram of the 74194 4-bit universal shift register. Note that the output of each flip flop is routed through AOI logic to the stage on its right and to the stage on its left. The mode control inputs S0, and S1, are used to enable the left to, right connections when it is desired to shift-right, and the right-to-left connections when it is desired to shift-left.

The truth table shows that no shifting occurs when S0 and S1 are either LOW or both HIGH. When So = S1=0, there is no change in the contents of the register, and when So = S1 = 1, the parallel input data A, B, C and D are loaded into the register on the rising edge of the clock pulse. The combination S0 = S1= 0, is said to inhibit the loading of serial or parallel data, since the register contents cannot change under that condition. The register has an asynchronous active-Low clear input, which can be used to reset all the flip flops irrespective of the clock and any serial or parallel inputs.

## Applications of Flip-Flops:

Some of the common uses of the Flip-Flops are as follows:

• 1)   Bounce elimination switch
• 2)   Latch
• 3)   Registers
• 4)   Counters
• 5)   Memory, etc.

Some examples of uses of Flip-Flops are given below:

### A)  Bounce elimination switch :

Mechanical switches are employed in digital system as a input devices by witch digital information (0 and 1) is entered into the system. There is a very serious problem associated with these switches which is switch bouncing (chattering).

If we entered input as ‘1’ in a sequential circuit the output is ‘1’ but it oscillates between ‘1’and ‘0’ before come to rest i.e. 1. This changes the output of the sequential circuit and creates difficulties. This problem is eliminated by the use of Bounce elimination switches.

### B)  Registers :

A register is composed of a group of flip-flops to store a group of bits (word). For storing N bit of words we require N number of flip-flops (one flip of for each bit).

A flip flop can store only one bit of data, a 0 or a 1; it is referred to as a single bit register. When more bits of data are to be stored, a number of flip flops are used. A register is a set of flip flops used to store a binary data. The storage capacity of a register is a number of bits of digital data that it can retain. Loading a register means setting or resetting the individual flip flops, i.e. inputting data into the register so that their states correspond to the bits of data to be stored. Loading may be serial or parallel in serial loading, data is transferred into the register in serial form, i.e. one bit at a time, whereas in parallel loading, the data is transferred into the register in parallel form meaning that all the flip flops are triggered into their new states at the same time. Parallel input requires that the SET and/or RESET controls of every flip flop be accessible.

### C)  Counters :

Digital counters are used for count the events. Electrical pulses corresponding to the event are produced using transducers & these pulses counted using a counter.

A digital counter is a set of flip-flops whose stated change in response to pulses applied at the input to the counter. The flip flops are interconnected such that their combined state at any time is the binary equivalent of the total number of pulses that have occurred up to that point. Thus, as its name implies, a counter is used to count the pulses. A counter can also be used as a frequency divider to obtain waveforms with frequencies that are specific fractions of the clock frequency. They are also used to perform the timing function as in digital watches, to create time delays, to crate non-sequential binary counts, to generate pulse trains, and to act as frequency counters, etc.

### D)  Random access memory:

In computers, digital control systems, information processing systems it is necessary to store digital data and retrieve the data as desired.

Flip-Flops can be used for making memories in which data can be stored for any desired length of time and then readout whenever required.

The data stored in RWMs (Read Write memories) constructed from semiconductor devices will be lost if power is removed. Such memory is said to be volatile. But ROM is non-volatile. Random access memory (RAM) is the memory whose memory locations can be accessed directly and immediately. By contrast, to access a memory location on a magnetic tape, it is necessary to wind or unwind the tape and go through a series of addresses before reaching the address desired. Therefore, the tape is called the sequential access memory.

## Classification of memory

This section provides a classification of memories. There are two main types of memories i.e. RAM and ROM. Following tree diagram shows the classification of Memory:

The first classification of memory is ROM. The data in this memory can only be read, no writing is allowed. It is used to store permanent programs. It is a nonvolatile type of memory. The classification of ROM memory is as follows:

a) Masked ROM: the program or data are permanently installed at the time of manufacturing as per requirement. The data can not be altered. The process of permanent recording is expensive but economic for large quantities.

b) PROM (Programmable Read Only Memory): The basic function is same as that of masked ROM. but in PROM, we have fuse links. Depending upon the bit pattern, the fuse can be burnt or kept intact. This job is performed by PROM programmer.

To do this, it uses high current pulse between two lines. Because of high current, the fuse will get burnt; effectively making two lines open. Once a PROM is programmed we cannot change connections, only a facility provided over masked ROM is, the user can load his program in it. The disadvantage is a chance of regrowing of the fuse and changes the programmed data because of aging.

c) EPROM (Erasable Programmable Read Only Memory): the EPROM is programmable by the user. It uses MOS circuitry to store data. They store 1’s and 0’s in form of charge. The information stored can be erased by exposing the memory to ultraviolet light which erases the data stored in all memory locations. For ultraviolet light, a quartz window is provided which is covered during normal operation. Upon erasing it can be reprogrammed by using EPROM programmer. This type of memory is used in a project developed and for experiment use. The advantage is it can be programmed erased and reprogrammed. The disadvantage is all the data get erased even if you want to change single data bit.

d) EEPROM: EEPROM stands for Electrically erasable programmable read only memory. This is similar to EPROM except that the erasing is done by electrical signals instead of ultraviolet light. The main advantage is the memory location can be selectively erased and reprogrammed. But the manufacturing process is complex and expensive so do not commonly used.

### RAM (Random Access Memory):

The second classification of memory is RAM. The RAM is also called as read/write memory. The RAM is a volatile type of memory. It allows the programmer to read or write data. If the user wants to check the execution of any program, user feeds the program in RAM memory and executes it. The result of execution is then checked by either reading memory location contents or by register contents.

Following is the classification of RAM memory. It is available in two types:

a) SRAM (Static RAM): SRAM consists of the flip-flop; using either transistor or MOS. for each bit we require one flip-flop. Bit status will remain as it is; unless and until you perform next write operation or power supply is switched off.

• Fast memory (less access time)
• Refreshing circuit is not required.

• Low package density
• Costly

b) DRAM (Dynamic RAM): In this type of memory a data is stored in form of charge in capacitors. When data is 1, the capacitor will be charged and if data is 0, the capacitor will not be charged. Because of capacitor leakage currents, the data will not be held by these cells. So the DRAMs require refreshing of memory cells. It is a process in which same data is read and written after a fixed interval.