Re: A/D converter

Richard B. Johnson (root@chaos.analogic.com)
Tue, 20 Apr 1999 10:33:18 -0400 (EDT)


On Tue, 20 Apr 1999, David Woodhouse wrote:

>
> On Mon, 19 Apr 1999, Krawietz wrote:
> > > the A/D card works at about 70kHz. What is the simplest way to
> > > implement that kind of pooling without processor lock in busy wait loop.
> > > I will be grateful for any clue.
>
> root@chaos.analogic.com said:
> > I would use the CMOS RTC to generate a periodic interrupt. In fact
> > have done it and it works well.
>
> Doesn't the RTC only allow certain periods (powers of two?). You might need to
> swap the main system timer onto the RTC, and then we can use the more versatile
> pic for other things, such as your ADC and the PC speaker driver.
>

So? The idea is to provide a hardware interrupt for a device that doesn't
produce a hardware interrupt. An ADC running at 70 kHz does its own thing.
You just have to be able to get its data without polling. Depending upon
the board, you may only have to look at it 1,000 times per second to
make sure that its internal buffer(s) don't overflow. The RTC will
interrupt at 32 to 4096 times/second. One of those numbers had ought to
do it.

You do not swap to timer channel 0, you need the highest priority
interrupt for the main timer.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/