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 (139256 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57123 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42404 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 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: 5630 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

Keylock click

1

Keylock click carries a processed sealed key lock mechanism that can be set in three different positions. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over the PWM, INT, and AN pin on the mikroBUSâ„¢ line.

[Learn More]

GNSS ZOE click

5

Determine your current position with GNSS ZOE Click. It carries the ZOE-M8Q GNSS receiver module from u-blox. GNSS ZOE click is designed to run on a 3.3V power supply.

[Learn More]

Charger 6 Click

0

Charger 6 Click is a compact add-on board that represents a single-cell battery charger. This board features the BQ25601, an I2C controlled battery charger for high input voltage and narrow voltage DC power path management from Texas Instruments. This buck charger supports USB, and it’s optimized for USB voltage input. The low impedance power path optimizes switch-mode operation efficiency, reduces battery charging time, and extends battery life during discharge. It also has a programmable current limiting, allowing it to use an external power supply rated up to 13.5V. This Click board™ is suitable as a Li-Ion and Li-polymer battery charger for portable devices and accessories, power tools, and more.

[Learn More]