<?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=22921&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2020-03-14T20:46:57+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=58&amp;t=22921&amp;mode</id>
<entry>
<author><name><![CDATA[auers]]></name></author>
<updated>2020-03-14T20:46:57+01:00</updated>
<published>2020-03-14T20:46:57+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225327#p225327</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225327#p225327"/>
<title type="html"><![CDATA[Re: Poprawność wysyłanego adresu na magistralę I2C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225327#p225327"><![CDATA[
Wg rysunku który zamieściłeś najpierw wysyłasz starszą potem młodszą część adresu, czyli:<br /><br />TWI_start;<br />TWI_write(0x52); //wysyłam adres slave<br />TWI_write(0x00);   // pierwsze 8 bitów adresu rejestru index[15:8] <br />TWI_write(0xe5 ); // drugie 8 bitów adresu rejestru index[7:0] <br />TWI_start;<br />TWI_write(0x52+1);<br />.....<br />TWI_stop;<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7806">auers</a> — 14 mar 2020, o 20:46</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Nierealny]]></name></author>
<updated>2020-03-14T15:20:32+01:00</updated>
<published>2020-03-14T15:20:32+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225318#p225318</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225318#p225318"/>
<title type="html"><![CDATA[Poprawność wysyłanego adresu na magistralę I2C]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22921&amp;p=225318#p225318"><![CDATA[
Witam.<br />Chcę odczytać bajt danych z urządzenia podrzędnego. Proces odczytu ze slave'a przedstawia fotografia:<br /><br /><img src="https://obrazkiforum.atnel.pl/21317/898cbdee68dc202114f97d0ba4505abe.jpg" alt="Obrazek" /><br /><br />0x52 - adres slave'a, adres rejestru spod którego chcę odczytać dane to: 0x00E5. Używając funkcji TWI_read_buf wygląda to następująco:<br /><br />TWI_start;<br />TWI_write(0x52); //wysyłam adres slave<br /><strong>TWI_write(??);</strong> //   pierwsze 8 bitów adresu rejestru  index[15:8]  - <span style="color: #FF0000"><span style="text-decoration: underline">(0x00 czy 0xE5)??</span></span><br /><strong>TWI_write(??);</strong> //   drugie 8 bitów adresu rejestru  index[7:0]  - <span style="color: #FF0000"><span style="text-decoration: underline">(0x00 czy 0xE5)??</span></span><br />TWI_start;<br />TWI_write(0x52+1);<br />.....<br />TWI_stop;<br /><br />Adres spod którego chcę oczytać dane ma 16 bitów. Chciałbym upewnić się w jakiej kolejności mam wysłać ten adres. <br /><br />Z góry dziękuję za pomoc. <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=21317">Nierealny</a> — 14 mar 2020, o 15:20</p><hr />
]]></content>
</entry>
</feed>