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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2013-08-18T13:21:44+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=18&amp;t=3898&amp;mode</id>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2013-08-18T13:21:44+01:00</updated>
<published>2013-08-18T13:21:44+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46180#p46180</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46180#p46180"/>
<title type="html"><![CDATA[Re: Odbieranie znaków z terminala Putty]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46180#p46180"><![CDATA[
zanim uzyjesz bluetootha najpierw zrob to na kablu i dopiero jak ci wyjdzie to przejdz na bt<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 18 sie 2013, o 13:21</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ZgłebiaczTajników]]></name></author>
<updated>2013-08-18T12:57:14+01:00</updated>
<published>2013-08-18T12:57:14+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46173#p46173</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46173#p46173"/>
<title type="html"><![CDATA[Odbieranie znaków z terminala Putty]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=3898&amp;p=46173#p46173"><![CDATA[
Hej,<br />czy putty trzeba jakoś konfigurować aby odbierać znaki wysyłane metodą uart_getc() ?<br />Bo ja nie wiem co ja żle robie ale nie mogę niczego odebrać ani wpisać z klawiatury na terminal.<br />Nawet pomyślałem że może mam kiepski adapter BT i on nie ma komunikacji 2 way? (kosztował 12,50 - jedyny adapter BT w moim pobliżu).<br />Funkcja wygląda tak:<br />[syntax=c]uint8_t uart_getc( void )<br />{<br />/* Wait for data to be received */<br />while ( !(UCSRA &amp; (1&lt;&lt;RXC)) );<br />/* Get and return received data from buffer */<br />return UDR;<br />}[/syntax]<br /><br />A kod main.c tak jak w poradniku:<br />[syntax=c]#include&lt;avr/io.h&gt;<br />#include&lt;avr/interrupt.h&gt;<br />#include&lt;avr/pgmspace.h&gt;<br />#include&lt;util/delay.h&gt;<br />#include&lt;stdlib.h&gt;<br /><br />#include &quot;MYUART/myuart.h&quot;<br />#include &quot;MK_TERMINAL/mk_term.h&quot;<br /><br />void rysuj_menu( void );<br />void show_ADC( void );<br /><br /><br />int main(void){<br /><br /><br />char c;<br />uart_init(_UBRR);<br /><br />sei();<br /><br />tr_cls(0);<br />_delay_ms(1000);<br />uart_puts(&quot;******START******&quot;);<br />_delay_ms(1000);<br /><br />rysuj_menu();<br /><br /><br />while(1)<br />{<br /><br /><br />}<br /><br />}<br /><br /><br />void rysuj_menu( void ){<br /><br />char c;<br />tr_cls(0);<br />tr_attr(0, RED, YELLOW);<br />tr_locate(2, 5);  uart_puts(&quot;  MENU  &quot;);<br /><br />tr_attr(0, CYAN, BLACK);<br />tr_locate(4, 5);  uart_puts(&quot;1.  pokaż wartosć ADC  &quot;);<br />tr_locate(5, 5);  uart_puts(&quot;2.  pokaż licznik  &quot;);<br />tr_locate(6, 5);  uart_puts(&quot;3.  zakończ program  &quot;);<br /><br />tr_attr(0, RED, YELLOW);<br />tr_locate(8, 5);  uart_puts(&quot; wybierz opcję (1-3): &quot;);<br /><br />while(1){<br />c = uart_getc();<br /><br />if(c=='a')<br />{<br />show_ADC();<br /><br />}<br />}<br /><br />}<br /><br /><br />void show_ADC( void ){<br /><br />tr_cls(1);<br />tr_locate(2, 5); uart_puts(&quot;Wartosć ADC to: 2,56 &quot;);<br /><br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1483">ZgłebiaczTajników</a> — 18 sie 2013, o 12:57</p><hr />
]]></content>
</entry>
</feed>