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-02-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Measurements
Downloaded: 4046 times
Not followed.
License: MIT license
POT 2 click is a Click board with the accurate selectable reference voltage output. By utilizing a multi-turn precision potentiometer, this Click board can provide very accurate voltage output on the AN pin of the mikroBUS.
Do you want to subscribe in order to receive notifications regarding "POT 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "POT 2 click" changes.
Do you want to report abuse regarding "POT 2 click".
Library Description
The library contains the functions needed to start and read the ADC values.
Key functions:
void pot2_adcInit()
- ADC Init function.void pot2_adcSetInputChannel()
- ADC set input channel function.uint32_t pot2_adcRead()
- ADC read function.Examples description
The application is composed of the three sections :
void applicationTask()
{
uint16_t ADC_value;
char demoText[ 50 ];
ADC_value = pot2_adcRead();
WordToHex(ADC_value, demoText);
mikrobus_logWrite(" ADC value: 0x", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
Delay_ms( 500 );
}
Other mikroE Libraries used in the example:
ADC
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.