This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Interfacing 6713 with ADS7881EVM

Expert 2370 points
Other Parts Discussed in Thread: ADS7881EVM, ADS7881

Hi,

I am a novice to this DSP and interfacing world. I have to interface an ADC with C6713 processor, I got ADS7881EVM which is 12-bit ADC along with 5-6K interface board but I am having difficulty understanding how the DSP will interface with ADS7881EVM and 5-6K interface board. I would really appreciate if some one help me getting started or tell me any documents which describes briefly how this could be done.

Looking forward for yourhelp.

BR,
EE

 

  • There's an application note for "Interfacing the ADS7881 to TMS320C6713 DSP" linked from the product page for the 5-6k interface board: http://focus.ti.com/docs/toolsw/folders/print/5-6kinterface.html

  •  

    I already have gone through that document, it explains how ADS7811EVM and 5-6K interface board should be attached but it doesn't say any thing about attaching them with 6713 processor. What should I do now ?

  • The 5-6K document referenced by the appnote explains how to connect the 5-6K interface board to the DSK: http://www.ti.com/lit/pdf/SLAU104

     

  • Hi,

    I went through both the documents and what I understood is that the ADS7881EVM plugs onto the 5-6K Interface Board in the following manner i.e. socket P1 of ADS7881 will be plugged to connectors J10 (analog) of 5-6K Interface, socket P2 of ADS7881 will be plugged to connectors J18 (control bus) of 5-6K Interface and socket P3 of ADS7881 will be plugged to connectors J17 (data bus) of 5-6K Interface. JP5 socket on 5-6 Interface will be used to power the the EVM.

    The memory and peripheral slot of C6713 will be plugged to the same slots of 5-6K Interface.

    Then there are some Jumper Settings for ADS7881EVM and 5-6K Interface board that are different from the default setting, should that be changed according to the settings mentioned in the documents ? I am asking this because most of the settings are Ok but some need to be change.

    One last thing, is J2 socket on the ADS7881EVM is the point where I will apply analog signal to be sampled ?

    As mentioned before I didn't have any prior knowledge of working with DSPs and ADCs. I don't want any equipment to be damagh thats the reason I am seeking step by step guidance.

    Looking forward for further help.

    Thanks.

     

     

     

  • Unfortunately, I do not have a 5-6k interface board or an ADS7881 EVM in front of me so I can only assume that the documentation is correct.  If you do need in-person assistance, I would recommend contacting your local TI FAE/Sales office for direct support.

  • Hi,

    I went through more documents and understood how ADS7881EVM and 5-6K Interface board should be conneted to C6713 DSK but I am little confuse about external power supplied to 5-6K Interface board or ADS7881EVM.

    For example, on 5-6K Interface board, three port terminals J1 and J2 and two ports terminals J6, J8, J9 and J11 are external power connections. Do I need to apply external supplies to those terminals ?

    Likewise, on ADS7881EVM, TP11, TP10, TP12 and TP14 are power connectors, do I need to apply external power to these ports ?

    I am really confuse, Can you please specify the ports on 5-6K Interface board and ADS7881EVM where I need to apply power in order to make it operational ?

    I am really eager to make it work. I will appreciate your quick help.

    Best Regards

  • Chapter 6 of the User Guide is fairly clear about power:

    User Guide said:

    The EVM accepts four power supplies.
    • A dual ± Vs DC supply for the dual supply op-amps. Recommend ± 12VDC supply.
    • A single +5.0 V DC supply for analog section of the board (A/D + Reference).
    • A single +5.0V or +3.3V DC supply for digital section of the board (A/D + address decoder + buffers).

    There are two ways to provide these voltages.

    So we know that the EVM must be supplied with 4 external voltages and there are two options for doing this.

    User Guide said:

    • Wire in voltages at test points on the EVM. See Table below.
    Table 7. Power Supply Test Points
    Test Point Signal Description
    TP11: +BVDD Apply +3.3VDC or +5.0VDC. See respective ADC datasheet for full range.
    TP10: +AVCC Apply +5.0VDC.
    TP12: +VA Apply +12.0VDC. Positive supply for amplifier.
    TP14: – VA Apply -12.0VDC. Negative supply for amplifier.

    So the first method is to apply the voltages directly to the specified test points (TP).

    User Guide said:

    • Use the power connector J1, and derive the voltages else where. The pin out for this connector is
    below. Set jumper W5 to short between pins 1-2 or pins 2-3 to short +3.3VD or +5VD, respectively, to
    be the buffer digital supply (+BVDD).
    Table 8. Power Connector, J1, Pin Out

     J1-1: +VA (+12VA)
     J1-2: –VA (–12VA)
     J1-3: +AVCC(+5VA)
     J1-4: N/C
     J1-5: N/C
     J1-6: AGND
     J1-7: N/C
     J1-8: N/C
     J1-9: +3.3VD
    J1-10: +5VD

    The second option is to make your own power cable using the J1 connector with the provided pin-out.

  • Thanks tlee. I really appreciate your help.

    But you didn't say any thing about 5-6K Interface board, three port terminals J1 and J2 and two port terminals J6, J8, J9 and J11 are external power connections on 5-6K board. Which terminals I need to apply power there ?

    Please help me.

     

  • I would recommend applying power as defined in the user guide:

    User Guide said:

    Power Connections to the Interface Card
    The screw terminals along the bottom edge of the Interface Board give access to the common power bus.
    Three-port terminals J1 and J2 provide analog power. Two-port terminals J6, J8, J9, and J11 provide the
    digital voltages. Two jumpers, W2 and W3, located on the Interface Board give the user the option of
    using DSK +5 V and +3.3 V for the digital power. Analog power must be supplied from an external source.

    J1: ± VA ( ± 18 V Max) Analog Voltage — provides analog power for signal conditioning, sensor boards, amplifiers, etc.
    J2: ± 5V ( ± 5.5 V Max) Analog Voltage — provides analog power for signal conditioning, sensor boards, amplifiers, etc.
    J6: +5 (5.5 V Max) Digital Voltage — power to digital logic - ADCs, DACs, etc.
    J8: +VD (undefined) Digital Voltage — Reserved for future use
    J9: +1.8 V (2.3 V Max) Digital Voltage — core logic voltage for Codecs etc.
    J11: +3. 3 V (3.7 V Max) Digital Voltage — power to digital logic – ADCs, DACs, etc.

    If this is not clear, please contact your local sales/FAE office for direct support.

  • Thanks tlee, I really appreciate your kind help and suppot.

  • Hi,

    I interfaced ADS7881EVM along with 5-6K Interface board to C6713 DSK and run the following code given below.

    http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=slaa257&fileType=zip

    But I am not getting any thing when I check the contents of dataPing and dataPong.

    Can you please provide me working code for this ADC with C6713 DSK ?

    How can I check if I have interfaced the card correctly ? I provided all the analog signals as written in documents and used jumper settings to provide digital voltage to 5-6K Interface board.

    I will appreciate your quick response.

    Thanks.

  • Hi BAS,

    I'll try to get the author of that application note to contact you directly.

  • Hi Tom,

    Thanks for your kind note.

    I have used the code example given at the following website but it doesn't seem to work.

    http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=slaa257&fileType=zip

    I have used all the settings as mentioned in the documents. I really need a working code for ADS7881 compatible with C6713 DSK.

    I will appreciate your quick response.

    Thanks.

  • BAS,

    Please try the attached project.  You also need to be sure you attach analog power to wither the EVM directly or to the 5-6K interface board.  The main.c file in this attachment explains the power requirements and jumper settings needed for the interface card as well as the ADS7881 EVM.

    ADS7881-DSK6713.zip
  • Hi Tom,

    I couldn't get time to implement this project before but today I have done this but sine wave is not sampling correctly. When I plot the values of r_buffer array that contains the sampled values, instead of sine wave, an unproper square wave is showing. Although I have changed all the jumper settings according to whatever mentioned in the main.c file.

    Main.c file says to do the following things which are mentioned below in red but I don't know where and how to do it.

    The following settings need to be made in the DSP / BIOS configuration tool:                

    If the BUSY\ interrupt polarity is High-to-Low. Mapping of the interrupt for the DMA channel selected in the configuration tool to: ADS7881_rblock_finished

    If the BUSY\ interrupt polarity is Low-to-High. Mapping of the BUSY\ interrupt for the CPU to: DCP_readData  

    Second thing is that, I made all the power connections according to SLAU104. But main.c file says to apply it in the following ways.

    Power connections on the 5-6K Interface Board: J1: +/- 12V  J2: +5V         

    And it says nothing to apply on ADS7881 EVM. 

    What should I do in this case ? Follow main.c file or apply to ADS7881 EVM accoring to SLAU104 ?

    I will appreciate your quick help.

    Thanks.

     

     

  • Thanks Tom for your reply.

    Please find below detail of problems and what I have done..

    I have been trying to interface ADS7881 along with 5-6K Interface Board with C6713 DSK to get it working but I haven't succeeded yet. At first place, I interfaced the card and applied all the analog power to ADS7881 and 5-6 board as told by SLAU104 document and ran the code given at TI's webssite but it didn't work.

    Then I used the code given by you that can be found here:
    http://e2e.ti.com/support/data_converters/precision_data_converters/f/73/p/66255/252230.aspx

    Jumper settings and analog voltages to
    5-6K Interface Board marked in main.c file are different from what mentioned in SLAU104. Main.c says nothing about analog voltage applied to ADS7881 EVM.

    MAIN.C says to apply analog signals to 5-6K Interface Board in the following ways:
    J1: +/- 12V  and J2: +5V.


    This is how I applied analog signal to ADS7881 EVM:

    TP11: +BVDD Apply +3.3VDC or +5.0VDC.
    TP10: +AVCC Apply +5.0VDC.
    TP12: +VA Apply +12.0VDC. Positive supply for amplifier.
    TP14: – VA Apply -12.0VDC. Negative supply for amplifier.

    This is how I applied analog signals to 5-6K Interface Board:

    J1: ± VA ( ± 18 V Max) Analog Voltage
    J2: ± 5V ( ± 5.5 V Max) Analog Voltage

    I changed the jumper settings but applied the analog power in the same way as mentioned in SLAU104 and ran the code, the code is running fine but when I plot the values of r_buffer, it showed very strange weveform even though input is Sine Wave with Amplitude I Volt and Frequency 2KHz.

    I am really confused and don't know what to do. Should I apply analog voltage in the same way as mentioned in main.c file and remove all the connections from ADS7881 EVM ?

    Can you please tell me what jumper settings and analog voltages should be used with this code to make them work ? I have spent so much time but didn't succeed yet. Please help me.

    I will appreciate your quick reply.

    Thanks.

  • OK -

    Mapping of the power from the 5-6K interface to the ADS7881EVM is basically shown in the schematics for these boards (review the associated Users Guides).  The screw terminals on the 5-6K interface feed into the male pins that J1 on the EVM plugs onto.  You don't need to apply power to both the screw terminials and the test points, one or the other is fine.  Please send a screen shot of the waveform you do see.

  • Hi Tom,

    I applied jumper settings in the same way as mentioned in MAIN.C file for ADS7881 EVM and 5-6 Interface Board. I removed all the connections to ADS7881 EVM and applied the power to 5-6 Interface board in the following ways:

    J1: +/- 12V ; J2: +5V

    Is that correct power connections now ?

    Please find below screen shot:

    http://i56.tinypic.com/2dh9tms.jpg

    Buffer size is 1024 and each graph has been saved after refreshing the previous values.

    Waiting for your response.

    Thanks.

     

  • Please reply...

  • Hi BAS,

    Check the digital supplies with a multimeter, if the jumpers on the 5-6K Interface board are properly set, you should see either +3.3 or +5V at Tp11 referenced to TP5.  On your CCS graph, you've got peaks at something like 55000, parts of your sine wave are there, so you might want to check the reference voltage as well.  Right click on the graph and let me know how you have the properties set.

  • Hi Tom,

    I can see +5V at TP11 with reference to TP5.

    I am also attaching snap shot of graph properties which I have set.

    http://i53.tinypic.com/t8t6yb.jpg

    Jumper settings are Ok according to my perspective but it might be so that I did mistake in identifying PIN numbers on 5-6 Interface Board.

    For example, following page # 09 (5-6 Interface Board Top View Diagram) on the given below link:

    http://focus.ti.com/lit/ug/slau104c/slau104c.pdf

    I assumed the right most PIN of  W2, W3, W6, W7, W12 and W13 Designator are PIN Number # 1 and accordinly set them on 5-6 Interface Board. Is that right assumption ?

    MAIN.C also states this:

    If the BUSY\ interrupt polarity is High-to-Low. Mapping of the interrupt for the DMA channel selected in the configuration tool to: ADS7881_rblock_finished

    If the BUSY\ interrupt polarity is Low-to-High. Mapping of the BUSY\ interrupt for the CPU to: DCP_readData  

    I don't know if that suppose to be done, if yes, please tell me how to do it.

    Waiting for your response.

    Thanks Tom. I apreciate your help.

  • HI BAS:

    I am not sure if you already aware of  this or done it, but from working with C6000 and C5000 DSP DSK boards in the past, and as we also states in our DSK user guides, when using TI daughtercards, you need to pull down the DC_DETECT pin (pin 75 on the peripheral expansion connector). Pulling this pin low will enable the power supply and data buffers to the daughtercard connectors.

    Also , we state that “ The X_RESET pin (pin 59 on the peripheral expansion connector) is used as a daughtercard reset. When power is applied to the DSK the X_RESET will be held low until the power supplies are stable then driven high by the CPLD. For most daughtercards this provides the desired reset behavior. However, you can reset the daughtercard again in software by toggling the DC_RESET bit in the CPLD register. See the 6713 DSK help file for more information about the CPLD registers.”

    Hope this helps.

    Regards,

    Naser

  • Tom,

    Sorry I meant to say left most pins.

    I assumed the left most PIN of  W2, W3, W6, W7, W12 and W13 Designator are PIN Number # 1 and set them according to MAIN.C file.

    Are those assumptions correct ?

  • Hi BAS,

    Yes, the leftmost pins are pins 1-2.  The figure you refer to on page 9 of the 5-6K Interface Users Guide shows the default jumper settings for the board.  Uou should use those settings with one modification - move the shunts at W2 and W3 to the right to cover pins 2-3.  Doing this will provide the ADS7881 EVM with digital power.  You still need analog power, so keep the J1 = +/-12V and J2 = +5V that you had previously.

  • Hi Tom,

    I applied jumper settings as mentioned in MAIN.C file, I also looked at W2 and W3 and they are at the same position as you mentioned.

    Please have a look over the snapshot:

    http://i52.tinypic.com/r87beh.jpg

    Input voltage is 1V (peak to peak), I also applied offset of 1V by adjusting R25 on 7881EVM and Frequency is 5KHz. First diagram shows pretty well (almost same as the input voltage) but when I refresh I got figures as shows in diagram  2 and 3 which shows high offset and distorted waveform.

    What could be the reason for that ?

    I realized ADS7881 has unipolar input and and -ve input of the operational amplifier is grounded. Is that the reason for not getting the proper output ?

    Please help me..

  • Hi BAS,

    What you are seeing in the first graph is correct - the conversion result is only 12-bits but the software is showing it as 14-bits with an offset.  If you increase the amplitude so that the signal saturates you should see a code spread from 65535 to 16380.  The anomolies in the second and third graphs may be due to your 'refresh' request.  Try adding a probe point in the main.c file at the line which sets AdsBusy = 1; in the while(1) loop.

  • Hi Tom,

    When I put a probe point at AdsBusy = 1; line, I do see continue sine wave. I am really happy and thanks a lot for your persistent support.

    One thing I would like to share, I am using a coupling capacitor at the input because it is clipping without capacitor. The input to ADS7881 is unipolar, therefore I am using it. Is it Ok to use that ?

    How can I scale my output for example to see exactly the same amplitude as input is ?

    Thanks.

  • I also would like to know how can I change the sampling rate for ADS7881 ?

    Thanks.

  • Hi BAS,

    Since it is Xmas eve...  here is my gift to you, please find attached a Simple_Main.c file that you can add into your project.  Simply copy this into your working directory and from CCS, through the Project menu - >'Add files' to project and click on Simple_Main.c.  Back in the project manager, right click on the original main.c and choose 'Remove from Project'.

    This revised file does not use all the cache and DMA features of the DSP, so it is much easier to follow what's going on.  The CONVST mechanism here is actually one of the timers (specifically Timer 1).  If you run the project as is, you should see a square wave of ~351kHz on pin 19 of P2 on the ADS7881EVM.  You'll need to connect that into pin 2 of W2 via a jumper wire.  Just remove the shunt from W2 and use a clip lead or carefully add a short piece of bus wire. 

    You will also need to assign the ExtINT5_ISR function to HWI5.  To do this, expand the DSP/BIOS Config folder in the project manager window.  Right click on ADS7881-DSK6713.cdb and 'Open' the file.  Expand the 'Scheduling' folder, and then expand the 'HWI-Hardware Interrupt...Manager'.   Right click on HWI_INT5 and select the 'Properties' option.  In the General tab, enter "_ExtINT5_ISR" (yes, you need the underscore!).  In the Dispatcher Tab, click on 'Use Dispatcher' and accept the defaults.  Click OK, close the CDB file (say yes to saving changes) and then re-compile and RUN the code.

  • Hi TOM,

    Thanks a alot for your precious gift.

    But it's not working. I did all the way as you advised me but I don't see any square wave at PIN 19 of P2. Although I connected that into pin 2 of W2 but I don't see any thing excepot noise while plotting r_buffer. You can have a look on the output graph of r_buffer.

    http://i53.tinypic.com/73capy.jpg

    I examine the code using break point, it never get into void ExtINT5_ISR(void) function. This code keep running even I put breakpoints at different line. AdsBusy is always 0 wich clearly means that no transfer of data is being done.

    Last thing is that I really don't know what will happen using this code ?

    Waiting for your help.

     

     

  • Sorry BAS,

    My mistake here - I told you to connect W2 pin 2 into P2 pin 19 and it should be P2 pin 17.  The timer is generating a CONVST signal, fed through P2.17 into the CONVST input of the ADS7881.  The ADS7881 generates BUSY which is then fed into EXT_INT5 on the DSP.  Will try to put it all together for you in a new 'complete' project.

    ADS7881_BAS.zip
  • Hi TOM,

    Thanks a lot for your kind support and help. Its working fine now and the waveform looks even better.

    However I would like to ask the following things:

    Timer1 Input Clock = 225E6/4 = 56.25 MHz.

    So, Sampling frequency = Fs = 56.25e6 /( Period Value)

    is Period Value mean Period Register (PRD) of Timer1 here ?

    Right now PRD is set to 50 Hex, should I change this to get the desired sampling Frequency ? OR

    How to change the Fs ?

    Thanks.

  • Hi BAS,

    Great!  Glad to here things are working for you (finally!). 

    Yes, the Period Value is the entry in the PRD register; however it's x2.  With PRD = 50hex you have FS = 225M/4/(PRD*2) or about 351kHz on the timer output/CONVST input.

  • Hi TOM,

    Yes I am very glad to see it working.  I am really thankful to you.

    However, I was trying to convert the sampled values back to voltage the following way:

    float buffer_involt[BLOCK_SZ];
    float maxAdcBits = 4095.0f; 
    float maxVolts = 2.5f;      // Vref
    float offset = 0.5f;          // ADS7881 Offset

    buffer_involt[i] = (maxVolts-offset)*(float)r_buffer[i]/maxAdcBits;

    Please find attached snapshot of waveform.

    http://i56.tinypic.com/105eeef.jpg

    In the first diagram, there is no offset and input voltage is 1V which in turns giving 0.939V after using the formula given above.

    In the second diagram, offset has set to 0.5V according to Oscilloscope and input signal is still 1V. Now graph doesn't show 0.939V.

    What am I doing wrong ?

    One more thing, can you please suggest me any training course by TI or any other advise to get good command over DSP ? I still don't know how to work with EDMA, McBSP, Interrup and etc.

    Thanks for your valuable support and time.

     

     

  • OK -

    On the 20th you adjusted the offset via R25 and on the 21st you added a cap to the analog input (ahead of the amplifier I suppose) because the signal was clipping.  The front end amp is powered in a bipolar fashion and the adjustment on R25 adds a DC bias (offset) to the output of U2 (input to the ADC).  On my board, the voltage at TP4 is about 660mV.  You should be able to input a 2.5V pk-pk signal and adjust R25 so that your conversion results are centered around code 2048 (0x800).  You should not need the offset term in your algorithm.

    Here is a link to some training sessions offered for the C6000 family of processors:

    http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=4DW102260

     

  • Thanks Tom.

    I will check the way you advised.

     

  • Hi TOM,

    I input a 2.5V p-p signal and adjust R25 so that voltage at TP4 is about 660mV. You can see the attached snapshot. I am not using any capacitor now. Is it ok to have this much error OR it can be improved ?

    http://i52.tinypic.com/2mff2pk.jpg

    I am willing to insert an FFT algorithm inside the function 'void  ExtINT5_ISR(void)'. Is it efficient way to meet real-time requirement ? I heard PINGPONG is best way to meet real-time requirement because you don't miss any samples during the time FFT performs but I don't how to implement that.

    Can you please put some light over this issue ?

     

     

  • The captured data seems OK - I can't tell if you are centered or not in the 0-4096 code range, but you should be able to input a constant 1.25VDC and adjust R25 to mid scale.  To implement a ping-pong buffer you need to declare two arrays.  You could define 'PING' as 1 initially and when you jump to your ISR have a case statement, if PING, else PONG changing the state of your ping variable as needed to switch between the two buffers.

  • Hi TOM,

    I was trying to figure out how you have configured the MCBSP with Timer to collect the sampled data ? I can see how Timer has been set up but couldn't understand how MCBSP is connected to Timer and how this Timer-MCBSP thing is working. I want to have basic knowledge about controlling MSBSP and other ports like EDMA. Your little push is required to explore this DSP in depth.

    I implemented FFT algorithm with the project you have given, I set the clock and realized that 1024 Point FFT is taking some thing like 2.2 millisecond which is quite muc from real-time point of view. How can I improve the system to meet real-time requirement ?

    Really need your help.

    Thanks.

  • BAS,

    The timer is being used as the CONVST input to the ADS7881.  The BUSY output is connected to an external interrupt.  There is an ISR that calls the McBSP transfer so there is no real (direct) relationship between the McBSP and Timer.

  • Hi TOM,

    I understood that but I meant to say how MCBSP port 1 and 2 bas been configured ? For example, MCBSP 0's configuration is given below, how they have set up ?

    MCBSP_Config mcbspCfg0 = {
        0x00000000,        /*  Serial Port Control Reg. (SPCR)   */
        0x00000000,        /*  Receiver Control Reg. (RCR)   */
        0x00000000,        /*  Transmitter Control Reg. (XCR)   */
        0x302702FF,        /*  Sample-Rate Generator Reg. (SRGR)   */
        0x00000000,        /*  Multichannel Control Reg. (MCR)   */
        0x00000000,        /*  Receiver Channel Enable(RCER)   */
        0x00000000,        /*  Transmitter Channel Enable(XCER)   */
        0x00000A00         /*  Pin Control Reg. (PCR)   */

    };

    I read TMS320C6000 Peripherals Reference Guide (SPRU190D) and it's giving me headache.. I couldn't figure out how MCBSP is being used to transfer sampled data from A/D to buffer ?

     

  • Hi TOM,

    I am still waiting for your reply.

    One more thing, I was trying to run the code and save around 1 Million points in buffer and then transfer them to TEXT file. But I am getting memory allocation error, that probably because I don't have much spane.

    But I think I can use SDRAM to store those values. Can you please tell how can I use SDRAM or initialize this memory using DSP/BIOS ?

    I will really appreciate your help.

    Thanks.

  • hi BAS -

    Sorry - i was scratching my head trying to figure out why you are asking about the McBSP; the ADS7881 has a parallel interface and the simple code I sent you is not using the serial port.  I see in my previous post that I mentioned a McBSP call from the ISR, but that must have been residual from another conversation with someone else.  The ISR simply reads from an address (the one associated with the EVM) on the parallel bus. 

    There is a forum for the C6000 series DSP - C67x Single Core DSP   where you might try to find some ideas on how to partition/configure your memory.

  • hi TOM,

    ADS7881cfg.c contains MSBSP structures thats why I asked how are they using to get sampled data.

    Ok. I will ask Single Core DSP forum.

    Thanks alot.