Getting Started with the ADS1672 and ADS1675 ADCs

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello--

I'm designing yet another Linux prototype system with an ADC. In the past, I've selected ADCs that are not necessarily compatible with the SPI bus on the AVR32.

However, I've recently located two interesting datasheets for ADCs that I think are compatible with the AVR32 bus under Linux.

The ADS1675 from Texas Instruments is a 24-bit ADC that samples at a maximum rate of 4Msps. Alternately, the ADS1672 ADC is another 24-bit ADC that samples at a maximum rate of 625ksps.

Both ADCs have a pin-switchable LVDS or CMOS bus.

Are these ADCs compatible with the SPI bus on AVR32 AP700x processors? And how would I write a kernel driver for this? Would I simply use a timer to take each sample?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just looked over the 1675, it should work in CMOS external clock mode. 3 8-byte reads in a single transfer should get all 24 bits out under one chip select.

Write a kernel driver pretty much how ever you need to. You could fire a timer at intervals, start a conversion and keep a read-only device file up-to-date. You could have it so that when userspace reads the device file the conversion starts, the read blocks until the conversion's complete then returns the value. Or you could generate an interrupt on drdy and start a new conversion from there running the whole thing at full speed.

Just depends what behaviour your userspace program expects/needs.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much for taking a look at this, S! It should be fun writing the kernel driver.

I am wondering how I might deal with the 24-bit transfer. I'm uncertain as to whether I have to write my own, similar to this post here:

http://www.at91.com/samphpbb/vie...

or whether there is support for this now in the kernel.

Thanks, S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 24-bit transfer will just be implemented as 3 successive 8-bit reads in one transfer. The chip select will only be de-asserted between transfers and the fact there's a small pause every 8th clock will go unnoticed by the ADC. You won't need to write your own anything. In fact the guy in that thread didn't have to write anything either, it's always been supported, but he didn't know it :-)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great to know that this was already supported in the kernel!

Thank you so much for clarifying this. As always, I really appreciate your help, S :-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all
can anyone help me with ADS1675, I am trying since two weeks and up to this time I cann't bring it to operate, I don't know what is the problem, I am using the ADuC7020 as a master and ADS1675 as a slave and enter DRDY pin to microcontroller as interrupt, but it seems there is no signal comes from DRDY because I've tried to measure it with oscillscope but no signal appeared, really know I have stuck , anyone has an idea please,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Dherar,

I actually didn't use the ADS1675 for my project (another chip was selected), but I think that it should work.

Check your serial interface select #LVDS and also the #PDWN inputs. Do you have pull-up resistors on these inputs, or can your microcontroller bring these inputs high? I assume that you are not using LVDS to interface with your microcontroller.

Do you have a pull-up resistor on the #CS pin? Do the power supply pins have the proper voltages?

Have you written a driver for the ADS1675, or are you using the spidev driver?

You may need to lower the #CS pin first before the DRDY pin becomes active. This will be done automatically if you read from SPI.

If the DRDY pin is attached to a pin on your microcontroller, is the pin set up as an input or an output? You may need to ensure that the pin is set up as an input.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A bus analyzer may also help you see what is happening, and if there is any activity on the SPI bus:

http://www.totalphase.com/
http://www.totalphase.com/produc...
http://www.saleae.com/home/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In addition, the newsgroup sci.electronics.design may be able to help you with interfacing to the ADuC7020 chip, which I believe is an ARM part.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hope this all helps :)

In my experience, it is usually something very small which is causing the problem. Check everything, such as the state of I/O pins, and whether the pins are set up properly. This is sometimes the most obvious problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you nkinar for you great tips, Frankly I am using serial interface #cmos, and pin #PDWN not connected I thought I don't need it because this pin is just to bring the converter down, about the #CS I connect it dircetly to groung I don't use either the spi pin or pull up resistance, a question arise here. should I use a pull up or a pull down resistance?, another thing I want to as about the #SCLK , what is the optimum speed I should use while I am using the data rate 125KSPS, should the frequency comes from the microcontroller the same or I should work with larger frequency

thank you very much hoping that I don't bother you with a lot of questions

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For using the CMOS serial interface, pin #LVDS (pin 30) should be brought high, either by connecting it to a microcontroller pin or by using a pull-up resistor (~100k). If the #CS pin is not being used, then according to the datasheet it can be tied low, but this will only work if you do not have any other devices on the SPI bus. To be safe, I would always tie the #CS pin high with a 100k pull-up to prevent voltage transients during startup from initiating a read. This may be the reason why your DRDY pin is not toggling. To be safe, I would have the microcontroller do one read from the ADC before initiating other samples.

Also ensure that SCLK_SEL must be high if your master is generating the clock. This could be tied high with a 100k resistor.

Look at pg. 26 of the datasheet. It appears that if #PDWN is low, then the device is shut off. If there is no internal pull-up resistor on this pin, then you might need an external resistor to bring this pin high.

Look at the evaluation kit schematics:

http://focus.ti.com/lit/ug/sbau1...

It appears that the #PDWN pin is connected to the master microcontroller.

As a general rule, I've found that you should never assume that a pin is unneeded. You should always connect all control pins to your microcontroller so that you can easily switch them on or off. In addition, pull-up or pull-down resistors can always be used to ensure the state of a pin. These are easily added to your PCB layout, and can be not soldered if these resistors are not needed during production.

According to the ADC datasheet, you need to be able to set the DRATE pins to ensure proper communication with the microcontroller.

So DRATE = 000 or DRATE = 011 only for the CMOS interface. There is more information on page 23 of the datasheet.

