TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 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 (136797 times)
  2. FAT32 Library (69983 times)
  3. Network Ethernet Library (55951 times)
  4. USB Device Library (46274 times)
  5. Network WiFi Library (41892 times)
  6. FT800 Library (41187 times)
  7. GSM click (28990 times)
  8. PID Library (26420 times)
  9. mikroSDK (26375 times)
  10. microSD click (25382 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: 1801 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

Color 4 click

0

Color 4 Click is a compact add-on board providing an accurate color-sensing solution. This board features the VEML6040, a 16-bit RGBW color sensor offering spectral response through a compatible I2C interface from Vishay Semiconductors. The VEML6040 is based on the Filtron™ technology achieving the closest ambient light spectral sensitivity to real-human eye responses. Alongside the color sensor, this IC also incorporates a signal conditioning circuit consisting of photodiodes, amplifiers, and A/D circuits placed into a single chip using the CMOS process. It provides a selectable measurement range up to 16.496lx with the highest sensitivity of 0.007865lx/step.

[Learn More]

Ambient 18 click

0

Ambient 18 Click is a compact add-on board used to sense the amount of the present ambient light. This board features the BH1680FVC, an analog current-output ambient light sensor from Rohm Semiconductor. The BH1680FVC can detect a wide range of illuminance up to 10klx and provides excellent responsivity close to the human eyes' response. Besides, it is also characterized by low sensitivity variation across various light sources, a built-in shutdown function, and the ability to process the output signal in analog or digital form. This Click board™ is the most suitable for obtaining ambient light data for adjusting brightness in applications that require power saving and better visibility.

[Learn More]

4DotMatrix click

6

4Dot-Matrix R click allows you to display 4 characters of 5x7 dot size. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over I2C interface.

[Learn More]