Subject: Re: PC104 ADC programming problem
To: Christos Eleftheriadis <christos.eleftheriadis@gmail.com>
From: Werner Backes <werner@bit-1.de>
List: tech-embed
Date: 12/04/2005 11:02:27
Hi Christos,

I'm not shure if usleep gives such a high resolution
as 10us. You should probably test this with an empty
loop that contains only the usleep(10) call.

Christos Eleftheriadis wrote:
> The SBC runs a kernel compiled from CVS some weeks ago.
> Do I need to tweak the kernel files in some point ?

No, I think it's pretty unlikely that you have to tweak
something here.

> Or this is the higher speed that a userland program can go ?

No, there is no such thing as a "userland speed limit" ;). Of
course, userland programs can be slow down by other programs
that are running, but on an idle system, you should not have
a problem with this.

> Should I try to write a driver to achieve the speed I want ? 50Ksps
> would be OK for me..

Maybe you need to do this, but not for speed but timing accuracy.
If you don't care much about the exact timing, you should be fine
with a userland program.

> The manufacture company says that 100Ksps are feasible...and the ADC
> chip can do 125Ksps

Don't you have to tell the ADC the sampling speed? Or does it
automatically starts a new conversion on every read?

greetings
            Werner