TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136679 times)
  2. FAT32 Library (69914 times)
  3. Network Ethernet Library (55928 times)
  4. USB Device Library (46253 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41136 times)
  7. GSM click (28974 times)
  8. PID Library (26407 times)
  9. mikroSDK (26350 times)
  10. microSD click (25351 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: 5156 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

mikromedia for PIC18FK - Examples

0

Set of examples for mikromedia for PIC18FK. Provided examples demonstrate working with mikromedia's various features and modules: - Accelerometer - MMC SD card - MP3 - Serial Flash - TFT - Touch Panel - USB UART

[Learn More]

Knob G click

6

The Knob G click is a Click Board which features a combination of high-quality quadrature rotary encoder, and a LED ring composed of 24 individual green LEDs.

[Learn More]

Altitude 5 click

0

Altitude 5 Click is a compact add-on board allowing high-resolution barometric pressure measurement. This board features the KP236, an analog barometric air pressure sensor based on a capacitive principle from Infineon Technologies. The KP236 is primarily developed for measuring barometric air pressure but can also be used in other application fields. It is surface micro-machined with a monolithic integrated signal conditioning circuit implemented in BiCMOS technology. The calibrated transfer function converts pressure into an analog output signal in a range of 40kPa to 115kPa. However, the choice of signal processing is up to the user; more precisely, the user can process the output signal in analog or digital form. The high accuracy and the high sensitivity of the KP236 make this Click board™ suitable for advanced automotive applications and industrial and consumer applications.

[Learn More]