TOP Contributors

  1. MIKROE (2730 codes)
  2. Alcides Ramos (369 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (116 codes)
  5. Bugz Bensce (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 (138640 times)
  2. FAT32 Library (71283 times)
  3. Network Ethernet Library (56792 times)
  4. USB Device Library (47124 times)
  5. Network WiFi Library (42856 times)
  6. FT800 Library (42100 times)
  7. GSM click (29663 times)
  8. mikroSDK (27525 times)
  9. PID Library (26784 times)
  10. microSD click (26020 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

DAC 17 click

Rating:

0

Author: MIKROE

Last Updated: 2024-07-04

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: DAC

Downloaded: 23 times

Not followed.

License: MIT license  

DAC 17 Click is a compact add-on board that establishes precise voltage output control in various electronic applications. This board features the DAC7558, a 12-bit, octal-channel voltage output digital-to-analog (DAC) from Texas Instruments. It offers flexible internal or external power options with a voltage range from 2.7V to 5.5V. It features a rapid settling time of 5µs, rail-to-rail output amplifiers, and the ability to simultaneously or sequentially update outputs, ensuring precise and efficient performance.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DAC 17 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DAC 17 click" changes.

Do you want to report abuse regarding "DAC 17 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


DAC 17 click

DAC 17 Click is a compact add-on board that establishes precise voltage output control in various electronic applications. This board features the DAC7558, a 12-bit, octal-channel voltage output digital-to-analog (DAC) from Texas Instruments. It offers flexible internal or external power options with a voltage range from 2.7V to 5.5V. It features a rapid settling time of 5µs, rail-to-rail output amplifiers, and the ability to simultaneously or sequentially update outputs, ensuring precise and efficient performance.

dac17_click.png

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Dec 2023.
  • Type : SPI type

Software Support

We provide a library for the DAC 17 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 DAC 17 Click driver.

Standard key functions :

  • dac17_cfg_setup Config Object Initialization function.

    void dac17_cfg_setup ( dac17_cfg_t *cfg );
  • dac17_init Initialization function.

    err_t dac17_init ( dac17_t *ctx, dac17_cfg_t *cfg );
  • dac17_default_cfg Click Default Configuration function.

    err_t dac17_default_cfg ( dac17_t *ctx );

Example key functions :

  • dac17_send_command This function is used to send specific command of the DAC 17 click board.

    err_t dac17_send_command ( dac17_t *ctx, uint8_t command, uint8_t ch_sel, uint16_t data_in );
  • dac17_set_dac_output This function is used to set output level of the sellected channel of the DAC 17 click board.

    err_t dac17_set_dac_output ( dac17_t *ctx, uint8_t ch_sel, uint16_t dac_data );
  • dac17_set_all_dac_output This function is used to set output level of the DAC 17 click board.

    err_t dac17_set_all_dac_output ( dac17_t *ctx, uint16_t dac_data );

Example Description

This example demonstrates the use of DAC 17 Click board by changing the voltage level on the output channels.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    dac17_cfg_t dac17_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    dac17_cfg_setup( &dac17_cfg );
    DAC17_MAP_MIKROBUS( dac17_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == dac17_init( &dac17, &dac17_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( DAC17_ERROR == dac17_default_cfg ( &dac17 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Changes the output channels voltage level starting from full scale ( REF voltage ),
to the mid-scale ( half of the REF voltage ), and then to zero every two seconds.

void application_task ( void )
{
    #define DAC17_OUTPUT_ZERO           0x0000u
    #define DAC17_OUTPUT_MID_SCALE      0x0800u
    #define DAC17_OUTPUT_FULL_SCALE     0x0FFFu

    log_printf( &logger, " Setting all channels to full scale output \r\n" );
    dac17_set_all_dac_output( &dac17, DAC17_OUTPUT_FULL_SCALE );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    log_printf( &logger, " Setting all channels outputs to zero \r\n" );
    dac17_set_all_dac_output( &dac17, DAC17_OUTPUT_ZERO );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    log_printf( &logger, " Setting all channels outputs to mid scale \r\n" );
    dac17_set_all_dac_output( &dac17, DAC17_OUTPUT_MID_SCALE );
    Delay_ms ( 1000 );
    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.DAC17

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

AudioAmp 4 click

5

AudioAmp 4 click is a low-power audio amplifier with a digital volume control. It is equipped with the LM4860, an audio amplifier IC capable of delivering up to 1W of continuous power to an 8 Ω load.

[Learn More]

DC Motor 5 click

0

DC MOTOR 5 click carries the DRV8701 brushed DC motor gate driver from Texas Instruments. The click is designed to run on an external power supply. It communicates with the target MCU over the following pins on the mikroBUSâ„¢ line: AN, RST, CS, PWM, and INT.

[Learn More]

VCP Monitor 3 click

5

VCP Monitor 3 Click is a high precision Voltage, Current and Power measurement Click board with an input capable of taking up to 15V. It features the LTC2947, from Analog Devices, a high precision power and energy monitor with an internal sense resistor supporting up to ±30A.

[Learn More]