Audio DDS with two signals on a PIC

Hi,

I have a cute little job coming up. It requires two tones to be generated with varying pitch (audio) based on two analog inputs from a pair of gyros. They’re added together and output to an FM transmitter. The basic idea is that it’s attached to some sports equipment and the user can determine from the change in pitch whether they’re keeping a constant angular velocity in yaw and pitch (its a croquet mallet if you’re interested).

I’m rigging up a quick proof of concept using a pair of XR2206 signal generators feeding into an analog FM transmitter scavenged from a wireless microphone.

However if it flies I’d like to use the sparkfun digitally controlled FM transmitter module for stability and reduced user knob twiddling. If I’m going to need a little PIC micro to control it, I might just as well do Direct Digital Synthesis on the analog inputs.

So the questions are:

Has anyone successfully used the DA converter on a PIC 16F88? I’ve never had success.

Is there a out of the box algorithm for making two (note not one) sinewaves of different frequencies.

Anyone successfully used the Sparkfun FM transmitter module…any issues you know of before making an order?

Obviously I’ll have to use some sort of lookup table etc…its the mixing at different frequencies that is of concern. Surely it cannot be as simple as having two counters decrementing at two rates that depend on the two inputs and simply adding them together at a constant output rate?

Phil

The 16F88 only has an ADC, not a DAC. You could add an external DAC, of course. To generate two frequencies, simply add the samples together before you output them to the DAC.

Leon

actually I meant the comparator voltage reference on the 16F88…which I’ve read somewhere can be used as a crude DAC…however I’ll probably go with an external DAC.

The comparator reference only gives 16 levels.

Leon

ahh Thanks leon, you’ve solve a mystery I should have solved by reading the datasheet properly…external DAC it’ll be then.