04-04-2008 10:39 AM
04-04-2008 11:00 AM
I'm going to assume that by Lfsr you mean Linear Feedback Shift Register. Unfortunately there are not flip-flops in LV. What LV does have are shift registers which can be used to pass data from one iteration of a loop to the next iteration. There are also functions in LV to perform a rotate/shift function on a number. So you could probably use a FOR loop with a shift register and the rotate function to do what you want.
What kind of function is going to determine the bit to be shifted in and how many shifts are you going to perform?
04-06-2008 02:05 PM
Yes i have found out that Labview doesn't have any Flip flops so Shift registers would need to be used. I found an interesting website that shows a 3-element Lfsr,(BELOW).
http://courses.ece.uiuc.edu/ece463/SP08/labs/LVtraining/LVtutorial.htm
It uses a while loop instead of the for loop you mentioned. I was wondering if you know how to develop it into a 4 element LFSR (eg where to connect the shift registers to the exclusive or...............This question is open to everyone!!!!!!
04-07-2008 07:43 AM
You still have not said what you are trying to accomplish with the LFSR. They can be used to generate psuedo random sequences, high speed counters etc. If you look carefully at the link you posted, at the end of the exercise the heart of the vi is a FOR loop.
The questions remain:
1. What function do you wish to apply to the current data to generate the next bit to be shifted in? XOR or XNOR?
2. If creating random data, how many bits of data are you trying to create?
04-10-2008 09:53 AM
04-10-2008 09:54 AM
04-10-2008 10:30 AM
04-10-2008 07:40 PM
04-11-2008 07:58 AM
If you don't know the difference between a what a FOR and WHILE loop looks like then I have to wonder if you have even started up LV and looked at the palettes to see what functions are available. I have shown you the concept of how to implement a LFSR in LV.
Fire up LV and do some exploring in the palattes and see what functions are available. There a several good examples that ship with LV as well.
HINT: The diagram takes an 8bit integer, converts it to a boolean array, indexes the array to access the 4 lsb individually.
04-11-2008 09:06 AM