TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (137082 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56095 times)
  4. USB Device Library (46418 times)
  5. Network WiFi Library (42034 times)
  6. FT800 Library (41378 times)
  7. GSM click (29109 times)
  8. mikroSDK (26558 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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: 5215 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

CAN Bus click

0

CAN Bus Click is a compact add-on board that provides a link between the CAN protocol controller and the physical wires of the bus lines in a control area network (CAN). This board features the MAX13054, an industry-standard, high-speed CAN transceiver with extended ±80V fault protection from Maxim Integrated.

[Learn More]

STSPIN820 Click

5

STSPIN820 click is a stepper motor driver with the PWM current control, selectable microstepping up to 256 microsteps, and a wide voltage range.

[Learn More]

Temp-Log 6 click

0

Temp-Log 6 click is a temperature sensing Click board™, which features the MAX6642, a specifically designed IC, capable of measuring its own die temperature, as well as a temperature at a remote PN junction. This option makes Temp-Log 6 click well-suited for monitoring the temperature of a CPU, GPU or FPGA, where the PN junction is typically a substrate PNP transistor on the die of the measured IC.

[Learn More]