Content originally posted in LPCWare by RA1981 on Thu Jun 30 03:32:06 MST 2011 Hi,
I want to realize a waveform generator. Maximum signal frequency is ~3kHz. The waveforms should be user selectable (sine, square, sawtooth, etc. or self-defined by user) and the amplitude should be also variable. The output signal will be feed in a audio input.
I wonder if it would be possible by using a LPC1756 (LPC1768 for prototyping) and a UDA1330 audio DAC connected via the I2S interface. I 'd realize the waveforms as tables saved in the LPC flash memory. For the frequency variation I'd use a DDS approach where table entries are skipped on higher frequencies. The amplitude (volume) variation could be done by dividing/multiplying the table value before it's being sent to the audio DAC.
So, the first question is if it's generally possible with a LPC1756/LPC1768 and the audio DAC or would the processor be overloaded? I cannot estimate it, that's why I ask.
Second question is already deeper into my approach: the UDA1330 datasheet (http://www.nxp.com/documents/data_sheet/UDA1330ATS.pdf) states on page 5 that the WS (word-select) edge must fall on the negative edge of the BCK (bit-clock) signal. I couldn't find a diagram where the I2S signals are shown including the MCLK signal (which has to be connected to the BCK signal of UDA1330 I assume). The user manual of LPC17xx is located here: http://www.nxp.com/documents/user_manual/UM10360.pdf
So, if anyone has some experience with I2S I'd be glad if I can get some hints, tips and tricks :)