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]
Rating:
Author: MIKROE
Last Updated: 2020-08-13
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: DAC
Downloaded: 1670 times
Not followed.
License: MIT license
DAC 6 Click is a compact add-on board that contains a fully-featured, general-purpose voltage-output digital-to-analog converter. This board features the DAC104S085, 10-bit resolution micro-power QUAD digital-to-analog converter with rail-to-rail output, from Texas Instruments.
Do you want to subscribe in order to receive notifications regarding "DAC 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DAC 6 click" changes.
Do you want to report abuse regarding "DAC 6 click".
Library Description
This library holds functions that can be used to write data to the device's input shift register, or to set operation mode output channel and level.
Key functions:
void dac6_write_data ( uint16_t wr_data )
- Sends 16-bit data to the device's input shift register.void dac6_set_output ( uint8_t chan, uint8_t op_mod, uint16_t set_out )
- Function is used to set operation mode output channel and level.Examples description
The application is composed of three sections :
void application_task ( )
{
for ( n_cnt = 0; n_cnt < 4096; n_cnt += 315 )
{
v_out = dac6_set_output ( DAC6_CHANNEL_A,
DAC6_WRITE_ALL_AND_UPDATE,
DAC6_V_REF_2048,
n_cnt );
FloatToStr( v_out, log_text );
mikrobus_logWrite( " VOUT ~ ", _LOG_TEXT );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " mV", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
Delay_ms( 5000 );
}
Delay_ms( 5000 );
}
Other mikroE Libraries used in the example:
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.