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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2019-05-27T23:17:02+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=30&amp;t=22292&amp;mode</id>
<entry>
<author><name><![CDATA[anshar]]></name></author>
<updated>2019-05-27T23:17:02+01:00</updated>
<published>2019-05-27T23:17:02+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219312#p219312</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219312#p219312"/>
<title type="html"><![CDATA[Re: Uart podstawy podstaw]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219312#p219312"><![CDATA[
Nie widzę linjki:<br />[syntax=c]DDRB |= LED_PIN;[/syntax]<br />(kierunek pinu dla diody LED jako wyjściowy) przed pętlą while.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7157">anshar</a> — 27 maja 2019, o 23:17</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[motomichu30]]></name></author>
<updated>2019-05-27T23:08:10+01:00</updated>
<published>2019-05-27T23:08:10+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219311#p219311</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219311#p219311"/>
<title type="html"><![CDATA[Uart podstawy podstaw]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=22292&amp;p=219311#p219311"><![CDATA[
Witam, nabyłem bibliotekę ze sklepu Atnel do obsługi uarta,<br /> próbuję napisać coś z wykorzystaniem i na początek chciałem zmienić stan diody led jeśli wyślę dany komunikat. Niestety dioda nie reaguje.<br />[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;avr/interrupt.h&gt;<br />#include &lt;avr/pgmspace.h&gt;<br /><br />#include &quot;MK_MULTI_UART/mk_multi_uart.h&quot;<br /><br />#define LED_PIN (1&lt;&lt;PB7)// definicja pinu do którego podłączona jest dioda<br />#define LED_TOG PORTB ^= LED_PIN// makrodefinicja – zmiana stanu diody<br /><br />char rx0buf&#91;50&#93;;<br /><br />//char rx1buf&#91;50&#93;;<br /><br />void parsuj_uart0( void * buf, uint8_t size );<br /><br /><br />int main( void ) {<br /><br />// inicjalizacja UART<br />uart_init();<br />uart_reg_callback( 0, rx0buf, parsuj_uart0 );<br /><br />uart_echo( 0, 1 );<br /><br /><br /><br />sei();<br /><br />tr_intro( 0 );<br /><br />while(1) {<br />UART_RX_EVENT();<br />}<br />}<br /><br />void parsuj_uart0( void * buf, uint8_t size ) {<br />    if ( !strcasecmp_P( buf, PSTR( &quot;ATI&quot; ) ) ) {<br />        uart_puts_P( 0, PSTR(&quot;* MkMultiUART UART0 *\r\n&quot;) );<br /><br />    }<br /><br />    if ( !strcasecmp_P( buf, PSTR( &quot;ATI&quot; ) ) ) {<br />    LED_TOG;<br /><br />        }<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6133">motomichu30</a> — 27 maja 2019, o 23:08</p><hr />
]]></content>
</entry>
</feed>