ts-7000
[Top] [All Lists]

Re: [ts-7000] internal ep93xx ad

To:
Subject: Re: [ts-7000] internal ep93xx ad
From: Zombi process <>
Date: Fri, 25 Jan 2008 08:38:06 -0300 (ART)
You are right the ADCpoll works !! Thank you very much


Ilya Goldberg <> escribió:
There are a number of reasons why the result could be wrong (assuming
the electronics are OK and you have a low impedance signal). I've
had no luck with adc_7250.c either. The various examples of reading
the ADC have many mysterious "quirks", which I'm guessing are due to
the fact that the ADC is designed to be read on an ADC interrupt, but
all of the examples try to do this without interrupts, instead timing
things using pretty coarse approximations.

I've had better luck adapting ADCpoll.c, which can be found in
sources/busybox-1.00-rc2/coreutils/ADCpoll.c on the linux CD.
There is a function there called EP93XX_ADC_microvolts, which does a
conversion from the raw ADC register value to something approaching
the right number of microvolts.
Its not absolutely accurate - you still have to determine the 0-
offset and slope empirically and do a linear correction. But its in
the right ballpark even if you don't.
My board (a TS7260) did not ship with the correction factors
programmed into eeprom, as adc_7250.c assumes.

The on-board ADC desperately cries out for a kernel module. Its
simply not possible to do the timings correctly outside of the
kernel, unless you do everything in calibrated busy-wait loops (and
nothing else, since there will be a 100% CPU load). The best I could
manage outside the kernel is reading two channels at 10 Hz or so - 20
- 50 times slower than what is possible with the hardware. Why the
onboard ADC does not ship with a TS-sanctioned kernel module is one
of those great mysteries.

Something brutally simple, that just dumps the raw ADC register value
into a character device whenever an ADC interrupt occurs would be
great. The channel control, conversion, etc can all be done outside
the kernel. I've done some digging into what interrupt number gets
generated and how to trap it in a kernel module, but there's a lot of
poorly written documentation to dig through so I eventually gave up
(for now).

-Ilya

On Jan 23, 2008, at 7:36 AM, Zombi process wrote:

> Yes this is the sample code that i'm using , but the
> result are wrong .What revition of ep93xx do you have?
> i had ep9302 e1
>
> thanks bye
>
> --- Triffid Hunter <triffid_hunter@funkmunch.net>
> escribió:
>
>> On Wed, 23 Jan 2008, Zombi process wrote:
>>
>>> hello has anyone use the internal ad because i
>> can't
>>> have a correct value when i tried to use it and
>> there
>>> are a very extrange note in the ep9301 manual.
>>>
>>> thanks !
>>>
>>> bye
>>
>> The sample code provided by technologix works fine
>> for me
>>
>>
> ftp://ftp.embeddedarm.com/ts-arm-linux-cd/samples/adc_7250.c
>> and all its includes from the same directory.
>>
>
>
>
> Los referentes más importantes en compra/ venta de autos se
> juntaron:
> Demotores y Yahoo!
> Ahora comprar o vender tu auto es más fácil. Vistá ar.autos.yahoo.com/
>
>
>
> Yahoo! Groups Links
>
>
>




Yahoo! Encuentros
Ahora encontrar pareja es mucho más fácil, probá el nuevo Yahoo! Encuentros.
Visitá http://yahoo.cupidovirtual.com/servlet/NewRegistration
__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU