> 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.
RobertMessage
Re: [lpc2100] DDS working
2003-12-03 by Robert Adsett
Attachments
- No local attachments were found for this message.