How does it work?
DAC 18 Click is based on the DAC539G2-Q1, a 10-bit smart DAC from Texas Instruments, designed for general-purpose input to PWM conversion. This AEC-Q100-qualified IC functions as a GPI-to-voltage output converter and a voltage-to-PWM converter, generating either sawtooth or triangular waveforms, making it suitable for precise signal generation in various applications. The board uses the operational mode selection pin (MOD) to switch between two operational modes: programming mode, which employs an I2C interface (supporting clock frequencies up to 1MHz), and a standalone mode for autonomous operation without an MCU.
What sets DAC 18 Click apart is its nonvolatile memory (NVM) capability, which allows users to store customized register settings during programming via I2C. Once configured, the device can function independently, executing the predefined instructions. This feature makes it ideal for applications such as fault communication in automotive stop-and-turn lighting systems and broader industrial environments where reliable signal conversion is essential.
The DAC539G2-Q1 has a string architecture with two key output channels. Channel 1 operates as a digital-to-analog converter (DAC), providing a voltage output through the OUT1 terminal, while Channel 0 functions as a voltage-to-PWM converter, using either a triangle or sawtooth waveform at the noninverting input of the amplifier, with output available on the OUT0 terminal. Channel 1 also acts as a GPI-to-voltage converter, using a look-up table with eight entries (Table 7-1 in the datasheet), allowing the selection of multiple programmable output voltage ranges based on the binary combinations of three GPI pins, which can be configured via onboard GPx switches.
Both functions, PWM and DAC output, can be manually activated or deactivated using the V-to-PWM and GPI-to-V jumpers by switching them from the ON to the OFF position (by default, both functions are active and provide corresponding output on the OUTx terminals). The three switches can also choose the I2C address in addition to selecting programmable output voltage ranges. Moreover, the general-purpose inputs, aside from manual control, can also be controlled digitally via the GP0-GP2 pins from the mikroBUS™ socket.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
DAC
Applications
Ideal for automotive lighting systems and industrial environments requiring reliable signal conversion
On-board modules
DAC539G2-Q1 – 10-bit smart DAC for general-purpose input to PWM conversion from Texas Instruments
Key Features
10-bit smart DAC, GPI to PWM/voltage output conversion, PWM output (triangle/sawtooth waveform), NVM for storing register settings, I2C interface or standalone mode, programmable output voltage ranges, and more
Interface
GPIO,I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on DAC 18 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | GPI to V | Left | Analog Output Voltage Activation Selection ON/OFF: Left position ON, Right position OFF |
JP3 | V to PWM | Left | PWM Output Activation Selection ON/OFF: Left position ON, Right position OFF |
SW1-SW3 | GP0-GP2 | Middle | GPI Control / I2C Address Selection Switches |
DAC 18 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Output Voltage | 0 | – | 5 | V |
Resolution | 10 | – | – | bit |
Software Support
We provide a library for the DAC 18 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for DAC 18 Click driver.
Key functions
-
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.
Example Description
This example demonstrates the use of the DAC 18 Click by configuring the waveform signals from a function generator on the OUT0 and voltage level on the OUT1.
void application_task ( void )
{
dac18_get_gpi_status( &dac18, &gpi_status );
if ( gpi_status != new_gpi_status )
{
new_gpi_status = gpi_status;
dac18_display_out_status( );
}
Delay_ms( 100 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Other MIKROE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.DAC18
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 MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.