You are on page 1of 10

CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY

(AUTONOMOUS)
Gandipet, Hyderabad – 500 075

MINI PROJECT ON
DATA TRANSMISSION WITH
PRIORITY BASED ON DUAL
PRIORITY LOGIC USING
LABVIEW
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

SUBMITTED BY:
K.VEDA VYAS (160116735178)
CH.AVINASH TEJA (160116735327)
B.KIRAN KUMAR(160116735331)

UNDER THE GUIDANCE OF


Sri G.MALLIKHARUUNA RAO
ASSISTANT PROFESSOR, ECE Dept
1
CONTENTS

1. Introduction 3

2. Aim 3

3. Objective 3

4. Methodology 3

5. Simulation Results 9

6. Conclusion 10

7. References 10

2
1. INTRODUCTION
Data output selection from multiple inputs to the single output is required in many real
time situations like in Data Acquisition Systems. To implement this technique the priority
encoding circuit with slight extra logic connections can be implemented.
A priority encoder is a circuit or algorithm that compresses multiple binary inputs into
a smaller number of outputs. The output of a priority encoder is the binary representation
of the original number starting from zero of the most significant input bits. They are often
used to control interrupt requests by acting on the highest priority interrupt input.
If two or more inputs are given at the same time, the input having the highest priority
will take precedence.
In addition to single priority dual priority logic can be implemented such that the two
highest prioritized users can transfer data at same time to different outputs based on
their priority level selected.
In case of dual-priority encoder, the circuit identifies both the highest-priority and the
second highest-priority asserted signal among a set of input signals.

2. AIM
To design a prioritized Data transmission model based on Dual-priority Encoder in lab view.

3. OBJECTIVE

Designing a data transmission model and to get the high priority data outputs for
given inputs.

4. METHODOLOGY:

Step 1. Open LabView and press Ctrl+N followed by Ctrl+T keys to open the tiling Front
Panel and Block Diagram.

Step 2. Go to Front Panel and from the menu bar select View->Controls ->Modern->Push
Button (this is where we give input), drag and drop it on to Front Panel and label it as input
I0. Similarly, select seven such inputs and label them as I1, I2, I3, I4, I5, I6 and I7. Arrange
them in sequential order as shown in Fig. 1. Here, input I7 has the highest priority.

3
Step 3. Select View->Controls-> Modern->Boolean-> Vertical Toggle switch and label it as
En’, place it above the inputs. This is an active low enable input.

Step 4. Select Modern-> Decorations-> Flat Frame and adjust its size such that all the inputs
are positioned on its left side for neat appearance. Double left click on the Front Panel and
type ‘dual priority encoder’ and drag it inside the frame.

Step 5. Select Modern-> Boolean-> Round LED (this is where we see the output) and drop it
on to Front Panel and label it as output A2. Similarly, select other three such outputs and
label them as A1, A0 and AVALID. These will be used for the first-highest-priority encoder
output. Following the same steps as above, label them as B2, B1, B0 and BVALID for the
second-highest-priority encoder output. Arrange them in sequential order as shown in Fig.
1.

Step 6. Select Modern -> Decorations -> Recessed Frame and adjust its size such that the
outputs (A2, A1, A0 and AVALID) are positioned inside the frame for neat appearance.
Similarly, arrange the remaining outputs (B2, B1, B0 and BVALID) in another recessed frame.

Step 7. Use A[2:0] and AVALID to identify the highest-priority request, where AVALID is
asserted only if at least one request input is asserted. Use B[2:0] and BVALID to identify the
second-highest-priority request, where BVALID is asserted only if at least two request inputs
are asserted.

Right click on the Front Panel, select Modern->Decoration->Thin Line with Arrow option and
drag and drop on the Front Panel and place the arrow to each input line as shown in Fig. 1.

Step 8. Go to Block Diagram workspace (refer Fig. 2) and select View-> Functions ->
Programming-> Structures-> Case Structure and drop it on to Block Diagram. (Note. Three
Case Structures are used in this project; this will be considered as main Case Structure.) The
labels in the menu at the top of the Case Structure will appear as True and False. First
consider the True condition.

4
Step 9. Select Programming-> Boolean-> NOT gate and drop it on to Block Diagram. Place
the cursor at output of vertical toggle switch (En’). You will see a hot spot. From there pull a
wire and give it as input to NOT gate. The output of NOT gate is connected to the selector
terminal ‘?’ of the Case Structure.

Step 10. Again, select Programming-> Boolean-> Bool to (0, 1) function and drop it on to
Block Diagram. Connect the output of I7 to input of Bool to (0, 1) function.

Fig1 : Block diagram connection for enable ON condition

Fig 2: Block diagram connection for enable OFF condition

5
Step 11. Select Programming-> Comparison-> Equal ? function and drop it on to Block
Diagram. Give the output of ‘Bool to (0, 1)’ to one of the inputs of ‘Equal ?’. Place cursor on
the second input of ‘Equal ?’ and right click on it. Select Create->Constant and put value 1.

Step 12. Select Programming-> Comparison-> Select function and drop it on to Block
Diagram. It has three input lines, namely, true (t), select (s) and false (f). Connect the output
of ‘Equal ?’ to ‘s’ input of Select function.

Step 13. Repeat steps 10, 11 and 12 for remaining inputs (I6, I5…I1), except for I0.

Step 14. Place cursor on the true (t) input of Select function, right click on it and create a
constant of value 7 for input I7. Similarly, do it for all inputs with constant value decreased
by 1 for each input of Select function, which are arranged in descending order as shown in
Fig. 2.

