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: 2019-08-16
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: DAC
Downloaded: 3386 times
Not followed.
License: MIT license
DAC 4 Click carries Microchip’s MCP4728 IC, a Quad Digital-to-Analog Converter with nonvolatile (EEPROM) Memory. The digital value is converted to the appropriate voltage level in the range between GND and VCC, which is proportional to the received 12-bit number.
Do you want to subscribe in order to receive notifications regarding "DAC 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DAC 4 click" changes.
Do you want to report abuse regarding "DAC 4 click".
Library Description
Library contains function for getting INT pin state Library contains function for setting PWM pin state Library contains function for getting data via I2C Library contains function for setting data via I2C Library contains functions for executing general call functions (reset, wake up and software update) Library contains functions for executing fast write, multi write, sequential write and single write commands Library contains functions for setting voltage reference, power mode and gain Library contains function for getting channel reports.
Key functions:
uint8_t dac4_general_call_reset( void )
- This function executes general call reset command.uint8_t dac4_single_write( T_dac_channel_setting * channel_X )
- This function executes single write command.uint8_t dac4_data_report( T_dac_channel_setting * channel_buffer )
- This function reads data for all 4 channels, forms a report and stores it into the buffer.Examples description
The application is composed of three sections :
void applicationTask( )
{
dac4_check_input( );
if (message_ok_flag == 1)
{
dac4_parse_message( );
message_ok_flag = 0;
}
}
Additional Functions :
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.