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 (136639 times)
  2. FAT32 Library (69848 times)
  3. Network Ethernet Library (55897 times)
  4. USB Device Library (46232 times)
  5. Network WiFi Library (41868 times)
  6. FT800 Library (41093 times)
  7. GSM click (28947 times)
  8. PID Library (26402 times)
  9. mikroSDK (26320 times)
  10. microSD click (25330 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 8 click

Rating:

5

Author: MIKROE

Last Updated: 2020-08-28

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: DAC

Downloaded: 1796 times

Not followed.

License: MIT license  

DAC 8 Click is a compact add-on board that contains a fully-featured, general-purpose voltage-output digital-to-analog converter. This board features the DAC8554IPWR, a 16-bit QUAD channel voltage-output digital to analog converter from Texas Instruments.

No Abuse Reported

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

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

Do you want to report abuse regarding "DAC 8 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

DAC 8 Click

DAC 8 Click

Native view of the DAC 8 Click board.

View full image
DAC 8 Click

DAC 8 Click

Front and back view of the DAC 8 Click board.

View full image

Library Description

The library covers all the necessary functions to control the DAC 8 Click board. A library performs the communication with the DAC60501 via I2C and communication with DAC8554 the SPI interface.

Key functions:

  • void dac8_generic_i2c_write ( uint8_t reg, uint16_t tx_data ) - Generic I2C ( DAC60501 ) write function.
  • uint16_t dac8_generic_i2c_read ( uint8_t reg ) - Generic I2C ( DAC60501 ) read function.
  • void dac8_generic_spi_write ( uint32_t tx_data ) - Generic SPI ( DAC8554 ) write function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C and SPI and start to write log.
  • Application Initialization - Initialization driver enables - I2C. Configure DAC60501: executes call software reset, disable sync and internal reference and disable Power-down mode, the set reference voltage is internally divided by a factor of 2, amplifier for corresponding DAC has a gain of 2. Initialization driver enables - SPI, enable DAC8554, also write log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the DAC 8 Click board. DAC 8 board changeing output values: Channel A ~ 2500 mV, Channel B ~ 1250 mV, Channel C ~ 625 mV, Channel D ~ 312 mV. All data logs write on USB uart changes every 5 sec.
void application_task ( )
{
    mikrobus_logWrite( "---------------------", _LOG_LINE );
    
    cfg_dac.addr = DAC8_ADDR_DEFAULT;
    cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE;
    cfg_dac.dac_sel = DAC8_DAC_SEL_CH_A;
    cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP;
    cfg_dac.dac_val = 0xFFFF;
    
    mikrobus_logWrite( " Channel A ~ 2500 mV ", _LOG_LINE );
    dac8_device_config( cfg_dac );
    dac8_load_dac( );
    Delay_ms( 5000 );
    
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    cfg_dac.addr = DAC8_ADDR_DEFAULT;
    cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE;
    cfg_dac.dac_sel = DAC8_DAC_SEL_CH_B;
    cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP;
    cfg_dac.dac_val = 0x7FFF;

    mikrobus_logWrite( " Channel B ~ 1250 mV ", _LOG_LINE );
    dac8_device_config( cfg_dac );
    dac8_load_dac( );
    Delay_ms( 5000 );
    
    mikrobus_logWrite( "---------------------", _LOG_LINE );
    
    cfg_dac.addr = DAC8_ADDR_DEFAULT;
    cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE;
    cfg_dac.dac_sel = DAC8_DAC_SEL_CH_C;
    cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP;
    cfg_dac.dac_val = 0x3FFF;

    mikrobus_logWrite( " Channel C ~  625 mV ", _LOG_LINE );
    dac8_device_config( cfg_dac );
    dac8_load_dac( );
    Delay_ms( 5000 );
    
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    cfg_dac.addr = DAC8_ADDR_DEFAULT;
    cfg_dac.ctrl_upd_an_out = DAC8_CTRL_UPD_AN_OUT_SINGLE_CH_STORE;
    cfg_dac.dac_sel = DAC8_DAC_SEL_CH_D;
    cfg_dac.pwr_mode = DAC8_PWR_MODE_POWER_UP;
    cfg_dac.dac_val = 0x1FFF;

    mikrobus_logWrite( " Channel D ~  312 mV", _LOG_LINE );
    dac8_device_config( cfg_dac );
    dac8_load_dac( );
    Delay_ms( 5000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • SPI
  • UART

Additional notes and informations

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

SRAM 2 click

5

SRAM 2 Click is based on ANV32A62A SRAM memory from Anvo-Systems Dresden. It's a 64Kb serial SRAM with a non-volatile SONOS storage element included with each memory cell, organized as 8k words of 8 bits each. The devices are accessed by a two-wire bus. Up to 4 cascadable devices can share the common bus.

[Learn More]

Charger 19 click

0

Charger 19 Click is a compact add-on board that contains a battery charger. This board features the nPM1100, an integrated power management IC from Nordic Semiconductor. It has a highly efficient DC/DC buck regulator with automatic selection between hysteretic and PWM modes.

[Learn More]

NFC Extend click

5

NFC Extend Click is NFC tag device with possibility of using any shape and size external antenna, offering 16 Kbit of electrically erasable programmable memory (EEPROM). This Click Board offer two communication interfaces. The first one is an I2C serial link and can be operated from a DC power supply.

[Learn More]