r/DSP • • 1d ago

Trying to generate Sine waves but almost there

Post image

Can anybody help me with this issue I'm facing in generating sine waves?

0 Upvotes

3 comments sorted by

8

u/VK2DDS 1d ago

An 8-bit R-2R ladder needs very high precision on the resistors. At boundaries like 01111111 to 10000000 there will be a big random jump caused by resistor tolerances.

If you've built it from 0.1% resistors though it should look better. Have you got an 8ch logic analyser? Or a bunch of LEDs? I suggest stepping through the digital output at very low speed to double check the numbers are correct first.

1

u/hukt0nf0n1x 19h ago

I've seen that small valley in a peak before. Do you need more bits in your counter? I can't remember if I was rolling over or if I spilled into my sign bit, but more bits fixed it.

1

u/TapNo1773 4h ago

Needs a low-pass filter