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 (137111 times)
  2. FAT32 Library (70239 times)
  3. Network Ethernet Library (56129 times)
  4. USB Device Library (46437 times)
  5. Network WiFi Library (42080 times)
  6. FT800 Library (41395 times)
  7. GSM click (29119 times)
  8. mikroSDK (26566 times)
  9. PID Library (26503 times)
  10. microSD click (25488 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 3 click

Rating:

5

Author: MIKROE

Last Updated: 2018-05-16

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Digital potentiometer

Downloaded: 4379 times

Not followed.

License: MIT license  

DIGI POT 3 click is a versatile and feature-rich digital potentiometer click with 1024 steps and an internal non-volatile memory (EEMEM), which can be used for storing the wiper position, but also for storing various user data.

No Abuse Reported

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

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

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

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC 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
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • 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 3 click

DIGI POT 3 click

Native view of the DIGI POT 3 click board.

View full image
DIGI POT 3 click

DIGI POT 3 click

Front and back view of the DIGI POT 3 click board.

View full image

Library Description

The library performs the check procedure for the desired outputs (IN1 - IN4). For more details check the documentation.

Key functions:

  • uint8_t digipot3_sendCommand( uint8_t commandByte ) - The function executes the desired command.
  • uint8_t digipot3_storeEEMEM( uint8_t location_address, uint16_t transfer_data ) - The function stores 16-bit data to the desired EEMEM (non-volatile) memory location.
  • uint8_t digipot3_writeDAC( uint16_t valueDAC ) - The function writes a 10-bit value to DAC register and determines the wiper position.
  • void digipot3_readDAC( uint16_t *dataOut ) - The function reads a 10-bit value from DAC register (wiper position).

Examples Description

The demo application is composed of three sections:

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization -  Initializes SPI driver and restores the wiper position value from EEMEM (non-volatile) memory to the DAC register, if this value does not already exist in the DAC register.
  • Application Task - (code snippet) - Increments the wiper position by 6dB every 2 seconds. When wiper position reaches the desired value (0x0200), then the wiper position be decremented by 6dB every 2 seconds, until position value reaches the new desired value (0x0002). After that, the new position value will be stored in the EEMEM memory, if that value does not already exist in the EEMEM memory.
void applicationTask()
{
 while (digitalValue < 0x0200)
 {
 digipot3_sendCommand( _DIGIPOT3_INCREMENT_RDAC_6DB_COMM );
 digipot3_readDAC( &digitalValue );
 WordToStr( digitalValue, text );
 mikrobus_logWrite( "DAC value is: ", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );
 Delay_ms( 2000 );
 }

 while (digitalValue > 0x0002)
 {
 digipot3_sendCommand( _DIGIPOT3_DECREMENT_RDAC_6DB_COMM );
 digipot3_readDAC( &digitalValue );
 WordToStr( digitalValue, text );
 mikrobus_logWrite( "DAC value is: ", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );
 Delay_ms( 2000 );
 }

 if (eememValue != digitalValue)
 {
 digipot3_sendCommand( _DIGIPOT3_STORE_RDAC_TO_EEMEM_COMM );
 eememValue = digitalValue;
 }
}

mikroE Libraries used in the example:

  • Conversions
  • SPI
  • UART

Additional notes and information

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

MUX 3 click

5

The MUX 3 click is a Click board based around the TMUX1208 module, a 5-V Bidirectional 8:1, 1-Channel Multiplexer from Texas Instruments.

[Learn More]

EEPROM 6 click

0

EEPROM 6 Click is a compact add-on board that contains a serial EEPROM memory that operates from the 1-Wire interface. This board features the DS28EC20, a 20480-bit EEPROM organized as 80 memory pages of 256 bits each from Analog Devices. As a specific feature, blocks of eight memory pages can be write-protected or put in “EPROM-Emulation” Mode, where bits can only be changed from a 1 to a 0 state. It communicates with MCU at 15.4kbps or 90kbps over the 1-Wire protocol and has a 64-bit registration number that ensures error-free device selection.

[Learn More]

Mikromedia+ for PIC32MX7 - RF Communication Example

5

This is demonstration project how Mikromedia+ for PIC32MX7 communicates over RF. Data is send over simple 'led protocol' (1 byte command). Development board for PIC32 with an add-on board nRF Click is used as a receiver device.

[Learn More]