On pg.9 of the datasheet, the table with timing requirements for external SCLK shows that the minimum SCLK period is 25 ns. This implies that your SPI master must operate at a minimum of 40 MHz. I would start with setting your bus master to operate at a minimum of 40 MHz, and then increase the rate as required.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nkinar wrote:

On pg.9 of the datasheet, the table with timing requirements for external SCLK shows that the minimum SCLK period is 25 ns. This implies that your SPI master must operate at a minimum of 40 MHz. I would start with setting your bus master to operate at a minimum of 40 MHz, and then increase the rate as required.

If the minimum period is 25 ns, then the maximum frequency is 40 Mhz (not minimum) because t=1/f

Regarding tha DRDY pin of the ADC I had a similar problem with AD7766 connected to the SSC frame sync pin of an UC3A0512. It sometimes triggered the SSC other times not. I could see the steady DRDY pulse on the scope, so it probably was the SSC which did not manage to sample the pulse.

In the ADC datasheet the pulse was specified with duration 500ns which is very short compared to the SSC clock I was using.

The solution in my case was to use en external CD4040 counter and let the DRDY pin increment that counter. The SSC frame sync was connected to the Q1 output of the counter and set up to trigger on both edges.

As a "bonus" this counter will give lower frequency signals proportional to the sampling rate and that can be used together with an PLL to set the sampling rate with very high resoulution if desired. The ADC clock would then come from the VCO of the PLL, and the PLL reference is a low frequency signal form MCU timer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If the minimum period is 25 ns, then the maximum frequency is 40 Mhz (not minimum) because t=1/f

Yes, that's what I meant; I always get the minimum/maximum mixed up. ;-)

The solution with the external logic is also very interesting. Thanks for pointing that out, Heihopp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks nkinar also thank you Heihopp

I've tried to put a pull reisitance in the #PDWN pin but amazing happened the circuit appeared like short crt, I have put a 110K ohm resistane and connect one side to the pin and the other side to the 3VDD , then I disconnect it, I have noticed that when I approach my hand to this pin a circuit start to consume more current and appears like a short crt, I think about a noise could do that so I connect a capacitor for noise immunty with the pin but that doesn't solve the problem, I have increased the current limiter from the power supply to see how much current it will consuming while I am puting my fingure to that pin I read a 120mA more and without puting the fingure the crt consume 50mA and the difference is big I read in the data sheet that the current consumption for this deivce just 10mA , where the current go I don't know, another thing when I put the fingure I could recieve a data on the hyp. terminal from the ADC I don't know what is this data my be faulty data..?? is the ADC ruined ??
about the speed thank you for the correction, so can I drive this ADC with 1MHz or 2MHz source because there is no limit on the min. frequency???
thanks alot again

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ja it seem that you nkinar touch the pain when you told me take care of every pin specially #PDWN pin which causing the problem know and up to this time I couldn't have a respond from the DRDY pin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

so can I drive this ADC with 1MHz or 2MHz source because there is no limit on the min. frequency???

IMHO, I would say that you should start with a frequency of around 1 MHz and then gradually increase the SPI bus frequency. You're going to have to experiment with things to get everything started. The minimum frequency will most likely be set by your main microcontroller as a division of the system clock. I would perhaps start at around a frequency of 1 MHz and then see if you can read at a quicker rate. Note that if you are using the Linux spidev driver, this will be slower than what you may expect. You may have to write a kernel driver to pull data at the speeds that you require.

Quote:

another thing when I put the fingure I could recieve a data on the hyp. terminal from the ADC I don't know what is this data my be faulty data..?? is the ADC ruined ??

Is your ADC attached to your microcontroller? Is the microcontroller serial port attached to an RS-232 level shifter?

Could you use a function generator to check and see if your ADC is putting out proper data? I would try and and see if your ADC can digitize a sine wave. Then take the values that are output on the terminal and plot them using a program such as Matlab.

Quote:

is the ADC ruined ??

I don't know, but I've had this happen to me before as well. First thing is to check your schematic and see if every pin is wired up correctly. Then, make sure that every pin is soldered. Are there any traces or solderwick wire close to two pins? I would suspect that there is a short somewhere, or that all of the pins are not soldered properly.

If there is a short, you can use a low resistance ohmmeter such as this one to be able to find it:

http://www.eds-inc.com/leak.html

If you still can't find anything wrong with the schematic or with the soldering then I would replace the part. You should do this very carefully, either by having a technician do it for you or by using something such as solder with a extremely low melting point (ChipQuick).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would say that you should start with a frequency of around 1 MHz and then gradually increase the SPI bus frequency

I am using Quartz crystal oscillator (32MHz) as external clock which is connected to the pin #CLK but as you see in the block the diagram the SCLK speed must be higher than the CLK by 3 times since the transporting speed must be higher than the conversion speed and this is a high speed I don't have the tools to measure it or acquire it, therefore I have reduced the CLK to be 1 MHz so the SCLK speed could be 3MHz my microcontroller could deal with this speed.

Is your ADC attached to your microcontroller? Is the microcontroller serial port attached to an RS-232 level shifter?

Quote:

The ADC connected to the microcontroller through SPI and in turn the Microcontroller is connected to the computer through the openocd (JTAG) I acqire the data through the hyperterminal later on I will recieve the data through the UART.

Then take the values that are output on the terminal and plot them using a program such as Matlab.

Quote:

I don't think it is as easy as this. The output data is voltage or a hex. decimal or 2's compliment

using something such as solder with a extremely low melting point (ChipQuick).


Thank you for this info since I used the solder before with high melting point 310C