Taky teorie :o)<br>Zkratka v tabulce VII. uz je ukazka dobre. Bud melo byt v tabulce V. FC000, nebo pro FC00 u tech 14 vyssich bitu obratili MSB a LSB <br><br><br><br><div class="gmail_quote">On Dec 7, 2007 4:09 PM, Chipsi <
<a href="mailto:chipsi@volny.cz">chipsi@volny.cz</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Zdravim,<br><br>nejak jsem asi vypadl ze seznamu prispevatelu, ci co ?
<br><br>0x000FC00 => 0000 0000 0000 1111 1100 0000 0000<br><br>MSB 00 0000 0011 1111<br>LSB 00 0000 0000 0000<br>Celé 0000 0000 1111 1100 0000 0000 0000<br>Takze bych si tipl, ze to je priklad pro 0x00FC000
<br><br>našel jsem příklad, takže jednoduše, asi je to v manuálu BLBĚ.<br><br>#define MCLK 16384000L // DDS master clock<br>#define FDELTA MCLK/(65536L*4096) // Frequency increment<br>(Master clock / 228)
<br>#define FREQ_HZ 1048576L * 256 / MCLK // Phase increment<br>corresponding to the f(Hz) frequency<br><br>// ** SetFreq -- the function calculates the phase value<br>// corresponding to the specified frequency.
<br>//<br>unsigned long SetFreq(unsigned f)<br> {<br> unsigned long ul = f * (unsigned long)ScaleFct;<br> return FREQ_HZ * ul;<br> }<br>//<br>// ** PutFreq -- the function loads selected AD9833 frequency register
<br>// with the appropriate value (Freq0 or Freq1 locations)<br>//<br>void PutFreq(char rg)<br> {<br> unsigned n;<br> unsigned f;<br> unsigned long p;<br><br> if (rg) // FREG1 is selected
<br> {<br> n = FREG1_ADR;<br> f = Freq1;<br> }<br> else { // FREG0 is selected<br> n = FREG0_ADR;<br> f = Freq0;<br> }<br> p = SetFreq(f); // Convert frequency
<br> Out9833 (n | (p & 0x3FFF)); // Write LSB half stuff<br> Out9833 (n | ((p>>14) & 0x3FFF)); // Write MSB half stuff<br> }<br><br>Hezky vikend<br><br>Chipsi<br><br><br>Šula Miloš napsal(a):
<br><div><div></div><div class="Wj3C7c">> Zdravim,<br>> muzete mi nekdo poradit, jak soudruzi v analogu pocitaji 14bit LSB a 14bit MSB z 28bitove hodnoty ?<br>><br>> <a href="http://www.analog.com/UploadedFiles/Data_Sheets/AD9833.pdf" target="_blank">
http://www.analog.com/UploadedFiles/Data_Sheets/AD9833.pdf</a><br>> strana 12 tabulka 5.<br>><br>> 28bit hodnotu 0x000FC00 tam prevadi na 14bit LSB 0x0000 a 14bit MSB 0x003F ???<br>><br>> Milos<br>><br></div>
</div>> ------------------------------------------------------------------------<br><div><div></div><div class="Wj3C7c">><br>> _______________________________________________<br>> HW-list mailing list - sponsored by
<a href="http://www.HW.cz" target="_blank">www.HW.cz</a><br>> <a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a><br>> <a href="http://list.hw.cz/mailman/listinfo/hw-list" target="_blank">http://list.hw.cz/mailman/listinfo/hw-list
</a><br>><br><br>_______________________________________________<br>HW-list mailing list - sponsored by <a href="http://www.HW.cz" target="_blank">www.HW.cz</a><br><a href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz
</a><br><a href="http://list.hw.cz/mailman/listinfo/hw-list" target="_blank">http://list.hw.cz/mailman/listinfo/hw-list</a><br></div></div></blockquote></div><br>