DIGI POT 4 Click Board
DIGI POT 4 Click Board
The DIGI POT 4 Click Board™ is a digitally controlled dual potentiometer with a resistance of 10Kohm. It has a 10-bit resolution, allowing for a very smooth linear wiper positioning through 1024 steps. The digital wiper position can be controlled via the SPI interface. The DIGI POT 4 Click Board™ also features a non-volatile durable EEPROM memory for storing the wiper position, which means that the device can restore its last position after the power is on - just like its mechanical counterpart.
Software Support
We provide a library for the DIGI POT 4 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library description
The library carries two functions which are sufficient to have complete control over the DIGI POT 4 Click Board™.
Key functions:
void digipot4_writeReg(uint8_t Reg, uint16_t value);
- Write data to wiper register
void digipot4_copyReg(uint8_t Reg);
- Copy data to NV memory
Example Description
The application is composed of three sections :
- System Initialization - Initializes SPI module and sets CS pin as OUTPUT
- Application Initialization - DIGI POT 4 Click Board™ Driver initialization
- Application Task - (code snippet) - Sequentially sets the wiper position every second.
void applicationTask() { digipot4_writeReg(_DIGIPOT4_WIPER_REG_1, 0); digipot4_writeReg(_DIGIPOT4_WIPER_REG_2, 0); Delay_1sec(); digipot4_writeReg(_DIGIPOT4_WIPER_REG_1, 512); digipot4_writeReg(_DIGIPOT4_WIPER_REG_2, 512); Delay_1sec(); digipot4_writeReg(_DIGIPOT4_WIPER_REG_1, 1023); digipot4_writeReg(_DIGIPOT4_WIPER_REG_2, 1023); Delay_1sec(); }
The full application code, and ready to use projects can be found on our LibStock page.
Additional Notes and Information
Depending on the development board you are using, you may need a 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 DIGI POT 4 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.
DIGI POT 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.