Step 15. Connect the output of Select function corresponding to I1 to false (f) input of Select
function corresponding to I2. Similarly, connect the remaining outputs of Select function to
false (f) input of the Select function, except for I7. Create a constant 0 for the false (f) input
of Select function of input I1.

Step 16. Add two Case Structures as explained below. Select Programming-> Structures->
Case Structure, drag and drop it on to Block Diagram inside the main Case Structure. If
labels in the menu appear as True and False, modify them to 0 and 1, respectively. Right
click on case selector or menu, select ‘Add Case After’ option and label it as 2. Similarly, do
the same for the other five cases and label them as 3, 4, 5, 6 and 7.

Step 17. Connect the output of the Select function of I7 to selector terminal ‘?’ of the inner
upper Case Structure.

Step 18. Select case 0 and then select Programming->Boolean-> False Constant and connect
the output of False Constant (labeled as F) to the Round LED A2, which is placed outside the

6
Case Structures. An open box called Tunnel will be created on both main and upper Case
Structure boundaries.

Step 19. Place the curser on the output wire of F. You will find a hot spot. Click on it and
draw two more wires to connect to A1 and A0, respectively. Thus we have connected F to
A2, A1 and A0 to represent the binary number for the case 0. That is, the binary number for
decimal number zero for [A2 A1 A0] is [0 0 0]. Now, if case 1 is selected, the binary
representation of outputs A2 A1 A0 will be 0 0 1. Here, F should be connected to A2 and A1
for the 0s. For 1 we will consider the True (T) Constant by selecting Programming->Boolean-
> True Constant option. That is, connect T to A0. For case 2, the binary output of [A2 A1 A0]
is [0 1 0] and for case 3 the output is [0 1 1], and so on.

Step 20. Similarly, connect False (F) and True (T) constants to outputs (A2, A1, A0) for
remaining cases to represent the corresponding binary number. We can follow the same
technique for the inner lower Case Structure.

Step 21. Select another Select function and place in the main Case Structure. Connect
output of ‘Equal ?’ correspond to input I7 to the ‘s’ input of Select function. These are used
to select the second-highest-priority request. Similarly, do it for the remaining inputs,
except for I0.

Step 22. Connect ‘t’ inputs of Select functions from the output of previous Select functions
as shown in Fig. 2, except first Select function of I7.

Step 23. Connect output of Select function corresponding to I1 to the ‘f’ input of the Select
function corresponding to I2. Similarly, repeat the same connection at the Select functions
corresponding to I3 through I6 inputs, except for I7. And then create a constant 0 at ‘f’ input
of Select function corresponding to input I0.

7
Step 24. Select another Case Structure and drop it on to Block Diagram inside the main Case
Structure. If labels appear as True and False, modify them to 0 and 1, respectively and then
add six more cases and label them as 2, 3, 4, 5, 6 and 7.

Step 25. Connect the output of the second Select function of I7 to selector terminal ‘?’ of
the inner lower Case Structure. And then repeat steps 18 and 19 for outputs B2, B1 and B0.

Step 26. Select Programming-> Numeric-> Compound Arithmetic and drop it on to Block
Diagram. Extend it so that it has eight inputs. Now, connect the eight outputs from Boolean
(0, 1) functions to the eight inputs of Compound Arithmetic. Change the mode of
Compound Arithmetic to ‘Add’ by right clicking on it and select Change Mode-> Add option.
This will add a ‘+’ sign to it to make it an adder function.

Step 27. Select Programming-> Comparison->Greater ? and drop it on to Block Diagram


inside the main Case Structure. Give the output of Compound Arithmetic adder to the first
input ‘x’ of Greater ?. Place cursor on the second input ‘y’ and right clicking on it create a
constant of value 1.

Step 28. Connect the output of Greater ? to Round LED BVALID and draw another wire from
output of Compound Arithmetic adder to input of another comparison function ‘Greater
Than 0?’ Give the output of it to another Round LED AVALID.

Step 29. Press Ctrl+b keys to remove broken wires and press Ctrl+u keys to clean up the
diagram on the Block Diagram as shown in Fig. 3.

Step 30. Change the case to False condition in main Case Structure and connect all the
Tunnels on right side of Case Structure to False (F) constant. Then all the Tunnels will be
closed as shown in Fig. 4.

8
Step 31. Return to Front Panel. Save the VI and press the Run Continuously button to check
for the operation of dual-priority encoder. Give different inputs and check the outputs for
identifying the first-highest and second-highest priority request.

5. SIMULATION RESULTS

PRIORITIZED DATA TRANSMISSION:

1) On the left side of the front panel section we have the different users (7-0) with
input data options and the dual priority encoder logic block in the centre selects the
particular user inputs and reflects them onto the output sections on the right.
2) In the simulated example all the users are providing the different data inputs and the
enable pin is switched on and from all the users only the users 7,5,3 are enabled.

Fig 3. Prioritized data transmission through dual priority logic

3) As the user 7 has highest priority, his data [7,9] is transferred to the 1st highest
priority output. The user 5 has next high priority hence his data [71,3] is transferred
to the 2nd highest priority output.

9
6. CONCLUSION

In this project we implemented the prioritized data transmission model for


facilitating the priorities among the users that the high priority user data are transferred to
the output at that instant of time. The dual priority encoder logic selects the high priority
data from the user inputs and transfers the data to the output sections.

The input data array contents corresponding to the selected priority Boolean input
are also Tx to the respective output data arrays.

7. REFERENCES

[1].http://electronicsforu.com

[2].https://forums.ni.com/t5/LabVIEW/Dualpriority-Encoder-Using-Labview

10

You might also like