dac18
2.1.0.0
|
DAC 18 Click is a compact add-on board for converting general-purpose input to PWM signals. This board features the DAC539G2-Q1, a 10-bit smart DAC from Texas Instruments. The board offers two key output channels: one for digital-to-analog conversion (OUT1) and the other for voltage-to-PWM conversion (OUT0) supporting triangle or sawtooth waveforms. It features an operational mode selection pin for I2C programming or standalone operation, along with nonvolatile memory for storing register settings. DAC 18 Click is ideal for automotive lighting systems and industrial environments requiring reliable signal conversion.
We provide a library for the DAC 18 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for DAC 18 Click driver.
dac18_cfg_setup
Config Object Initialization function. dac18_init
Initialization function. dac18_default_cfg
Click Default Configuration function. dac18_cfg_pwm_out
This function configures PWM output (OUT0) for the function generator by using the I2C serial interface. dac18_set_mode
This function selects between programming and standalone modes by toggling the digital output state of the MOD pin. dac18_get_gpi_status
This function gets GPI status by reading the states of the GP0, GP1 and GP2 pins. This example demonstrates the use of the DAC 18 click board by configuring the waveform signals from a function generator on the OUT0 and voltage level on the OUT1.
The demo application is composed of two sections :
Initialization of I2C module and log UART. After driver initialization, the app executes a default configuration (configuration mode).
The demo application operated in standalone mode and displayed the voltage level on OUT1. The GP0, GP1, and GP2 switches on the DAC 18 click board are used to change the output voltage level and waveform signals. Results are being sent to the UART Terminal, where you can track their changes.
Set GP0, GP1, and GP2 switches to position "1" for the configuration modes.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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. UART terminal is available in all MikroElektronika compilers.