Christian Chetcuti
Junior Member level 3
- Joined
- Mar 12, 2014
- Messages
- 30
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Activity points
- 213
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
short version: Add 2048 (12-bit half-scale) to your DDS output, and use THAT result instead of what you use now.
long version: see previous posts about 2's complement. The IP core output is 2's complement, and you are mistakenly treating it as an unsigned. That's why you get the curious sinewave wraparound as seen on the scope display.
Also, doesn't the IP core have some setting to change this signed/unsigned behavior?
Aw darn! Mrfibble, now you've ruined the OP's learning opportunity to actually look at how the data results in strange outputs like that.
Seriously it took me 1 second to recognize what was wrong with the data. I've seen this happen with DAC interfaces that had incorrectly defined settings or an incorrectly implemented FW driver.
Christian Chetcuti I was really hoping you would try something like graphing a sine wave in 2's comp as straight binary in excel or something. Then you would easily see what happens to your data.
- - - Updated - - -
Here is a post I made with a waveform in 2's comp that is interpreted as straight binary data. Unfortunately at least when I look at it the formatting is in proportional spaced font instead of fixed. :sad: https://www.edaboard.com/threads/317824/#post1359382
... but do you know if i could have avoided this by messing around with the dds compiler settings pls?...
Sorry. And I know how you feel.Aw darn! Mrfibble, now you've ruined the OP's learning opportunity to actually look at how the data results in strange outputs like that.
No kidding, it's totally autopilot. See that sort of wraparound ==> doh, signed vs unsigned mixup.Seriously it took me 1 second to recognize what was wrong with the data. I've seen this happen with DAC interfaces that had incorrectly defined settings or an incorrectly implemented FW driver.