I am facing some problem with code regarding ADC Last few hours I was trying to digest @bob's code I can't totally, specially last function of his code. So I can't use it. Sorry @bob.
@Denis I also tried your methods several...
I am facing some problem with code regarding ADC Now my code is
int16_t adc_filter(void)
{
uint8_t i=0;
int16_t current_value=0;
int16_t avg=0;
while(i>3);
i++;
}
return(avg);
}
But still getting nothing.
Quote:
I'd...
Wednesday, 29 May 2013 - 16:05
I am facing some problem with code regarding ADC Now my code is
uint16_t adc_filter(void)
{
uint8_t i=0;
int8_t current_value=0;
int8_t avg=0;
while(i>3);
i++;
}
return(avg);
}
But still getting nothing. Now I am...
Wednesday, 29 May 2013 - 15:32
I am facing some problem with code regarding ADC I am expecting result 80. But I am getting 0. Before introducing this function I got the value between 77-82 & with too much fluctuation. I am new in uC programming. I am...
Wednesday, 29 May 2013 - 15:09
I am facing some problem with code regarding ADC According to this formula
avg=avg+0.125*(currentvalue-avg)
my code
uint16_t adc_filter(void)
{
uint8_t i=0;
uint16_t avg=0, current_value=0;
while(i>3);
i++;
}...
I am facing some problem with code regarding ADC I am seriously considering your idea.
averagevalue=averagevalue + .125*(current value - average value)
What do you think how many samples would be sufficient?
If I increase or...
Tuesday, 28 May 2013 - 02:50
I am facing some problem with code regarding ADC First of all while I was writing my last post in this thread reply from "bobgardner" & "clawson" were not updated this page on that time(courtesy to slow server response from...
Monday, 27 May 2013 - 20:23
I am facing some problem with code regarding ADC I probably think my problem is solved.
Thank you for bearing me.
But if I face any problem regarding ADC I will post here & will abuse your kindness.
Till then thanks to all...
Monday, 27 May 2013 - 17:53
I am facing some problem with code regarding ADC dbrion0606 wrote:Do
while(ADCSRA & (1<<ADSC))
return(ADC);
and
while(ADCSRA & (1<<ADSC)){}
return(ADC);
have the same meaning?
No of course not.
Thanks
Last few hours I was trying to digest @bob's code I can't totally, specially last function of his code. So I can't use it. Sorry @bob. @Denis I also tried your methods several...
@bob & Denis let me digest & properly understand yours codes & ideas. Then I will let you know what I am getting. Thanks again both of you.
Thanks for reply. How can I get Quote: uint16_t previous_average Can you explain a bit more plz.
Now my code is int16_t adc_filter(void) { uint8_t i=0; int16_t current_value=0; int16_t avg=0; while(i>3); i++; } return(avg); } But still getting nothing. Quote: I'd...
Now my code is uint16_t adc_filter(void) { uint8_t i=0; int8_t current_value=0; int8_t avg=0; while(i>3); i++; } return(avg); } But still getting nothing. Now I am...
I am expecting result 80. But I am getting 0. Before introducing this function I got the value between 77-82 & with too much fluctuation. I am new in uC programming. I am...
According to this formula avg=avg+0.125*(currentvalue-avg) my code uint16_t adc_filter(void) { uint8_t i=0; uint16_t avg=0, current_value=0; while(i>3); i++; }...
Thanks for your explanation
I am seriously considering your idea. averagevalue=averagevalue + .125*(current value - average value) What do you think how many samples would be sufficient? If I increase or...
First of all while I was writing my last post in this thread reply from "bobgardner" & "clawson" were not updated this page on that time(courtesy to slow server response from...
I probably think my problem is solved. Thank you for bearing me. But if I face any problem regarding ADC I will post here & will abuse your kindness. Till then thanks to all...
dbrion0606 wrote:Do while(ADCSRA & (1<<ADSC)) return(ADC); and while(ADCSRA & (1<<ADSC)){} return(ADC); have the same meaning? No of course not. Thanks
Pages