Hi,
we are working ADAS3022EDZ Eval board to communicate SPI through Arduino board. please help me
ADAS3022
Production
The ADAS3022 is a complete 16-bit, 1 MSPS, successive approximation–based analog-to-digital data acquisition system, which is manufactured on Analog Devices...
Datasheet
ADAS3022 on Analog.com
Hi,
we are working ADAS3022EDZ Eval board to communicate SPI through Arduino board. please help me
Bakyaraj,
As Jellenie accurately summarized we don't have any prepared example code for reference for the Arduino IDE that you could use directly. Depending on your sampling requirements we may be able to make suggestions as to how you might quickly prototype some code that will allow you to get started but which we can't guarantee will work over all conditions. To that end can you let me know the following.
1) How quickly do you intend to sample each channel? Please note that depending on your chosen Arduino target you are going to be limited to a fraction of the full data throughput.
2) Just to verify you are going to be using the multiplexed ADAS3022 and not the simultaneous sampling ADAS3023.
3) Assuming you are using the ADAS3022 are you planning on:
4) Which Arduino product are you using? Uno/Due other.
To get you started while you get back to me with specifics to the questions above I would recommend familiarizing yourself with the following.
1) The SPI Library and specifically using the Interrupt driven call
2) There are a number of Timer libraries available that would allow generation of the convert start signal which you could then also use to generate a spi transaction from within the same code for asynchronous operation or you could use the BUSY pin as an interrupt to synchronously trigger the spi transaction.
Anyways if you can prepare some answers to the question and get back to me we can at least attempt to put together a prototype flow that allows you to get started on development from a concept perspective with respect to connectivity and a state flow diagram. However, on the code side you'll need to rely a bit more on the Arduino users as the experts on how to implement the solution to optimize the conversion rate.
Sean
thanks for reply..
I beginner of the ADAS3022 .
Forum referred Arduino code to implemented to TMS570ls3137
I was faced issue for IN0/IN1 only take output remaining Channel output we are not able to read.
my code:
1.SPI we are using Polling method And 1Mhz frequency...
We have attached outputs
bakyaraj,
1) It looks like you attempted to implement the configuration sequence but you did not allow the conversion to complete before you started the rest of your data capture. If you have a us timer I would recommend adding a wait 1us between your clear_conversion(); statement and the readback.
// Configure Device
ADAS3022_Set_Conversion();ADAS3022_Clear_Conversion();
gioSetBit(spiPORT3, 0, 0);spiTransmitAndReceiveData(spiREG3, &dataconfig1_t, 8, HV_SPI_TX_Data_Master,&HV_SPI_RX_Data_Master[0]);gioSetBit(spiPORT3, 0, 1);
//DUMMY CONVERSIONS/*0-1*/ADAS3022_Set_Conversion();ADAS3022_Clear_Conversion();
ADAS3022_Set_Conversion();ADAS3022_Clear_Conversion();
2) Similarly in the channel code you'll need to add a wait or use busy going low as an interrupt to either asynchronously or synchronously time the transmission of the data word after convert start.
/*1-2*/ADAS3022_Set_Conversion();ADAS3022_Clear_Conversion();
gioSetBit(spiPORT3, 0, 0);
spiTransmitAndReceiveData(spiREG3, &dataconfig1_t, 1, HV_SPI_TX_Data_Master_1,&HV_SPI_RX_Data_Master[2]);
HV_SPI_Voltage[1] = (float) ((((float)HV_SPI_RX_Data_Master[2] / 32768.0) * INPUT_VOLTAGE_RANGE));gioSetBit(spiPORT3, 0, 1);
3) Finally I would recommend you verify your code conversion statement is correct such that the 16-bit signed data is correctly interpreted to generate signed integers. Given the float type I'm concerned the code will interpret the output at 0-65535 instead of -32768 to 32767. You can probably fix that by changing the inner cast statement to signed 16 bit integer cast and then float around that information when you do the divide by 16. I don't have an Arduino IDE or interpreter installed myself so I can't verify that I'm 100% correct but it should be easy for you to do so.
Hope that helps
Sean
thanks reply....
your comment to add in the micro seconds delay after conversion . still same behavior. please help. only we got one channel
Any Sequence mode and single ended mode example program please give me and help us...
bakyaraj,
One thing I noticed and forgot to mention last time I responded was to change your SPI mode to MODE 0, CPHA = 0, CPOL = 0.
I will be on holiday over the balance of the week but I'm going to ask a colleague to watch this thread. Please included updated timing diagrams of your code execution if the SPI Mode trick doesn't fix your readback. Please also indicate what your input conditions are so that we can help assess the trouble you are seeing.
Sean
my SPI configuration is SPI mode0 and CPHA =0 and CPOL =1 . now we changed update you
Spi configuration changed your comments.we have reading only single differential adc output remaining get wrong value.. Please help me.. I have ordered 2 more please... Develop board used to use external Spi communication. Hardware any setting need for the external Spi communication
Spi configuration changed your comments.we have reading only single differential adc output remaining get wrong value.. Please help me.. I have ordered 2 more please... Develop board used to use external Spi communication. Hardware any setting need for the external Spi communication