lkml.org 
[lkml]   [1999]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: A/D converter
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.022 / U:2.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site