TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139566 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42566 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26933 times)
  10. microSD click (26309 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: 5687 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

Current Limit 9 Click

0

Current Limit 9 Click is a compact add-on board representing a current-limiting solution for your application. This board features the NPS4053, a load switch with a precision adjustable current limit from Nexperia. It is a 5.5V, 55mΩ load switch that allows precise adjustment of the current limit in a range of 110mA up to 2.5A while preserving the constant current during the current limiting.

[Learn More]

SpeakUp API

0

API for SpeakUp, the speech recognition click board

[Learn More]

ATA663211 click

0

ATA663211 click is a LIN transceiver that carries an Atmel ATA663211 IC and runs on 3.3V power supply. The click communicates with the target MCU through UART connection. The IC is designed to handle low-speed data communication in vehicles.

[Learn More]