<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=58&amp;t=19178&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2017-09-14T10:51:49+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=58&amp;t=19178&amp;mode</id>
<entry>
<author><name><![CDATA[BARVX]]></name></author>
<updated>2017-09-14T10:51:49+01:00</updated>
<published>2017-09-14T10:51:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195085#p195085</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195085#p195085"/>
<title type="html"><![CDATA[Re: TEA5767]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195085#p195085"><![CDATA[
Dzięki pomogło. Ja myślałem, że TWI_write(adr); to od którego adresu chcemy  zaczynać zapisywać<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=15944">BARVX</a> — 14 wrz 2017, o 10:51</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[jacekk232]]></name></author>
<updated>2017-09-13T14:19:50+01:00</updated>
<published>2017-09-13T14:19:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195023#p195023</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195023#p195023"/>
<title type="html"><![CDATA[Re: TEA5767]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195023#p195023"><![CDATA[
Spróbuj wysłać dane do odbiorniczka na piechotę w taki sposób<br />[syntax=c]TWI_start();<br />TWI_write(192);<br />TWI_write(0b00110010);<br />TWI_write(0b11111100);<br />TWI_write(0b00010000);<br />TWI_write(0b00010000);<br />TWI_write(0b00000000);<br />TWI_start();[/syntax]<br /><br />Wydaje mi się, że źle wysyłasz dane.<br />Ciało oryginalnej funkcji write_buf wygląda tak<br />[syntax=c]TWI_start();<br />TWI_write(SLA);<br />TWI_write(adr);<br />while (len--) TWI_write(*buf++);<br />TWI_stop();[/syntax]<br /><br />Zobacz co doleci do odbiorniczka po takim wywołaniu tej funkcji<br />[syntax=c]TWI_write_buf(192, 0, 4, bufor);[/syntax]<br /><br />Po rozkazie startu zostanie wysłany adres TEA5767 (192). Następnie zostanie wysłany bajt o wartości zero, który zostanie potraktowany jako pierwszy bajt danych. A potem w pętli wysłane zostaną cztery bajty począwszy od wartości w bufor[0]. Z tego co pamiętam to do TEA5767 trzeba za każdym razem wysłać wszystkie pięć bajtów. <br /><br />W twoim przypadki do odbiorniczka doleci taki układ bajtów<br />[syntax=c]0b00000000;<br />0b00110010;<br />0b11111100;<br />0b00010000;<br />0b00010000;[/syntax]<br /><br />Ja w swoim kodzie używam takiej funkcji do wysyłania<br />[syntax=c]void TEA5767_write_buf( uint8_t SLA, uint8_t len, uint8_t *buf ) {<br /><br />TWI_start();<br />TWI_write(SLA);<br /><br />while (len--) TWI_write(*buf++);<br />TWI_stop();<br />}[/syntax]<br /><br />A potem w kodzie tak ją wywołuje<br />[syntax=c]TEA5767_write_buf(TEA5767_ADDR_W, 5, TEA5767_write_reg);[/syntax]<br />TEA5767_write_reg to tablica mająca pięć elementów.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=204">jacekk232</a> — 13 wrz 2017, o 14:19</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[BARVX]]></name></author>
<updated>2017-09-13T10:26:21+01:00</updated>
<published>2017-09-13T10:26:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195006#p195006</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195006#p195006"/>
<title type="html"><![CDATA[TEA5767]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19178&amp;p=195006#p195006"><![CDATA[
[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;avr/interrupt.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />#include &quot;hd44780/hd44780.h&quot;<br />#include &quot;I2C_TWI/i2c_twi.h&quot;<br /><br /><br />uint8_t bufor&#91;5&#93;;<br /><br />int main(void)<br />{<br />i2cSetBitrate(100);<br />LCD_Initalize();<br /><br /><br />bufor&#91;0&#93; = 0b00110010;<br />bufor&#91;1&#93; = 0b11111100;<br />bufor&#91;2&#93; = 0b00010000;<br />bufor&#91;3&#93; = 0b00010000;<br />bufor&#91;4&#93; = 0b00000000;<br /><br />TWI_write_buf(192, 0, 4, bufor);<br /><br />//sei();<br /><br />while(1)<br />{<br /><br />}<br />}[/syntax]<br /><br />Napisałem program który ma  sprawdzić czy moduł działa dla jednej częstotliwości, ale po wgraniu programu słychać same szumy. . Częstotliwość stacji 106,7 Mhz    PLL = 13 052 dla high side injection. Moduł połączyłem jak na schemacie.<br /><a href="https://obrazkiforum.atnel.pl/15944/3022d407480e116ea6811605ed4101ec.jpg"  class="postlink"><img src="https://obrazkiforum.atnel.pl/thumb/15944/3022d407480e116ea6811605ed4101ec.jpg" alt="Obrazek" /></a><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=15944">BARVX</a> — 13 wrz 2017, o 10:26</p><hr />
]]></content>
</entry>
</feed>