Welcome back, guys.
And now we are going to talk about ADC and analog input.
ADC takes another look signals and then it converts it to a digital signal.
Now, what I mean by analogue signal, a voltage, for example, is an analog signal, and this voltage
can vary and this variation can be translated into some digital values, like one zero one zero or whatever.
And this unlock value is going to be translated to some string of binary signals.
OK, so we call it analog because it can change within a whole range.
So, for example, let's say that you have a voltage source and it is varying between zero and five.
This variation is an analog signal.
And will the Audrina, let's say, or some an embedded board, if it has an ADC circuit in it, it can
take it and translate into something binary.
I mean, let's say you have five volt connected to that board.
This five volt.
Let's say you try to present it in a three bit system.
It's one zero one.
So you put a five volt and your Adreno or any board is going to sample that signal and it's going to
translate it to this binary string and then it's going to comprehend it as one zero one.
OK, and then you can do whatever you want with this one zero one information.
Same thing.
Maybe we drop the voltage a bit to two volt and the representation in three bits is zero one zero.
And then the Renault will understand it at zero one zero after it samples that and it gives you this
binary string representation.
So this is how we actually read any other book value.
I mean, temperature sensor, your humidity sensors, resistance, pressure sensors, all of these or
about analog signals that is translated to some electrical signals and then sampled inside an embedded
system to give you a binary string.
So I'm going to give you an example of a valuable resistor connected voltage source.
So if you change the resistance voltage, it changes.
If you don't have any knowledge about electrical circuit calculations, those are very simple, low.
And if you have a very, very basic math knowledge, you would understand that we are saying that voltage
is the current multiplied by resistance.
Now, you know that if you change one side of the equation, let's say we are changing resistance,
this voltage is going to change.
Right.
So this is how we have a varying voltage.
Remember that we took an example of a voltage, a changing in between a certain range in order to change
it.
There is a resistance in the equation.
Whenever we change resistance, voltage will change as well.
So this is changing.
The voltage is one of the very famous forms of analog signals.
I mean, let us take an example.
This is a valuable resistance, OK?
And it is represented like this.
It has this cell, the line, and there is a arrow going through it.
So if you connect some voltage to this resistance, you're going to get another voltage at the output
right here.
So let's say the voltage is five.
There is a resistance.
It's going to decrease the voltage and then you get another voltage here.
Let's say two point four.
You can imagine that as water going through pipes and these pipes, diameter is changing.
Let's say it's shrinking.
So less water will come in, meaning that in our case, in electrical signals case, less voltage will
come.
So this is water five volts.
Let's say there is a pipe.
The pipe diameter is decreasing, meaning less water at the output.
OK, same thing here it is almost the same analogy.
OK, so the Adreno has inputs that are called analog inputs.
We've studied before digital inputs and we have connected the switches to a switch can conduct either
with five volts or zero volts, but for analog input, it can read a whole range of values, all between
zero and five volts, OK.
So in our case right here, the five volt is being decreased to two point four and the Adreno is taking
two point four and converting to something binary.
I mean, if we play with the resistance, let's say that we have changed the resistance so that the
voltage is decreasing the analogue here.
Let's say we get one point two right now because we have changed the resistance.
Let's say that we have changed the resistance again.
We might see a voltage of four point seven at this point right here.
And this will be converted to binary.
And this conversion to binary is very similar to what we were studying in unsigned variables and VDL
and sine variables and how we studied that.
It depends on what is the lenth or what's the binary system.
Is it phobics is at eight, but it's going to give you different decimal numbers.
It is the same conversion.
We take an analog value and then it's translated to a binary of strings depending on the architecture
of the Adreno.
If it is eight bits, 16 bits, 32 bit, 64 bits, it will be translated to some binary string numbers.
And that's it.
This is all you need to know for now about a disease or a disease can be very, very complicated in
terms of sampling.
But we won't be getting into that for now.
We just want to understand the basic idea, what we heard, the term ADC, what does it mean and what
does it do?
So it's basically only takes on a log value and just converts it to some binary string.
And this binary will be understood by Adreno.
And you can take this binary or decimal or whatever number then the original change it to and you can
play with it but conditions and activate your order accordingly.