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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-05-23T21:06:53+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=8&amp;t=7132&amp;mode</id>
<entry>
<author><name><![CDATA[krish]]></name></author>
<updated>2014-05-23T21:06:53+01:00</updated>
<published>2014-05-23T21:06:53+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=82193#p82193</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=82193#p82193"/>
<title type="html"><![CDATA[Re: Atmega128 UART1 nie odbiera danych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=82193#p82193"><![CDATA[
Czy zmieniłeś tryb kompatybilności z ATmega103 na ATmega128 (w fusach) ?<br />cyt. z datasheeta:<br />Note that in ATmega103 compatibility mode, USART1 is not available,<br />neither is the UBRR0H or UCRS0C Registers. This means that in ATmega103 compatibility<br />mode, the ATmega128 supports asynchronous operation of USART0 only.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2273">krish</a> — 23 maja 2014, o 21:06</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[dejwid40]]></name></author>
<updated>2014-05-19T00:49:54+01:00</updated>
<published>2014-05-19T00:49:54+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=81680#p81680</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=81680#p81680"/>
<title type="html"><![CDATA[Atmega128 UART1 nie odbiera danych]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7132&amp;p=81680#p81680"><![CDATA[
Witam wszyskich <br /><br />Problem wygląda następująco, nie mogę odebrać żadnych danych za pomoca uarta1 atmegii 128 (poprawnie wysyła ale nic nie odbiera ;/ ) Prosiłbym o wszelką pomoc, poniżej wklejam programy inicjalizacji i odbioru:<br /><br />[syntax=c]void USART_Init( unsigned int ubrr, unsigned int port)<br />{<br />switch (port)<br />{<br />case 0:<br />/* Set baud rate */<br />UBRR0H = (unsigned char)(ubrr&gt;&gt;8);<br />UBRR0L = (unsigned char)ubrr;<br />/* Enable receiver and transmitter */<br />UCSR0B = (1&lt;&lt;RXEN0)|(1&lt;&lt;TXEN0)|(1&lt;&lt;RXCIE0);<br /><br />UCSR0C = (3&lt;&lt;UCSZ0);<br />break;<br /><br />case 1:<br />/* Set baud rate */<br />UBRR1H = (unsigned char)(ubrr&gt;&gt;8);<br />UBRR1L = (unsigned char)ubrr;<br />/* Enable receiver and transmitter */<br />UCSR1B = (1&lt;&lt;RXEN1)|(1&lt;&lt;TXEN1)|(1&lt;&lt;RXCIE1);<br /><br />//UCSR1C = (1&lt;&lt;UCSZ11)|(1&lt;&lt;UCSZ10);<br /> //UCSR1C =(1&lt;&lt;USBS)|(1&lt;&lt;UCSZ11)|(1&lt;&lt;UCSZ10);<br /> UCSR1C = (3&lt;&lt;UCSZ10);<br />break;<br />}<br />}<br /><br /><br />unsigned char USART_Receive(uint8_t port)<br />{<br />switch (port)<br />{<br />case 0:<br />/* Wait for data to be received */<br />while ( !(UCSR0A &amp; (1&lt;&lt;RXC0)) )<br />;<br />/* Get and return received data from buffer */<br />return UDR0;<br /><br /><br />case 1: <br />/* Wait for data to be received */<br /><br />while ( !(UCSR1A &amp; (1&lt;&lt;RXC1)) )<br />;<br /><br />/* Get and return received data from buffer */<br />return UDR1;<br /><br />default:<br />return 0;<br />}<br />}[/syntax]<br /><br /><span style="color: #FF0000">Kody wklejamy przy pomocy syntax=c - Różowo-zielony J.</span><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1665">dejwid40</a> — 19 maja 2014, o 00:49</p><hr />
]]></content>
</entry>
</feed>