Maker Pro
Maker Pro

Clocking question.

We have a 10Mhz clock with a single frequency of 100hz (sine wave).

Question is whether the 8 bit or the 16 bit counter type produces better sine wave and why?

..................

I really am new to electronic but base on my understanding I say the 8 bit will give better sine wave because of the counting method of the 8 bit (I can only vividly remember the explanation from the lecture long ago but cant fully explain it).

But why is it better is not enough I think, I want help with some mathematically explanation on why it is better- perhaps an example like at what point is the 16 bit better and what at point is the 8bit better. Thank you, this is a great community.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I presume you're asking if you want to synthesise a 100Hz sine wave (presumably using either an 8 bit DAC or a 16 bit DAC) where your clock rate is 10Mhz, which sine wave will be more faithful?

Here's a similar question. Let's say I use the 16Bit DAC, but always set the low order 8 bits to zero. Is this any different to using an 8 bit DAC?

Let's say at a time t (in seconds) the voltage required is sin(100 * 2 * pi * t) + 1. This waveform will then go from what minimum voltage to what maximum voltage?

OK, at time t = 0.333 seconds, what is the required voltage?

Assuming your DAC uses a voltage reference (i.e. the maximum DAC output) of 2V, what value would you use as the digital input to the 8 bit DAC to get as close as possible to this? How close is it?

Now do the same thing for the 16 bit DAC.

Which one gets closer to the required voltage?

Next you need to consider if your clock rate limits the speed at which you can set up the DAC in each case. You have provided little in the way of detail, but what you could look at is the number of samples you can get over one cycle and whether there would be any further reason to choose one DAC over the other.

As an extreme example, if you could do 10 samples per cycle with the 8 bit DAC, and only 5 with the 16 bit DAC, would this influence your decision? What if you could do 10 with both (assuming the setup time is identical)?
 
Can you elaborate on the sin(100 * 2 * pi * t) + 1, the voltage required.

When you say "assuming your DAC uses a voltage reference (i.e. the maximum DAC output) of 2V, what value would you use as the digital input to the 8 bit DAC to get as close as possible to this? How close is it?", how do I calculate this?
Thank you for reply!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Can you elaborate on the sin(100 * 2 * pi * t) + 1, the voltage required.

I'm saying it is a 100Hz sine wave. I've simply assumes a certain amplitude and where the zero volt reference will be. I'm assuming you should be familiar with basic math.

When you say "assuming your DAC uses a voltage reference (i.e. the maximum DAC output) of 2V, what value would you use as the digital input to the 8 bit DAC to get as close as possible to this? How close is it?", how do I calculate this?

Do you understand the relationship between the digital input to a DAC and the analog output that comes out?
 
Yes, but can you explain it so everyone can understand ?

I jest...Sad no...So I really didnt get much from above explanations and it's my fault. I just want to know of the 16 and 8 bit DAC, which will give a more "faithful" waveform and how..
 
It's not clear whether you don't understand the mathematical concept of the sin() function, or that you don't understand how the DAC works.

It is assumed here that the DAC will only give a positive voltage output, in this case the output will range from 0 to +2 volts. The sin() function will give values from -1 to +1 volt, hence the need to offset the function: sin()+1 as shown.

Here is a good place to start your consideration: How many discrete voltage levels will an 8-bit DAC give? How many discrete voltage levels will a 16-bit DAC give? How will the sin() function map to these DAC voltage levels?
 
Alright, I know what you're talking about now. I got this problem from an electronic book I'm currently analyzing through, (trying to learn electronic by myself b/c i think it's useful in the future) and i think i can find the answer from here now. Thank you very much for your replies and have a good day!:)
 
Top