Part Number: AMC7836EVM
I recently purchased the AMC7836 Evaluation Module, however I wanted to stop being limited by the software provided in labview so I wrote a code in Python 3.7, which was implemented on a raspberry Pi that is used to control the AMC7836EVM. But I have had some doubts and problems reading ADC and Temperature.
The biggest doubt I have is when accessing the addresses to read the information from the ADC's or the temperature, this is divided into two addresses, Low Byte and High Byte, does it matter what order I access these addresses? If so, which one should I access first, Low Byte or High Byte?
I tried to change the order in which I access the addresses and the information I read is different, should this happen or am I doing something wrong?
One of the problems I have been having when reading the temperature is that sometimes the temperature that I read seems to be right, other times the temperature read is in the order of ~ 9º or even ~ 900º, which is clearly not right.If anyone can explain my doubts I would be very grateful.
Make sure that you are issuing a REGISTER_UPDATE command before reading the high and low byte. Do not issue a REGISTER _UPDATE command between the two reads. If you are still getting un-reliable data, I suspect you could have misformatted the SPI frame. You might want to confirm the format is correct with an oscilloscope or logic analyzer.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Paul_Frost:
Thank you for your answer, unfortunately that is not the problem. I thoroughly revised my code to confirm that the REGISTER_UPDATE command was not executed between reading the low and high byte, and I didn't encounter any problems.
As for the SPI frame, I also confirmed that it is correct. I have been using the xfer2 instruction from the spidev library to send the data and each word I send contains 8 bits, however yesterday by increasing the delay between each word sent I significantly increased the stability of the values read by the ADC's, and the stability temperature reading has also increased but still has some instabilities, now reading temperatures between 16º and 45º.
In reply to Rui Fernandez:
Can you capture the SPI transaction on a scope or logic analyzer and share the results? It could be an edge timing issue as well. In addition, if you are fly-wiring the RPI to the EVM, then you might need to try slowing the SPI clock. What frequency are you using?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.