We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-08-03
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: ADC
Downloaded: 5394 times
Followed by: 1 user
License: MIT license
ADC 7 click is an advanced 32-bit analog to digital converter (ADC) which uses the LTC2500-32, a 32-bit oversampling SAR ADC with a configurable digital filter.
Do you want to subscribe in order to receive notifications regarding "ADC 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "ADC 7 click" changes.
Do you want to report abuse regarding "ADC 7 click".
Library Description
The library can perform 32bit AD conversion and can read this 32bit converted voltage value with or without configuration byte/bytes. Library also offers a choice to set configuration for the next conversion cycles. It is not necessary to set configuration for each conversion. A user always can perform conversion cycle/cycles with the last entered configurations. The user can read the converted voltage value as 32bit digital value or as a value calculated in the mV unit. For more details check the documentation.
Key functions:
uint8_t adc7_setConfig( uint8_t gainConfig, uint8_t downSampFactor, uint8_t filterType )
- The function performs the device configuration by sending configuration data to configure the next conversion cycle.void adc7_startConvCycle( void )
- The function generates the clock signal on MCK pin and on that way starts and performs the desired number of conversion cycles, determined by Down Sampling Factor number.uint8_t adc7_readResults( int16_t *voltage )
- The function reads 32bit converted voltage value from A/D converter and calculates this value to mV.Example description
The application is composed of three sections :
void applicationTask()
{
adc7_startConvCycle();
while (adc7_checkDataReady() == _ADC7_DATA_NOT_READY);
adc7_readResults( &voltageData );
LongToStr( voltageData, text );
mikrobus_logWrite( "Voltage: ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( "mV", _LOG_LINE );
Delay_ms( 200 );
}
Other mikroE Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.