> > I had a look at it, but it is implementing a SIN wave and there is noth= ing in > > that code dealing specifically with a SWEEP across a start and end freq= uency > > within a given time window. >=20 >=20 Subject added ... > I did an image generator for SSTV (Slow Scan TV) a long time ago. > It used DDS techniques to generate a sine wave at the output. It used a > pic16c54 (!) to do that, so any more modern processor should be able to d= o > it faster and this produce a better quality sound. >=20 > Though I don't have the code at hand here, here's the idea: >=20 > - It uses a fixed frequency interrupt. Each interrupt, a fixed number is = added > to what is called a 'phase accumulator'. This phase accumulator points to= a > table of, say, 16 or 32 values of a sine table (2 pi corresponds to 16 or= 32 > values). >=20 > - But wait - this technique doesn't give enough frequency resolution (tho= ugh > the 16 levels - or 32) approximate the sine enough, the frequency step is= too > coarse. This is where a second accumulator comes in. A delta is summed to > this accumulator which effectively corresponds to a value from 0 (0x00) t= o > 0.996093 (255). Each time there's a carry, you increment the first > accumulator an extra 1. This effectively gives you a decimal part to the = fixed > number from the previous point, which gives you extremely good frequency > resolution. So effective you are dividing your clock by > (fixed) to (fixed+1) in steps of 0.004! >=20 > - And if you don't want a D/A converter (you only need 4 or 5 bits for a = 16 or > 32 bit table), you can use the trick with Walsh coefficients (using coeff= icients > and a special lookup table). > There's an Application Note from Motorola about using Walsh transform to > generate sine waves. This one? (now NXP) ... http://cache.freescale.com/files/microcontrollers/d= oc/app_note/AN1771.pdf Or this one (also now NXP) http://www.nxp.com/files/microcontrollers/doc/ap= p_note/AN1222.pdf (this appears to use the process described above without = talking about Walsh coefficients). I presume the OP has seen this microchip AN ... http://ww1.microchip.com/downloads/en/AppNotes/00001523A.pdf --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .