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: 2019-08-07
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Digital potentiometer
Downloaded: 3665 times
Not followed.
License: MIT license
POT 3 Click is a Click board with the accurate selectable reference voltage output. By employing a high-quality 11mm, metal shaft potentiometer, this Click board can provide very accurate voltage output.
Do you want to subscribe in order to receive notifications regarding "POT 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "POT 3 click" changes.
Do you want to report abuse regarding "POT 3 click".
Library Description
This library allows user to check the output voltage (VOUT) of the POT 3 Click board. User can get the output voltage as 12-bit digital value (ADC only), or as averaged value calculated to millivolts (ADC + calculations). The AD converted value can be read as one conversion sample, or as averaged value with desired number of conversions. For more details check documentation.
Key functions:
uint16_t pot3_read_adc( void )
- This function reads the result of AD conversion.uint16_t pot3_get_vout( uint8_t vref_sel, uint16_t nSamples )
- This function returns VOUT value calculated to millivolts, with desired number of AD conversions included in calculations.Examples description
The application is composed of three sections :
void applicationTask()
{
voltage_mv = pot3_get_vout( _POT3_VREF_2V, 2000 );
WordToStr( voltage_mv, text );
mikrobus_logWrite( "** VOUT : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " mV", _LOG_LINE );
mikrobus_logWrite( "*******************************", _LOG_LINE );
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.