﻿1
00:00:04,640 --> 00:00:11,240
‫Welcome to the when your feedback shift register demonstration with the Ardie board I have the linear

2
00:00:11,240 --> 00:00:19,070
‫feedback shift register code programmed on the already board and for this program we are implementing

3
00:00:19,130 --> 00:00:26,600
‫a Fibonacci sequence of a 16 bit linear feedback shift register and this the shift register.

4
00:00:26,690 --> 00:00:33,020
‫Since we've designed it correctly it should have sixty five thousand five hundred and thirty five different

5
00:00:33,020 --> 00:00:38,180
‫variable numbers that it will produce before we have a repeating pattern.

6
00:00:38,180 --> 00:00:46,010
‫And so right now we are at the very first state or our seed value which is the value of 0 0 1.

7
00:00:46,190 --> 00:00:53,060
‫If I press the button zero on the development board it should give me the next bout the next pattern

8
00:00:53,330 --> 00:00:55,520
‫in our linear feedback shift register.

9
00:00:55,520 --> 00:00:57,770
‫So I'll press the button one.

10
00:00:58,050 --> 00:01:01,890
‫And you notice we now have a value of eight thousand if I press again.

11
00:01:01,910 --> 00:01:09,770
‫It will give me the next value in this sequence four thousand two thousand one thousand.

12
00:01:09,810 --> 00:01:14,960
‫And if I keep pressing this it will keep generating these random numbers and I can just keep pressing

13
00:01:14,960 --> 00:01:19,320
‫as fast as I want and I'll just keep generating all kinds of random numbers.

14
00:01:19,340 --> 00:01:21,180
‫And these are displayed in hex.

15
00:01:21,410 --> 00:01:27,320
‫So if you go through if I press this button sixty five thousand five hundred and thirty five times I

16
00:01:27,320 --> 00:01:30,120
‫will eventually come back to 0 0 1.

17
00:01:30,410 --> 00:01:33,990
‫So you did it manually would take a really long time.

18
00:01:34,130 --> 00:01:39,020
‫But if you set up a clock where instead of a push button input you had a clock input.

19
00:01:39,020 --> 00:01:44,600
‫You can see after a certain amount of time you will repeat it just will take a little bit of time.

20
00:01:44,750 --> 00:01:52,620
‫At any point we can go ahead and reset by toggling our slide switch 0 to 1.

21
00:01:53,060 --> 00:01:54,710
‫And now we're in the reset state.

22
00:01:54,710 --> 00:01:59,650
‫So if I push the button it won't increment it'll still stay at the 0 0 1.

23
00:01:59,670 --> 00:02:02,090
‫This is what we call our seed value.

24
00:02:02,090 --> 00:02:08,000
‫So in a computer or on your laptop or any other type of digital device if you want to generate a random

25
00:02:08,000 --> 00:02:13,850
‫number usually they'll have a function they call seed where you have to put an initial see value in

26
00:02:13,850 --> 00:02:14,240
‫there.

27
00:02:14,360 --> 00:02:19,600
‫But then after that every time you call that function it's going to give you a seemingly random number.

28
00:02:19,760 --> 00:02:25,900
‫So if I pull it back out a reset I can hit my start button again and go ahead.

29
00:02:26,060 --> 00:02:27,920
‫You'll notice it's the same sequence.

30
00:02:27,920 --> 00:02:32,580
‫So once we start with the seed value we can dictate what our next value will be.

31
00:02:32,720 --> 00:02:37,180
‫But if we keep pressing a certain number of times it appears to be random.

32
00:02:37,190 --> 00:02:42,530
‫So that is the demonstration of a linear feedback shift register running on the board.

