Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] DDS working

2003-12-03 by Robert Adsett

>   while (1)
>   {
>     acc = acc + adder;      //update phase accumulator
>     ptr = (acc &= 0xFF);    //pointer into table
>     IOSET = sawtooth[ptr] << 8;
>     IOCLR = (~sawtooth[ptr] << 8);
>    }
>
>apart from glitches - spurs on the waveforms. I think I had the ~ in the
>wrong place.
>
>I didn't get those glitches with the AVR, using the same DAC.

Scope your output lines and compare to the glitches.  I suspect they are 
coming from the fact that not all of your lines change at the same 
time.  Going from a value of 3 to a value of 4 I would expect to see a 
sequence of 3, 7, 4 given your code.

I think there may be either a HW or a SW fix.  THE SW fix would involve 
going against the User manuals recommendations though.

Robert

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.