Low cost audio function generator(DDS)
Hi,
I need to design a low cost digital audio function generator. For the sinewave generation I would use a lookup table. To keep the control digital I need to scale (modulate) the peak sine values in software and softare PWM. Cannot use a PGA for cost restriction.
What is the best principal for that ?
I am restricted in terms of PIC throughput considering the soft pwm and other housekeeping functions. I must use a PIC16 @ 20MHz series to keep down the cost lower. So calculating the sine values on the fly (when doing a modulation) may eat up to much cycles to fit within the update routine
Please guide if it is at all possible and how ?
Unavailability of components
Dear Steve,
Thanks for replying. Actually I live in a part of my country where sourcing of specialized components is a real problem. Initially I considered using a DDS chip. But set back due to unavailability. Frequency range is within 10K. I haven't done the homework yet. Just trying to get some guidelines whether to base it on a 16F. The possibility you can say. If it is technically possible then I might consider using a 18F too. That depends on the overall BOM cost.
Cypress is costly here in my hometown
Hi Alain,
Using R-2R ladder does reduces software overhead. Fixed amplitude routine takes about the same code for both the PWM and the R-2R in. (8 bits) If a hardware PWM is used then the code overheads are almost the same. Write to PORT or CCPR (Ignoring LSBs). But I wanted to read an ADC or another lookup table within the PWM/R-2R update routine to create AM. I lost on the available cycles there. Then the sampling Freq is just not achievable. Now the most sad part.
In my country (India) 1 USD = 50 INR (Indian Rupees). A PIC16 comes for about 1 USD but a PSOC lands for about $15. My client has a traditional Func-Gen (below average) which costs him less than $18, that too in annual quantities less than 1K. He wanted to give it a digital face lift so that he could better sale his product. He is ready to pay me for the development provided I fit the BOM within $20. I manage to earn my living by PICing and almost always face this constraint.
I could have modified the analogue thing to display the freq./amplitude on a LCD but that was not my intention. (Actually this was the clients basic requirement). I am a 100% self taught and as Steve says there is no problem only learning opportunities.
I have played in the past
Hi,
I have tried using magic sinewaves from don and also tried the 1 bit audio playback from the PIC. They just don't suit my current requirement. I did a speaking greeting card using a PIC, EEPROM and 1 bit audio!!