I'm new to arduino (my first kit with uno arrives soon). I am definitely going to
spend some time on implementing and modifying some starter projects from
the web but I also had this idea that I would like to do.. I would really appreciate
your feedback about this.
So I would like to implement a Linear Feedback Shift Register ("LFSR").
The definition from wikipedia is
In computing, a linear feedback shift register (LFSR) is a shift register whose
input bit is a linear function of its previous state.http://en.wikipedia.org/wiki/LFSR
A definition that I found for a shift register is:
An n stage shift register is a circuit consisting of n consecutive 2 state storage
units ( ip ops) regulated by a single clock. At each clock pulse, the state
(1 or 0) of each memory stage is shifted to the next stage in line.
An LFSR, if designed properly, will produce a sequence of huge period with
very good randomness properties (e.g. number of zeros ~ number of ones
and other). LFSR's are used a lot for pseudorandom number generation
(for instance, in cryptography).
A google search for "arduino lfsr" would give some results, but it is pretty
much people who have done lfsr simulations, for instance this guy:
However, I would like to do the 'real thing', that is, not
create code that
simulates the lfsr, but create the circuit itself using a feedback shift register
and perform xor operations on some bits of the current stage somehow and
then feed the result back to the register. Each bit of the stage would correspond
to a led that is on when the bit is 1 and off when the bit is 0.
I don't really have any use for that (although at my level everything contributes
to learning!) and the only reason I want to build "the real thing" instead of a
simulator is that I'm a math grad student, I have spent lots of my time on the
pure abstract mathematics behind lfsr's and I never saw one of those damn
things in my life! I want to see a real lfsr live!
So, do you think something like that would be easily implemented? Any hints
as of how (and if) I should start planning? Also, what parts should I buy? Any
recommendations of the specific parts? What kind of shift register should I
Any feedback would be appreciated.. Many thanks in advance.