AnsweredAssumed Answered

AD6657 + HS_ADC_EVALC Problem. Please Help

Question asked by gudduarnav on Jun 3, 2015
Latest reply on Jul 3, 2015 by gudduarnav

Please help me regarding the problem i am facing..... Thank you in advance for your time and effort....

 

-> I have a EVALC board and a AD6657EBZ baord. Both are connected, powered from respective power adapter, and connected to my PC using USB cable.

->I have P501 connected/shorted, so that I can use Channel A.

->My question is , should I apply clock (Sine wave or Square wave), [I presume Sine Wave,Am I correct?] and the amplitude of clock signal? NOTE:I have a function generator Matravi FG-3000,which Iwant to use as a clock source.

 

->Second question is -With P501 jumper shorted, is ChannelA enabled? Do I need any further jumper connections?

 

-> Third question is, what should I do next to capture data. Ihave read the guide, but till now Iam not successful to get data.

->Ihave used VisualAnalog, but still failed.

-> Ihave a custom C# application made to capture data, but it returns 0 data.

 

-> The important partof code code are:

public string FPGA

        {

            set

            {

                SelectDevice();

                int err = ADIFIFO.FPGAConfigure(value);

 

                if (err != ADIFIFO.ERR_SUCCESS)

                {

                    StringBuilder sb = new StringBuilder(512);

                    sb.Clear();

                    ADIFIFO.GetErrorMessage(err, sb);

                    throw new IOException(string.Format("Error burning FPGA file {0} [Error Code:#{1} :{2}]", value, err, ADIFIFO.GetErrorMessage(err)));

                }

            }

        }

 

        public bool Capture(int delay_ms)

        {

            SelectDevice();

            int err = ADIFIFO.FillFIFOs(delay_ms);

            return err == ADIFIFO.ERR_SUCCESS ? true : false;

        }

 

        public bool ReadSamples(int channels, byte[] buffer, int offset, int length)

        {

            GCHandle hbuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned);

            SelectDevice();

            int err = ADIFIFO.CaptureFIFO_Bytes(hbuffer.AddrOfPinnedObject() + offset, length, (short)channels);           

            hbuffer.Free();

 

            return err == ADIFIFO.ERR_SUCCESS ? true : false;

        }

 

->

The client program is:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using Arnav.Quartz.Devices.AnalogDevices.EvalBoard;

 

namespace EVALC.Demo1

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("API# {0}", EvalBoard.APIVersion);

            Console.WriteLine("Board Count = {0}", EvalBoard.BoardCount);

            for (int i = 0; i < EvalBoard.BoardCount; i++)

            {

                Console.WriteLine("Device #{0} : {1} [{2}]", EvalBoard.BoardInfo[i].ID, EvalBoard.BoardInfo[i].Name,EvalBoard.BoardInfo[i].Firmware);

            }

 

            Console.WriteLine();

 

            try

            {

                EvalBoard b = new EvalBoard(0);

                Console.WriteLine("{0} : {1} [{2}]", b.Info.ID, b.Info.Name, b.Info.Firmware);

                b.FPGA = "AD6657_64k.bin";

                Console.WriteLine("FPGA copied successfully");

 

                while (!Console.KeyAvailable)

                {

                    Console.WriteLine("Capture = {0}", b.Capture(1000));

 

                    byte[] buffer = new byte[16 * 1024];

                    Console.WriteLine("Read data={0}", b.ReadSamples(1, buffer, 0, buffer.Length));

                   

                    for (int i = 0; i < buffer.Length; i++)

                    {

                       

                        Console.Write("{0}\t", buffer[i]);

                      

                    }

                }

                Console.ReadKey();

            }

            catch(Exception ex)

            {

                Console.WriteLine("{0}", ex.Message);

            }

            Console.ReadKey();

        }

    }

}

 

 

 

-> The code above shows my board information, but captured data printed on screen are all 0. No noise or anything.

->Please guide me through the board setup, so that Ican work atleast with Visual Analog or FIFOInterface.h api.

Thank you all again.

Outcomes