How does it work?
DIGI POT 8 Click as its foundation uses the AD5206, 6-channel 256-position digitally controlled device that performs the same electronic adjustment function as a potentiometer or variable resistor from Analog Devices. Each channel of the AD5206 contains a fixed resistor with a wiper contact that taps the fixed resistor value of 100kΩ at a point determined by a digital code loaded into the SPI-compatible serial-input register. The resistance between the wiper and either endpoint of the fixed resistor varies linearly concerning the digital code transferred into the variable resistor (VR) latch. The AD5206 also has an internal Power-On preset that places the wiper in a preset midscale condition at the Power-On state.
The AD5206 communicates with MCU through the 3-Wire SPI serial interface with a maximum frequency of 10MHz. Each VR has its VR latch that holds its programmed resistance value. These VR latches are updated from an internal serial-to-parallel shift register loaded from a standard 3-wire SPI serial-input digital interface. Eleven data bits make up the data-word clocked into the serial input register. The first three bits are decoded to determine which VR latch is loaded with the last eight bits of the data word when the CS pin of the SPI serial interface returns to a logic high state.
In addition to the AD5206 present on the DIGI POT 8, this Click board™ also has four 2×3 male headers. Three of them under the labels of A W and B, with also the appropriate number, represent the corresponding DIGI POT terminal of the AD5206, while the fourth header with the label VCC and GND represents an additional power supply output. Wiper terminal number 6, labeled as W6, also can be used as an auxiliary wiper output, routed to the AN pin of the mikroBUS ™ socket if the wiper back to the mikroBUS™ is required.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Digital potentiometer
Applications
Can be used as mechanical potentiometer replacements, voltage-to-current conversions, gain and offset adjustment, and many other applications
On-board modules
AD5206 – 6-channel 256-position digitally controlled device that performs the same electronic adjustment function as a potentiometer or variable resistor from Analog Devices
Key Features
256 positions, 6 independently programmable channels, potentiometer replacement, terminal resistance of 100kΩ, SPI compatible, and more
Interface
Analog
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on DIGI POT 8 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
J1-J3 | – | Populated | DIGI POT Channel Headers |
J4 | – | Populated | Power Supply Output Header |
DIGI POT 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Resistance | – | – | 100 | kΩ |
Number of Taps | – | – | 256 | |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the DIGI POT 8 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
This library contains API for DIGI POT 8 Click driver.
Key functions:
digipot8_cfg_setup
– Config Object Initialization function.digipot8_init
– Initialization function.- – .
Examples description
This example demonstrates the use of DIGI POT 8 Click board.
The demo application is composed of two sections :
void application_task ( void ) { for ( uint8_t cnt = DIGIPOT8_WIPER_POSITION_MIN; cnt < DIGIPOT8_WIPER_POSITION_MAX; cnt += 5 ) { digipot8_set_wiper_1 ( &digipot8, cnt ); digipot8_set_wiper_2 ( &digipot8, cnt ); digipot8_set_wiper_3 ( &digipot8, cnt ); digipot8_set_wiper_4 ( &digipot8, cnt ); digipot8_set_wiper_5 ( &digipot8, cnt ); digipot8_set_wiper_6 ( &digipot8, cnt ); log_printf( &logger, " * All wipers position set to %d *rn", ( uint16_t ) cnt ); Delay_ms( 1000 ); } }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.DIGIPOT8
Additional notes and informations
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.