weirdocollector

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

weirdocollector's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Alvie ! First of all thank you for you taking the time for such a thorough answer: really appreciated I've used Excel in order to calculate the sine sample values, and your last formula: int(128+100*sin($n*2*pi/2048)) works as expected , giving values between 28 and 228, with 'n' from '0' to '2047'. The problem in Hamster Book's formula seems to be the '+1' after the sine (sine(n*PI()/1024)+1)*100), that you have ignored in your formula, that makes the multiplier of '100' to be between '0' and '2', instead between '-1' and '1', giving as a result a different range of values. Now to my Papilio ! Thanks again.
  2. Thanks ! You're right, it's a math question and not a proper FPGA problem. I'm now using this formula: 127*SIN(n*2*pi/256) + 128 Almost surely I'm wrong, but I have the sentation the formula in Hamster book cannot give the expected 28 to 228 values. Thanks again.
  3. I've tried with Excel, but I cannot obtain values between 28 and 228. I've simply applied the formula to values from 0 to 1024, what am I doing wrong? Thanks again.
  4. Hi everybody! I'm going through the wonderful Hamstrer book with the help of my Papilio Pro I'm having trouble with the Chapter 16 tutorial about the Delta-Sigma DAC, in creating the required sine wave samples to place in the COE file of the FPGA ROM. The suggested formula is "f(n) = int((sine(n*PI()/1024)+1)*100)+128" that, as the texts says, "will give you values between 28 and 228 that you can use". How could I generate such values ? Any help is really appreciated. Thanks a lot !