Thanks for your reply charlie - I could have spent days figuring this
out if i'd have waited for TS to get back to me :)
Cheers,
Chris
charliem_1216 wrote:
> Hi Chris -
>
> --- In Christopher Friedt <> wrote:
>> Hi everyone,
>>
>> I'm writing a really simple app for the 7260 analog to digital
> converter
>> based on the sample code provided here:
>>
>>
> ftp://oz.embeddedarm.com/ts-arm-sbc/ts-7260-linux/samples/adc_72xx.tar.gz
>> and I have a couple of questions that some of you may have already
> answered.
>> In the file adc_7250.c, there are a couple of numbers that I would
>> imagine to be slightly irrelevant for a 12-bit ADC in the following
>> operations:
>>
>> if(avg < 0x7000)
>> avg = avg + 0x10000;
>>
>> Why are they present?
>>
>>
>> Similarly, I don't really follow where the 'magic numbers' below
> come from:
>> avg = avg - 0x9E58;
>> val = ((double)avg * 3.3) / 0xC350;
>>
>> The code is taken from lines 177 to 199.
>
> I puzzled over these for a while too. Take a look at the transfer
> function of voltage vs returned value in the cirrus ep9301 manual.
> The values returned are 16 bit _signed_ values (look at the values on
> the X-axis ... )
>
> Other archived discussions about these values:
> http://tech.groups.yahoo.com/group/ts-7000/message/8755 and
> http://tech.groups.yahoo.com/group/ts-7000/message/7686
>
>> I guess the last question that I have is:
>>
>> Assuming that the source impedence of whatever signal is being measured
>> is < 10 Ohms, is the transfer characteristic of the ADC linear? For
> some
>> reason, I find it very hard to believe, because the 'steps' for a 5.15V
>> POWER_IN signal are 420, while for a 12.4 V signal are in the range of
>> 3200 steps.
>
> I think the steps are uniform once you wrap your head around the data
> range (ie apparent discontinuity around 1.5V (?)). Should be about
> 49000 steps between 0 --> 3.3 V IIRC.
>
> If you need the best linearity, look into the TS calibration
> constants. Mine were not burned into the board (or at least the demo
> program didn't find them), but Eddie sent them to me.
>
> Regards, ........ Charlie
>
>> Has anyone analyzed this characteristic with a reliable variable power
>> supply?
>>
>> Cheers,
>>
>> Chris
>>
>
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|