I would like to know if anyone here knows how to take care of the ADC sampling noise in the circuit ? Its like a line of code only but i cannot figure it out. anyone ?
6 + 9 + 7 = 22 22 / 3 = average .
i think what the teacher wants from me is like using some code to get the average of 3 noise .
there are other possibilities that can reduce your sensitivity to noise - you can decide that the new value = (0.8 * current value) + (0.2 * latest ADC reading), or other combinations.
Yes. But how hard is it to compute that average using some code? You are adding three values to get a sum. And you are dividing that sum with 3. Are you saying that you do not know enough programming to manage that?
Note that the teacher does want it from you
The teacher is expecting that a student capable of completing this course, at this stage, ought to be able to work this out.
If you really can't work it out, then you seriously need to discuss it with someone now - as it's only going to get harder as the course goes on...
which code should i store in x1 , x2 or x3 ? i need the line of code . example:
noise = x1 where do i get the noise code from ? i cannot possibly type in noise. There will be error ..
i need the basic of computing the average code first before i do any advance coding. But thanks ! =) i have noted down your help . Will look into it if the teacher really wants it .
The teacher really wants it, and you really have to learn how to perform three ADC conversions and sum the values before dividing by three and present the result.
Beware that teachers can read forums, too!
Several students have been rumbled trying to get their homework done for them on forums...
eg, www.8052.com/.../60122
its alrights . i am just trying to get the code for the noise . not the WHOLE code ..
So you already got the code for reading out _one_ value from the ADC from somewhere else. And now you need the averaging code?
Anyone who can write the code to setup the ADC and get values from it can trivially easy compute the average.