So we have already talked about the or digital to another convertors, however, what you don't know
is that with the Adreno board we are working on right now, which is the original oh, no, it does
not contain any Deacy.
So there is no real analog output on this board.
But I've already told you that we can control motors, we can control LEDs and GB's and control their
dimness, maybe control the rotation of a motor using analog output.
So how come I'm telling you that?
But the owner does not contain and.
Well, this is done by the meaning of PWI and we're going to explain them right now.
So it is a false width modulation.
It works by generating an analog signal, by simply taking a digital signal and flipping it on and off
for a certain interval.
OK, so we have a digital signal.
We flip it on and off for a certain time, and then we have a semi analog signal and it works in the
actual.
So the concept could be a little bit weird at first, but when we think about it, it's going to make
sense.
Now, let us assume that you have some type of dimmable when you flip it, when you start turning it
on, on off really quickly, it's going to give you the illusion of being a dim light.
So if you just turn it on and off with a certain interval, a constant interval.
You're going to see this leada dimming down, dimming, meaning the light goes down a little bit.
It's not at full glow, but it is.
Maybe I did see my glow.
Another example.
Let's say that you have a.
Now, if you turn on the fan and off at the search rate, it won't be rotating at the full speed because
there is enough interval in every fraction of the second.
OK, so you have a fraction of the second.
It's on a fraction of the second it's off.
So it won't be rotating at its full speed.
But at the same time, when you hit off, it won't be completely off because you have a physical inertia
that is keeping the fan rotating.
This is why when you have such a scenario where you are trying to get on and off really quickly at a
certain rate and dargavel, you're going to get multiple speeds for this fan.
And the fan is actually nothing but a motor.
So controlling a motor could be by turning it on and off really quickly.
Now, let me give you a better example and an illustration of the petroleum.
So this is a petroleum signal, as you can see.
It's on off, on off.
And this goes wherever the signal should be sent continuously to your control device.
Now, this represents a 25 percent cycle.
What does it mean?
It means that in a full cycle.
Twenty five percent of the time this signal is on and 75 percent of the time it is off.
OK, so this repeats 25 percent on 75 off in every cycle.
Let's say this is repeating maybe every 10 milliseconds or whatever interval this and this is repeating.
Now, let's assume that we are dealing with eight bits.
This will corresponds to 63 decimal Y, because for eight bits, the maximum number is 255, 20 percent
of that is 63.
So this six to three decimal, let's say we're going to convert it to Vold.
It's 25 percent of this Five-fold, which is one point two seven five.
So the signal what corresponds almost like sending at one point to five vol to your control device.
So let's assume that you are controlling your motor.
OK, and you need to send this at one point to five volts in order to later rotate at its 25 percent
speed.
So if you did this on off like that with a 25 percent cycle, it is the same as sending one 2.5 volt.
That is the similarity between analog and be a W.M..
So it's like averaging this for a long time is like giving it at one point to five volt.
Now again, this is not actually one point two, five volt.
We are just turning it on and off at a certain rate that corresponds to like constantly activating it
at one point two five.
OK.
So the calculation goes like this.
Let's say you said it to 25 percent cycle.
Let's say you are working with a valuable that is eight bits.
The 25 percent cycle would mean 25 percent of the full number of the eight bits.
In our case, it's 255, 25 percent of it is 63.
Now, let's say that your board works with five volts on its output.
So sending this valuable to the output like this is going to correspond to one point five four.
Now we're going to see an actual example in the upcoming lectures.
Now, let us continue.
Let's say that we are turning it on and off at 50 percent cycle.
So it is 50 percent of the time, all 50 percent of the time off.
And it's repeating forever again for eight bits valuable here.
This will respond to one hundred twenty seven decimal.
Right, maximalists 255.
You divide it by two, you get one to seven.
Since this is an integer division.
Right.
There's no decimals here now for a five volt, this would correspond to sending 2.5 volts to your control
device.
So turning this on and off as 50 percent cycle is the same as sending 2.5 volt to a controlled device.
Could be a motor or could be, let's say, an electric light.
Now, the last case is let's say that you controlling it at one hundred percent cycle time.
Well, it means that it is 100 percent of the time, but it's the same as sending a five volt constantly
cell for eight bits.
This would correspond to 255.
And, well, 255 is 100 percent of the vote is actually five volt.
So if you send it like this, you would be controlling your device at its full potential.
Meaning if you let's say you have an LED, you connected like this.
Well, it's going to then at its full glow.
So what is the difference between analogue and B m b W is nothing but an.
Of analog, because, as I said, turning it on and off will give you an idea of interval, which means
that we're going to get a semi analog signal.