ADS131A04 Example C Code
1.0.0
|
The ADS131A04 precision delta-sigma (ΔΣ) analog-to-digital converter (ADC) communicates using a serial peripheral interface (SPI) to allow for device configuration, control, and data retrieval. To interface the ADC with a microcontroller (MCU), the firmware or software engineer needs to know how to correctly configure their MCU's serial peripheral, sequence serial commands, and control the SPI timing of command bytes to the ADC. To assist in this process, this example code is intended to show how to initialize communication with the ADS131A04 at a high-level.
IMPORTANT: This code demonstrates how to use the ADS131A04 in Asynchronous Slave Mode (the recommended mode of operation for most applications), other SPI modes are not supported in this example. Examples of hamming validation are also not provided; however, examples of how to use CRC validation are included.
ADS131A04
Files: ads131a04.h, ads131a04.c
Description: Contains header and source files with register map definitions and high-level functions for interfacing with the ADS131A04.
Hardware Abstraction Layer (HAL)
Files: hal.h, hal.c
Description: The HAL provides processor specific functions called by the ADS131A04
module.
IMPORTANT: This module will need to be modified to work with your hardware!
Reference the ads131a04.c file while writing your own code for examples of how to perform typical ADC operations, such as register read/writes and reading data...
OR
Copy and paste the example code into your project, and update the files as needed to get access to the provided APIs...
ADS131A04
and HAL
module files into your firmware project.ADS131A04
module functions in your code.
IMPORTANT: This code was tested on an MSP432E401Y 32-bit ARM® Cortex®-M4F based MCU using TI Code Composer Studio's 18.12.4.LTS ARM compiler. Example code is provided to aid in the creation of your own software implementation and should not be considered as fully verified and end-equipment ready. Example code is written for readability and is not optimized for performance.
For questions or issues, visit the TI E2E Forums.
v1.0.0
- Initial release (3-20-2020)
BSD-3-Clause
Refer to the ADS131A04 Example C Code_1.0.0_manifest.html file for license text...