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: 2021-01-19
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Digital potentiometer
Downloaded: 1872 times
Not followed.
License: MIT license
DIGI POT 7 Click is a compact add-on board used as a digitally controlled potentiometer. This board features the AD5175, a single-channel 1024-position digital rheostat with less than ±1% end-to-end resistor tolerance error and 50-time programmable wiper memory from Analog Devices.
Do you want to subscribe in order to receive notifications regarding "DIGI POT 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DIGI POT 7 click" changes.
Do you want to report abuse regarding "DIGI POT 7 click".
Library Description
The library covers all the necessary functions to control DIGI POT 7 Click board™. Library performs a standard I2C interface communication.
Key functions:
void digipot7_enable_write ( void )
- Enable write function.void digipot7_operating_mode ( uint8_t mode )
- Set operating mode function.DIGIPOT7_RETVAL_T digipot7_set_resistance ( uint16_t res_ohm )
- Set resistance function.Examples description
The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( " Set Resistance: 1.024 kOhm ", _LOG_LINE );
mikrobus_logWrite( "----------------------------", _LOG_LINE );
digipot7_set_resistance( 1024 );
Delay_ms( 5000 );
mikrobus_logWrite( " Set Resistance: 2.048 kOhm ", _LOG_LINE );
mikrobus_logWrite( "----------------------------", _LOG_LINE );
digipot7_set_resistance( 2048 );
Delay_ms( 5000 );
mikrobus_logWrite( " Set Resistance: 4.096 kOhm ", _LOG_LINE );
mikrobus_logWrite( "----------------------------", _LOG_LINE );
digipot7_set_resistance( 4096 );
Delay_ms( 5000 );
mikrobus_logWrite( " Set Resistance: 8.192 kOhm ", _LOG_LINE );
mikrobus_logWrite( "----------------------------", _LOG_LINE );
digipot7_set_resistance( 8192 );
Delay_ms( 5000 );
}
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.