Hello, in this video, we are going to learn the art we I instruction.
OK, this is what we are going to learn in this video and we will test with our stepper motor.
OK, the two hundred and two hundred and two.
And why is why one?
I will explain them all to you.
All the twenty 25.
Are we.
I let's remember the two hundred is the cost to produce.
Palls.
No, OK, the two hundred and two is pulse frequency value.
And why zero is Paul's?
Output.
Port and why one is Direxion.
And one more thing for the DDR, the I instruction, let's remember, and the M one thousand doesn't
matter.
And now we will take a look to move the two hundred or two hundred and fifty to the one thousand three
hundred forty three.
This is ramp down, up, ramp up and down for the first group pass out.
But we are working with the Y zero for the pulse output, uh, port and the 1343 is spatial data registers
for the ramp up and down time.
So now we can send it to our CPU.
Now it is sending for the NAACP and OK, it's finished and now we are on line our CPU's run situation.
OK, let's give the producer pause.
How many parts.
Imagine twenty five thousand calls is going to be produced by CPU and Farkash volume is the speed of
the stepper.
Motor is going to be for example, five hundred.
And if I activate this one you can see it is turning.
OK, turning.
Time is zero.
You can see.
Because why?
Because we are sending zero change to, for example, five hundred millisecond.
This is now five hundred milliseconds, but the direction is to the.
This site, you can see.
It will be to focus, OK?
Now, it's stunning to decide I will activate Y zero.
But still, it is turning to the other side and I will make it set off because it was, uh, it needs
to turn to another direction.
Ha, let's set off again.
Set on.
I will just check one more thing.
Still same y set of stop.
Now, um, we need to focus to pass for currency value and produced Paul's number and if I change it
to minus five hundred to.
Then activate this one, it is not stop sort of we need to stop, let's change it to five hundred again.
I am doing one thing wrong.
I need to take a look once two minus two thousand five hundred again.
Um, stop.
Another side you can see.
Now, another side.
OK, I, I made a mistake, so for this, let's take a look once to the art of the instruction.
This is the produce pulse and not a speed we need to make minus for the opposite direction, not the
other instructions to activate why one DPL or instruction was like that.
But now we need to change this to, for example, plus two thousand five hundred, OK, and then you
will see it will turn to decide this.
Correct.
And why one is not activated.
Good.
And stop now we can continue like this.
For example, the produce pulse is going to be minus 90.
Toussant.
And our speed is going to be, for example, three thousand, OK, pass frequency and the ramp time
is going to be not 500 milliseconds, but maybe five thousand milliseconds.
Five seconds later, it needs to reach the maximum frequency speed.
This activate is one slow.
Fast and fast and fast and fast, you can see after five seconds.
This is the speed of the three thousand set of let's change it to nine thousand, OK?
And set on slow, slow and fast.
You can see it.
And set off and then change it to five thousand speed and change it to ten thousand millisecond later,
OK?
And this is plus ninety thousand, OK, and stop and set on.
So slow, so, so, so slow, so and increasing the speed speed is increasing and increasing and increasing,
just focus after 10 seconds, it will be maximum speed, maximum frequency equals to five thousand.
And after ninety thousand pulses produced and it will stop slowly, you can see and it is finished.
So this is the DDR, VI or TRV instruction usage.
We need to change that.
The stepper motor direction with the minus or plus values from the produced pulse number.
And we need to give a speed frequency from here and we need to adapt our ramp up and down times for
the stepper motors acceleration and deceleration according to our TR we instructions instruction.
OK, I am finished for this year.
See you in the next video.