You are here

Not just another pretty Waveform Generator | Cypress Semiconductor

Not just another pretty Waveform Generator

The WaveDAC8 component and application note (AN69133) was released about a year ago.  I found that many people see the title Easy Waveform Generation with the WaveDAC8 Component and think that it just generates a simple waveform.  The component is far more flexible than that.  The application note AN69133 contains four example projects to show the flexibility and ease of use.  Granted the first project generates a simple sine wave but the other three projects go further. 

The second project, 2_WaveDAC8_TwoWaves shows how you can alternate between two waveforms and easily switch right at the end of each wave.  The project schematic is rather simple, and the source code can t get much simpler.

Project source code.


 

#include<device.h>

void main()

{

 /* Initialize WaveDAC8 */

   WaveDAC8_1_Start();

   for(;;);  /* Loop forever */

}


This is the waveform output, notice it is not just a simple sinewave.

The third project "3_WaveDAC8_UART_FSL" shows how to generate a simple FSK output when you combine the WaveDAC8 and UART components.  Note the simplicity of the schematic below.  By changing the two clocks you can generate any two frequencies you want.

The scope screen shot below shows the output of the UART and the WaveDAC8 output.

Again the code can t get much simpler to send out Hello World .


#include<device.h>

void main()

{

   /* Initialize WaveDAC8  */

   WaveDAC8_1_Start();

   UART_1_Start();  /* Initialize UART */

   Clock_1_Start(); /* Start both clocks */

   Clock_2_Start();

   for(;;)

   {

      /* Send "Hello World"  */

      UART_1_PutString((uint8 *)"Hello World");

      CyDelay(250);   /* Wait 500 mSec */

      CyDelay(250);

    }

}


The forth project was probably the most fun.  Who doesn t enjoy dialing their phone with their own custom made PSoC controlled DTMF dialer.   This project used two WaveDAC8 components, a couple of counters, an opamp to buffer the DAC outputs, and a single clock.

This project demonstrates another cool feature of PSoC.  Since the WaveDAC8 component uses standard internal DACs to generate the output,  connecting the two DAC outputs together is not a problem.  When the DAC is in the voltage DAC mode, it is simply a current DAC with an internal resistor.  Now the coolest thing about this project is that it gives you a good chance to use that FFT feature in your digital scope.  I had the DTMF dialer project dial the sequence 159D which causes all of the eight tones to be exercised.  Using the Tek MSO 2024 FFT mode I can see the frequency spectrum of the output, cool eh?

 

You can find the full application note, example projects, and WaveDAC8 component library on the AN69133 Application Note web page. The application note contains details about the design of the WaveDAC8 and information on sampling theory.

 

So just remember, although the WaveDAC8 maybe pretty, it has some brains as well.  Since it does all it's work with DMA, it does not require any of the valuable PSoC 3 or PSoC 5 CPU cycles.

By Mark Hastings

Comments

Clumsy's picture

We used the WaveDAC to create an IRIG-B transmitter last year.

MFR's picture

Great blog and app note. I love this component and have done some things with it by changing the clock and changing the pattern and number of samples.

Mike Roberts

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.