Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] ADC problem!

2004-05-30 by John Johnson

The sampling frequency must be several times the frequency you
want to sample, otherwise, you will see a seemingly random
sample, or a harmonic of the original frequency. You can
decide how many points will adequately describe the
40Hz sine wave for your project, multiply by 40 and
use that for the sample frequency. If I were doing it,
I would use a prime number as the number of samples,
that way you're guaranteed not to lock onto a
multiple/harmonic of the frequency you're sampling.
(The things we learn from Nature :-) Locusts, in
this case.)

Regards,
   JJ

On Sunday, May 30, 2004, at 01:43 AM, ereihani wrote:

> HI!
> I use 8-bit adc and i use the result conversion in ADCH which is
> produced in the wizard.I have given a DC voltage of 2.5V and I have
> got 128,but when I give a 40HZ sine and send the result to PC and
> plot with MATLAB the figure is very bad.I have also increased the
> sampling frequency but it was in vain.
> Please guide me!
> Thank you!
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.