1
00:00:01,470 --> 00:00:07,440
How can we control the number of steps in a step and what this lecture will explain how to give the

2
00:00:07,440 --> 00:00:14,640
number of steps to a step emoter as its input, we will use the two phase one method to drive this to

3
00:00:14,640 --> 00:00:15,030
promote.

4
00:00:19,250 --> 00:00:24,500
The control of supermoto and integer number as an input defines a number of steps.

5
00:00:25,730 --> 00:00:33,350
Also, I one with put sends the Sakar man to the mod, therefore when they stop and what a driver receives

6
00:00:33,350 --> 00:00:40,160
a signal pulse on the starting point, it should load the number on its impact and use that as the initial

7
00:00:40,160 --> 00:00:46,210
value for a counter register to count the number of states in the FSM implementing its behavior.

8
00:00:51,550 --> 00:00:57,880
Before writing the code, Etchells, let's have a look at the final design in Vivaan, the design consists

9
00:00:57,880 --> 00:00:58,870
of four ipis.

10
00:00:59,200 --> 00:01:01,530
The main IP is the stepmonster driver.

11
00:01:02,170 --> 00:01:08,920
This IP has a 16 bit input which will be connected directly to slide switches on the basis rebought.

12
00:01:09,310 --> 00:01:14,470
It also has to a single bit inputs motorcoach right and load.

13
00:01:14,860 --> 00:01:19,500
Whereas the motorcoach right defines the speed of going from one step to the next.

14
00:01:19,870 --> 00:01:25,600
The load signal will come on the motto to read the number of steps input and it starts the rotation.

15
00:01:26,930 --> 00:01:34,130
The stepmother, crockpots, IPE, supplies the motorcoach right signal the answer and pulse generator

16
00:01:34,130 --> 00:01:37,330
epis also connect the loud input to a push button.

17
00:01:41,800 --> 00:01:48,130
Let's start coding, open the White House and create a new project with the name of a Stepa underscore,

18
00:01:48,140 --> 00:01:55,440
malter underscore driver underscore with underscore citral underscore white essentialists then select

19
00:01:55,450 --> 00:02:00,220
astep underscore Märta underscore driver underscore with underscore citral at a top function.

20
00:02:01,060 --> 00:02:04,660
Don't forget to choose the bases rebought as a target FPGA platform.

21
00:02:12,170 --> 00:02:15,440
Download the design files and add them to the created project.

22
00:02:20,900 --> 00:02:28,700
Open the design source file as a two phase one method is selected to provide the motor signals the design

23
00:02:28,700 --> 00:02:36,630
FSM has for states which are defined within enumeration data type, the design top function is defined

24
00:02:36,630 --> 00:02:39,860
with four arguments, three inputs and one output.

25
00:02:41,100 --> 00:02:47,150
To a static, variables are declared to save the designer status and the number of remaining steps.

26
00:02:48,950 --> 00:02:54,920
Two temporary variables are also defined, corresponding to the defined static variables, also, a

27
00:02:54,920 --> 00:03:01,520
temporary variable is defined to keep the intermediate values for the design output values when the

28
00:03:01,520 --> 00:03:02,870
load input signal is high.

29
00:03:03,170 --> 00:03:07,010
The counter should be initialized with the value of their steps input.

30
00:03:07,820 --> 00:03:13,070
Then the states in the FSM check them all to collaborate and the steps counter.

31
00:03:14,190 --> 00:03:19,860
If the clock right is one and they stop Kountouris, not zero, then the counters would be decrement.

32
00:03:20,900 --> 00:03:25,790
The state should be changed and the motor should rotate one step further.

33
00:03:26,860 --> 00:03:30,190
Otherwise, the FSM does not change its state.

34
00:03:31,330 --> 00:03:34,990
Synthesize the code and export the corresponding article IP.

35
00:03:47,780 --> 00:03:53,720
Now around the world and create a new project with the name of a stepa underscore to underscore driver

36
00:03:53,720 --> 00:04:00,050
underscore with underscore on this Gheorghiu and select the basis reboard as a target FPGA platform.

37
00:04:13,940 --> 00:04:15,440
Create a new blog design.

38
00:04:27,250 --> 00:04:29,860
And for Ipis to deliver the repository.

39
00:04:40,800 --> 00:04:47,370
The bouncer pulse generator, a amateur kozakiewicz generator, and the establishment of the Reiber.

40
00:04:54,570 --> 00:04:59,880
Instantiate the pipes and connect them together and change the port's name properly.

41
00:06:22,490 --> 00:06:28,550
Download the consent file from the resources folder attached to this lecture and add that to the project,

42
00:06:29,240 --> 00:06:31,860
then generativity stream and program the board.

43
00:08:14,450 --> 00:08:22,790
Something number 800 or one one zero zero one zero zero zero zero zero in binary on this light switches

44
00:08:23,150 --> 00:08:29,660
and pressed up push button, know that as this angle of this stepper motor into two phase one method

45
00:08:29,780 --> 00:08:41,100
is zero point 45 degree, then 800 multiply zero point forty five equals to 360, which means the step

46
00:08:41,150 --> 00:08:43,370
motor will rotate a complete round.

47
00:08:44,330 --> 00:08:50,120
So different numbers on this light switches and pressed up push button and inspect this supermoto.

48
00:08:55,290 --> 00:09:01,740
The next lecture will go into the details of implementing the one two phase on method in Etchells.

49
00:09:05,100 --> 00:09:11,910
This is our takeaway message, using a counter in the Supermoto, driver FSM enables the precise control

50
00:09:12,180 --> 00:09:13,470
on the state rotation.

51
00:09:18,330 --> 00:09:24,420
Now, the quiz question, what number should be set on this light switches such that the motor rotates

52
00:09:24,420 --> 00:09:26,220
three complete rounds and a half?
