Hi yp_ng
Have you done any binary maths before because this is where you need to start before you try and understand shift registers
If youve worked on a washing machine before and replaced the timer old school timers which were motorised you will remeber how they are made and what the cam does is it has a clock cycle for every tick of the clock a switch is activated This would also help you understand how a shift regsister works or you could think parrarell to this
Or if you gave ever opened a music box the old drum used to make all the spings jump to produce music
Another similar scenario not quite what a shift register is but elementry start to understanding this in visual format
Binary maths for you
http://www.math.grin.edu/~rebelsky/Courses/152/97F/Readings/student-binaryNext Read the datasheet then
Have a look at this page this is an interactive giude of how a shift register works
http://conductiveresistance.com/2011/02/28/interactive-595-shift-register-simulator/Think of a shift register as binary number shifted N amount of times
Lets see take the number 10 conver this to binary
1 dec = 0001 bin
Now lets shift this binary number one place at a time
Watch what happens Picture a clock second hand as you read
0001 left shift 1 clock 0 = 0010 tick "
bring this down again
0010 left shift 1 clock 1 = 0100 tick
bring this down again
0100 left shift 1 clock 2 = 1000 tick
bring this down again
1000 left shift 1 clock 3 = 0000 tick
Enable output
OUTPUT = 1 final result after 4 counts or n - 1
I land up with 1 at the output serial output
So what happens to the bit in the number
Thats a very basic operation of what happens in a shift register Im shifting the bits out of the register right to left
In Binary or programming langauge we say The way we express a right shift or left shift is by writing
The following "One setp further to go and think about "
So lets take our above example again
0001 left shift 1 clock 0 = 0010 tick "
Lets store the number this time in a container
MyNumber is a container we call the container a name this holds our 4 bit binary number
MyNumber = 0001
MyNumber = MyNumber