We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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 ?
Why do you feel that it is just a line of code?
Normal way of reducing noise is to spend a lot of time filtering all signals in the hardware. Extra good results by halting all other operations in the processor while the ADC is active.
because the teacher says so . alrights i got another tips .
the teacher says take the average of 3 noise then store it in X. how is it possible ? i am confuse !
You have to be very clear about what you ask.
There is a big difference between making sure that the ADC produces little noise, and using statistical methods to try to improve the measurements from bad hardware.
How would you compute the average of three numbers? What is the average of 6, 9 and 7? Let's just pretend that you got these readings from the ADC.
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.