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.

ADC12DL3200EVM: ADC12DL3200: How to read ADC Register in ADC12DL3200EVM Board through SPI interface.

Part Number: ADC12DL3200EVM
Other Parts Discussed in Thread: ADC12DL3200, , DAC12DL3200

Hi, 

I want to read ADC12DL3200 Register ADC12DL3200EVM in Python 3 environment

But  ADC12DLxx00EVM GUI is base on Python 2 ver.

So I want to control direct access without your ADC12DLxx00EVM GUI

Could you send me SPI Control example as python?

I have gotten python example for DAC12DL3200 version

Best Regards

Michael Lee

  • Hi Michael,

    Please take a look at the attached files. I believe that I have modified everything such that it will successfully work for the ADC12DL3200EVM, however please do note that I have not verified this myself in the lab using an ADC12DL3200EVM. This DLL is still in the early stages as we are trying a new approach to support EVM control using Python/MATLAB/etc. As such, we are still testing all features out, so it is possible there may be bugs, however, I myself have used this DLL for controlling other EVMs regularly over the last few weeks and we believe most bugs are squashed.

    Please give this a try and let us know the result. As you will find, I have included a few example function calls to show how to use the read/write function for single register as well as multiple register read/write.

    [Link has been removed due to a mistake in the included script] - Please see the corrected files at the link at the bottom of this thread.

    Regards, Chase

  • Hi, Chase

    I executed the code what you Attached code(ADC12DL3200EVM.zip)

    It seems that Register does not read normally.

    Any Register in  ADC12DL3200 only read value as 0xff.

    Best Regards

    Michael

  • Hi Michael,

    Thanks for letting me know. I will setup an EVM today and find out what it is that I overlooked. Kindly await a response.

    Regards, Chase

  • Hi Michael,

    I've tested this on a board just now and have found the issue. The MOSI and MISO parameters were swapped in my DLL call, my mistake. Please use the following attached script. In this script, you'll notice a few things have changed as I've updated the initSPIdev call section also to avoid opening the same FTDI bus twice for the LMK and LMX devices. If you run this ADC12DL3200EVM_SPI_Control.py file, you should see the following printed to the console.

     

    ADC12DL3200EVM_SPI_Control package

    Regards, Chase

  • Dear Chase

    I have succeeded to check the register through the attached source what you send (ADC12DL3200EVM_SPI_Control package)

    Best Regards,

    Michael

  • Hi Michael,

    Excellent! I am glad to hear it worked the same for you. Would you consider this example script to be a convenient feature for our development boards? As I mentioned, it is new and I am just trying to gather feedback for our team on how we may best implement this moving forward. Slight smile

    Regards, Chase

  • Hi Chase

    I think that example script is convenient feature.

    As you know, I already got python example for DAC12DL3200 version from Neeraj Gill (TI application engineer)

    Because your first python source is not operated, 

    I try to convert  DAC12DL3200 version to ADC12DL3200 version, the result is successful.

    I think your source is best but ADC12DL3200 version should merge or have compatibility with DAC12DL3200 version.

    It is only my opinion.

    Best Regards

    Michael

  • Hi Michael,

    I'm not familiar with what Neeraj may have given you. I will be sure to discuss with him tomorrow and compare what we have provided. I would like to thank you for the feedback. Please do let us know if you've any additional questions.

    Regards, Chase

  • Dear Chase

    Thank you so much for your feedback.

    Nerraj use sync bitbang with program file's C:/Program Files (x86)/Texas Instruments/ADC12DLxx00EVM GUI/Pattern Files/ txt files

    Best Regards,

    Michael