ts-7000
[Top] [All Lists]

[ts-7000] Re: accessing extra ADC on 7250

To:
Subject: [ts-7000] Re: accessing extra ADC on 7250
From: "charliem_1216" <>
Date: Tue, 24 Jul 2007 00:04:25 -0000
Hi --

--- In  "j.chitte" <> wrote:
>
> Hi Charlie,
> 
> --- In  "charliem_1216" <charliem_1216@> 
> wrote:
> >
> > Hi --
> > 
> > --- In  "j.chitte" <j.chitte@> wrote:
> > >
> > > Hi,
> > > 
> > > the sample code in adc_7250.c shows how to control the five ADC 
> > > channels on the std 7250. 
> > > 
> > > Where is the documentation relating to use of the optional extra 
> 8 
> > > channels?
> > 
> > The 8 channels are in the optional MAX197 chip, and the data sheet 
> > is available from Maxim.  This data sheet, the TS example code, 
> and 
> > the device driver in the files section of the forum should be 
> plenty 
> > of documentation.
> 
> Yes that group of resources should help. An explicit reference to the 
> MAX197 as part of the spec sheet for the 7250 may have helped me 
> realise what max197.pdf refered to.
> 
> Also I dont see the driver tarball on ftp://ftp.embeddedarm.com/
> downloads , that seems on odd ommission if I need to disect it to get 
> essentials like how access the device. It should not be left to an 
> unofficial use group.

You don't need the kernel mode device driver to access the device
unless  you want to squeeze out the fastest possible sampling rate. 
Everything can be done from userspace, using the same access methods.
 It's a tad slower, that's all.

I believe there are several other example programs using the MAX197 in
the forum file archive too, or referenced in the forum posts.  One
probably does exactly what you need already....

> 
> Anyway thanks for the pointer. The example file in the tarball seems 
> to be what I was looking for.
> 
> 
> 
> 
> > 
> > [FYI, your board must be ordered with the MAX197 chip, it cannot 
> be 
> > added after the fact unless the board is reprogrammed by TS.]
> > 
> > > 
> > > also the example following line relating to converting the ADC 
> > input 
> > > data but there is no comment as to why this is needed or the 
> > meaning 
> > > of the 0x7000 test.
> > > 
> > >   if(avg < 0x7000)
> > >                   avg = avg + 0x10000;
> > > 
> > > Neither do I see anything in the Cirrus data sheet that would 
> > explain 
> > > this.
> > 
> > First, this only applies to the 5 built-in A/D channels on the 
> > cirrus chip, not the MAX197.  
> > 
> > To see why it's needed, look at the transfer function (digital 
> > output vs. analog input voltage) on p.34 of the EP9302 Data 
> Sheet.  
> > See how the digital output rolls over from 0xFFFF to 0x0000 around 
> > (Vref / 2)?  Replot the line, with input voltage on the Y-Axis, 
> and 
> > digital output on the X-axis (0x0 to 0xFFFF), and it's a little 
> > clearer.  The 0x10000 is essentially shifting one section of the 
> > curve so the output is a single line not two saw-teeth.
> 
> thanks for the explaination , that makes more sence. A comment in the 
> example would help make this oddity more transparent. After all , the 
> example code is there to explain , not to just work, and this quirk 
> is less than obvious.
> 
> However, I dont see this in the reference. 
> http://www.embeddedarm.com/downloads/Components/EP9302-PP2.pdf
> 
> Here I see a straight line tranfer function in fig20 on page 32. What 
> document are you refering to?
> 
> Is this example a hangover from an earlier board perhaps?

No, that's the graph I'm referring to.  It's a straight line, but look
at the digial values: they are not monotonic.  

If you replot it as described above you'll see two sections: one has
xrange (0:61A8) and yrange (vref/2:vref), the second has xrange
(9E58:FFFF) and yrange (0:vref).  I'd try ascii art, but I know better :)

Regards ...... Charlie

> 
> Thanks again for your help. ;)
> > 
> > > 
> > > Can anyone shed any light of this?
> > > 
> > > TIA
> > >
> > 
> > Regards, ........ Charlie
> >
>




 
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/
 

<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