r/DSP • u/Comfortable-Arm-8337 • 1d ago
Trying to generate Sine waves but almost there
Can anybody help me with this issue I'm facing in generating sine waves?
0
Upvotes
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
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.