Waveform 2 Click Board
Waveform 2 Click Board
Key Features:
- Low power consumption, high-performance sine/triangle/square outputs, capability for phase and frequency modulation, on-board comparator, and more.
- Based on the AD9834, a 75 MHz low power DDS device capable of producing high-performance sine/triangle/square outputs from Analog Devices.
- Can be used for power-sensitive applications, frequency stimulus/waveform generation, frequency phase tuning and modulation, and many more.
- mikroBUS: I2C and SPI Interfaces
The Waveform 2 Click Board™ is a compact add-on board that contains a direct digital synthesis device for waveform generator applications. This board features the AD9834, a 75 MHz low power DDS device capable of producing high-performance sine/triangle/square outputs from Analog Devices. It provides the capability for phase and frequency modulation and has an onboard comparator that allows the production of a square wave signal for clock generation. With a 75 MHz clock rate, a resolution of 0.28Hz can be achieved, while similarly, with a 1 MHz clock rate an AD9834 can be tuned to 0.004Hz resolution. This Click Board™ represents an ideal candidate for power-sensitive applications, frequency stimulus/waveform generation, frequency phase tuning and modulation, and many more.
The Waveform 2 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the Waveform 2 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains generic functions for working with the Waveform 2 Click™ board.
Key Functions
void waveform2_set_freq ( uint32_t freq )
- Function for setting the output frequency.void waveform2_sine_output ( void )
- Function for setting the sine output.void waveform2_triangle_output ( void )
- Function for setting the triangle output.
Example Description
The application is composed of three sections :
- System Initialization - Initialize the GPIO and communication structures.
- Application Initialization - Initialize the communication interface and configure the Click board™.
- Application Task - Predefined characters are inputed from the serial port. Depending on the character sent the signal frequency, waveform or amplitude will be changed.
- Command: [ + ] - Increase frequency [ - ] - Decrease frequency [ t ] - Triangle-shaped signal [ s ] - The signal in the form of a sinusoid
void application_task ( ) { char rx_data; uint32_t freq_data; if ( UART_Rdy_Ptr( ) ) { rx_data = UART_Rd_Ptr( ); } if ( rx_data > 0 ) { switch ( rx_data ) { case '+': { f += 10; freq_data = f << 14; waveform2_set_freq( freq_data ); rx_data = 0; mikrobus_logWrite( ">> Increasing the frequency ", _LOG_LINE ); break; } case '-': { if ( f <= 9 ) { f = 0; } f -= 10; freq_data = f << 14; waveform2_set_freq( freq_data ); rx_data = 0; mikrobus_logWrite( ">> Decreasing the frequency ", _LOG_LINE ); break; } case 't': { waveform2_triangle_output( ); rx_data = 0; mikrobus_logWrite( ">> Triangle output ", _LOG_LINE ); break; } case 's': { waveform2_sine_output( ); rx_data = 0; mikrobus_logWrite( ">> Sinusoid output ", _LOG_LINE ); break; } } } rx_data = 0; }
Additional Functions : aprox_freq_calculation( ) - This function is used to calculate the aproximate value that will be written to the frequency set register.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Library
- I2C Library
- SPI Library
- Conversions Library
Additional Notes and Information
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.
mikroSDK
This Click board™ is supported with mikroSDK - MikroElektronika 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.
Waveform 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.