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 (137091 times)
  2. FAT32 Library (70234 times)
  3. Network Ethernet Library (56114 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42053 times)
  6. FT800 Library (41384 times)
  7. GSM click (29111 times)
  8. mikroSDK (26560 times)
  9. PID Library (26489 times)
  10. microSD click (25486 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: 1889 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

LED Ring R Click

1

LED ring R click is a mikroBUS add-on board with a ring of 32 red LEDs driven by four 8-bit 74HC595 serial-in, parallel-out shift registers. The ring is 25 mm in diameter. The click communicates with the target MCU through the mikroBUS SPI interface, with RST, CS, SCK, MISO and MOSI pins marked MR#, LAT, CLK, DSOUT, DSIN, respectively.

[Learn More]

RS485 3.3V click

0

RS485 click 3.3V is a RS422/485 transceiver Click board, which can be used as an interface between the TTL level UART and the RS422/485 communication bus.

[Learn More]

FT810 Library

11

FTDI FT81x graphic controller library.

[Learn More]