TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

DIGI POT 5 click

Rating:

10

Author: MIKROE

Last Updated: 2018-01-18

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Digital potentiometer

Downloaded: 5622 times

Not followed.

License: MIT license  

DIGI POT 5 click is a digitally controlled quad potentiometer, with the resistance of 10KΩ. It has an 8bit wiper step resolution, which allows the wiper to take 257 different discrete positions (across 256 internal resistors).

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DIGI POT 5 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DIGI POT 5 click" changes.

Do you want to report abuse regarding "DIGI POT 5 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

DIGI POT 5 Click

DIGI POT 5 Click

Native view of the DIGIPOT 5 Click board.

View full image
DIGI POT 5 Click

DIGI POT 5 Click

Front and back view of the DIGI POT 5 Click board.

View full image

Library description

The library contains functions that perform basic SPI commands on click board registers.

Key functions:

uint8_t digipot5_writeReg(uint8_t regAddress, uint16_t writeData);- Function writes to the click board registers

uint8_t digipot5_readReg(uint8_t regAddress, uint16_t * pReadData);- Reads from the click board registers

uint8_t digipot5_setResistance(uint8_t regAddress, uint16_t value);- Sets the resistance of the selected wiper

Example description

  • System Initialization - Initializes pins, SPI peripheral and logger
  • Application Initialization - Initializes the click driver
  • Application Task (code snippet) - Demonstrates the use of various functions by setting different wipers to several different positions
    mikrobus_logWrite("Setting wiper 0 to zero scale value.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER0_VOLATILE, _DIGIPOT5_ZEROSCALE);
    mikrobus_logWrite("Setting wiper 1 to 3k Ohm.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER1_VOLATILE, _DIGIPOT5_3KOHM);
    mikrobus_logWrite("Setting wiper 2 to 5k Ohm.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER2_VOLATILE, _DIGIPOT5_HALFSCALE_5K);
    mikrobus_logWrite("Setting wiper 3 to full scale (10k Ohm).", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER3_VOLATILE, _DIGIPOT5_FULLSCALE_10K);

    delay_ms(2000);
    mikrobus_logWrite("Decrementing wiper 3 by 5 steps.", _LOG_LINE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);

    delay_ms(2000);
    mikrobus_logWrite("Decrementing wiper 3 by another 5 steps.", _LOG_LINE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);
    digipot5_decrementReg(_DIGIPOT5_WIPER3_VOLATILE);

    delay_ms(2000);
    mikrobus_logWrite("Setting wiper 0 to full scale value.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER0_VOLATILE, _DIGIPOT5_FULLSCALE_10K);
    mikrobus_logWrite("Setting wiper 1 to 8k Ohm.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER1_VOLATILE, _DIGIPOT5_8KOHM);
    mikrobus_logWrite("Setting wiper 2 to 4k Ohm.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER2_VOLATILE, 0x68);
    mikrobus_logWrite("Setting wiper 3 to zero scale value.", _LOG_LINE);
    digipot5_setResistance(_DIGIPOT5_WIPER3_VOLATILE, _DIGIPOT5_ZEROSCALE);

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Heater click

5

Heater Click is designed with intention of PCB heater concept testing and useful tool for heating complete casing where staying in specified temperature range is crucial. Exact PCB temperature can be set and controlled using TMP235 on board temperature sensor from Texas Instruments.

[Learn More]

Pressure 12 click

5

Pressure 12 click is a barometric gauge pressure measuring Click board, equipped with the Amplified Basic Pressure sensor series (ABP), which features a ratiometric analog output, which is proportional to the applied pressure.

[Learn More]

EXPAND 5 click

5

EXPAND 5 Click features a low-voltage 24-bit I2C and SMBus I/O expander. This 24-bit I/O expander is designed to provide general-purpose remote I/O expansion for most microcontroller families via the I2C serial interface.

[Learn More]