POT Click Board
POT Click Board
The POT Click Board™ is based on a potentiometer with the accurate selectable reference voltage output. By employing a high-quality 10mm carbon potentiometer, this Click Board™ can provide very accurate voltage output. The POT Click Board™ is also equipped with the SMD jumper, which allows the maximum reference voltage to be selected between two typically used values: 2.048V or 3.3V.
The output is buffered with a rail-to-rail buffering operational amplifier, which provides constant input and output impedance. The output current is limited by the protection circuit at the output, preventing damage if the output is shorted to GND.
Software Support
We provide a library for the Pot Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library initializes GPIO interface for the desired mikrobus selection. For more details check documentation.
Key Functions
void pot_gpioDriverInit( T_POT_P gpioObj )
- Function initializes GPIO driver for the desired mikrobus.
Example Description
The application is composed of the three sections :
- System Initialization - Initializes peripherals and pins.
- Application Initialization - Initializes GPIO interface and ADC.
- Application Task - (code snippet) - Makes the averaged results by using the desired number of samples of AD conversion. The averaged results will be calculated to millivolts [mV] and sent to the uart terminal. Note : The AD conversion will be performed on the analog (AN) pin on the mikrobus 1.
void applicationTask() { for (nSamples = 0; nSamples < N_SAMPLES; nSamples++) { adcRead = ADC_Get_Sample( 0 ); if (nSamples == 0) { adcMax = adcRead; adcMin = adcRead; } if (adcRead > adcMax) { adcMax = adcRead; } else if (adcRead < adcMin) { adcMin = adcRead; } Delay_ms( 1 ); } adcAvrg = adcMax; adcAvrg += adcMin; adcAvrg /= 2; adcAvrg /= ADC_12BIT_RESOL; adcAvrg *= ADC_V_REF_MV; adcRead = adcAvrg; WordToStr( adcRead, text ); mikrobus_logWrite( "** AN : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( " mV **", _LOG_LINE ); Delay_ms( 100 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
ADC
Conversions
UART
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.
MIKROSDK
The Pot Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
POT Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.