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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-10-15T10:46:46+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=46&amp;t=1625&amp;mode</id>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2016-10-15T10:46:46+01:00</updated>
<published>2016-10-15T10:46:46+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171657#p171657</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171657#p171657"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171657#p171657"><![CDATA[
PROSZĘ SIĘ NIE PODPINAĆ  DO TEMATÓW Z RÓŻNYMI PROBLEMAMI <br />A ZAKŁADAĆ NOWE WŁASNE WĄTKI  !!!!<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 15 paź 2016, o 10:46</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[lukas12]]></name></author>
<updated>2016-10-14T22:04:38+01:00</updated>
<published>2016-10-14T22:04:38+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171610#p171610</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171610#p171610"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=171610#p171610"><![CDATA[
Witam, mam problem, zainstalowałem dziś gcc-arm-none-eabi-5_4-2016q3 i CoIDE_V2Beta niestety nie mogę skompilować żadnego programu bo wyskakuje błąd:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">GCC HOME: C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin<br />compile:<br />    &#91;mkdir&#93; Skipping D:\STM32\workspace\first\first\Debug\bin because it already exists.<br />    &#91;mkdir&#93; Skipping D:\STM32\workspace\first\first\Debug\obj because it already exists.<br /><br />BUILD FAILED<br />Output filename conflict: pwm.o would be produced from D:\STM32\workspace\first\components\coocox-master\M0518_Series_BSP_CMSIS\source\Library\StdDriver\src\pwm.c and pwm.c<br />Total time: 0 seconds</div><br /><br />Zmiana rozszerzeń na s powoduje, że CoIDE ma błąd w innej bibliotece i tak już 5 razy zmieniłem np. z pwm.c na pwm.s<br />Co zrobić, żeby poradzić sobie z problemem ?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=513">lukas12</a> — 14 paź 2016, o 22:04</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[anshar]]></name></author>
<updated>2015-10-17T21:22:58+01:00</updated>
<published>2015-10-17T21:22:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142723#p142723</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142723#p142723"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142723#p142723"><![CDATA[
Dziękuję bardzo!<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 7 minutach ]</span></strong><br /><br />Napisałem tą bibliotekę sam na podstawie tej z BB lecz niestety nie chce ruszyć. Porównam z tą Twoją i może w końcu uda mi się znaleźć babola.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7157">anshar</a> — 17 paź 2015, o 21:22</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2015-10-17T21:00:48+01:00</updated>
<published>2015-10-17T21:00:48+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142721#p142721</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142721#p142721"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142721#p142721"><![CDATA[
<div class="quotetitle">anshar napisał(a):</div><div class="quotecontent"><br />Niestety wygląda na to, że link nie działa. <br />Czy jest jeszcze możliwość jej pobrania?<br /><br />Z góry wielkie dzięki!<br /></div><br /><br />Pliki są ale niema czasu na poprawianie wszystkich linków w artach <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><br />musisz poczekać sukcesywnie na prawaim co się da po padzie <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 10 minutach ]</span></strong><br /><br />To naprawiłem możesz korzystać<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 17 paź 2015, o 21:00</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[anshar]]></name></author>
<updated>2015-10-17T20:40:15+01:00</updated>
<published>2015-10-17T20:40:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142717#p142717</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142717#p142717"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=142717#p142717"><![CDATA[
<div class="quotetitle">SunRiver napisał(a):</div><div class="quotecontent"><br />poszukaj na mojej stronie lepszej biblioteki ....<br /></div><br /><br />Niestety wygląda na to, że link nie działa. <br />Czy jest jeszcze możliwość jej pobrania?<br /><br />Z góry wielkie dzięki!<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=7157">anshar</a> — 17 paź 2015, o 20:40</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T19:32:49+01:00</updated>
<published>2013-05-14T19:32:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36942#p36942</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36942#p36942"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36942#p36942"><![CDATA[
Super! Ja głupi nie skopiowałem fragmentu:<br /><br />[syntax=c]void reverse(int8_t s&#91;&#93;)<br />{<br />int i, j;<br />char c=0;<br /> <br />for (i = 0, j = strlen(s)-1; i&lt;j; i++, j--)<br />{ c = s&#91;i&#93;;<br />s&#91;i&#93; = s&#91;j&#93;;<br />s&#91;j&#93; = c;<br />}<br />}[/syntax]<br /><br />I dziwiłem się że mi nie działa. Ach ta chęć zdobywania wiedzy. O wszystkim się zapomina. Dzięki Chłopaki! <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=488">rafkins22</a> — 14 maja 2013, o 19:32</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Lukasz89]]></name></author>
<updated>2013-05-14T18:36:54+01:00</updated>
<published>2013-05-14T18:36:54+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36934#p36934</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36934#p36934"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36934#p36934"><![CDATA[
Kiedyś używałem lib do lcd to bazowałem na tym od SunRivera i wtedy bodajże 1 wersja nie udostępniała funkcji jakiej Ty szukasz, choć potem był jej aktualizacjia - której nie widziałem.<br />funkcja Wyslij_na_LCD jako argument oczekuje wskaźnika na tablice. A wiec licznik trzeb potraktować funkcją iota (zobacz jak to wygląda w lib u Mirka).<br />Ja ponieważ miał problem z inludowanie iota, sam, na podstawie przykładu zdefiniowałem sobie taką funkcję.:[syntax=c]void itoa(uint16_t n, int8_t s&#91;&#93;)<br />{<br />int i, sign;<br />if ((sign = n) &lt; 0) <br />n = -n;<br />i = 0;<br />do { <br />s&#91;i++&#93; = (n % 10 + '0'); <br />} while ((n /=10) &gt; 0); <br />if (sign &lt; 0)<br />s&#91;i++&#93; = '-';<br />s&#91;i&#93; = '\0';<br />reverse(s);<br />}<br /><br />void reverse(int8_t s&#91;&#93;)<br />{<br />int i, j;<br />char c=0;<br /><br />for (i = 0, j = strlen(s)-1; i&lt;j; i++, j--)<br />{ c = s&#91;i&#93;;<br />s&#91;i&#93; = s&#91;j&#93;;<br />s&#91;j&#93; = c;<br />}<br />}<br /><br />void lcd_liczba(uint16_t val)<br />{<br />uint8_t bufor&#91;17&#93;;<br />itoa(val, bufor);<br />Wyslij_na_LCD(bufor);<br />}[/syntax]<br />Edit: Sun był pierwszy <img src="https://forum.atnel.pl/images/smilies/icon_razz.gif" alt=":P" title="Pokazuje język" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=590">Lukasz89</a> — 14 maja 2013, o 18:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-14T18:35:29+01:00</updated>
<published>2013-05-14T18:35:29+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36933#p36933</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36933#p36933"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36933#p36933"><![CDATA[
zobacz np tak:<br /><br />[syntax=c]itoa(Wartosc/10,LCD_text);<br />  Wyslij_na_LCD(LCD_text);<br />  Wyslij_na_LCD(&quot;.\0&quot;);<br />  itoa(Wartosc % 10,LCD_text);<br />  Wyslij_na_LCD(LCD_text);<br />  Wyslij_na_LCD(&quot; C  \0&quot;);[/syntax]<br /><br />oczywiście dopasuj pod siebie <br /><br />oczywiście najpierw trzeba :<br />-- zedefiniować funkcje prywatną <br /><br />[syntax=c]void itoa(uint16_t n, int8_t s&#91;&#93;);[/syntax]<br /><br />i osadzić jej ciało w main.c<br /><br />[syntax=c]/**<br />  * Konwersja Int na String<br />  * x = input integer, s = output buffer<br />  */<br />void itoa(uint16_t n, int8_t s&#91;&#93;)<br />{<br />    int i, sign;<br />    if ((sign = n) &lt; 0) <br />        n = -n;          <br />    i = 0;<br />    do {       <br />        s&#91;i++&#93; = n % 10 + '0';   <br />    } while ((n /= 10) &gt; 0);     <br />    if (sign &lt; 0)<br />        s&#91;i++&#93; = '-';<br />    s&#91;i&#93; = '\0';<br />    reverse(s);<br />}[/syntax]<br /><br /><br />i <br /><br />[syntax=c]/**<br />  *  odwrócenie stringów<br />  *  s = string<br />*/<br />void reverse(int8_t s&#91;&#93;)<br />{<br />    int i, j;<br />    char c;<br /><br />    for (i = 0, j = strlen(s)-1; i&lt;j; i++, j--) {<br />        c = s&#91;i&#93;;<br />        s&#91;i&#93; = s&#91;j&#93;;<br />        s&#91;j&#93; = c;<br />    }<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 14 maja 2013, o 18:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T18:22:08+01:00</updated>
<published>2013-05-14T18:22:08+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36931#p36931</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36931#p36931"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36931#p36931"><![CDATA[
Przykładowo mając taki kod:<br />[syntax=c]#include &lt;stddef.h&gt;<br />#include &quot;stm32f10x.h&quot;<br />#include &quot;SunLCD.h&quot;<br /><br />void Delay(__IO uint32_t nTick);<br />uint8_t licznik=2;<br /><br />int main(void){<br />IO_init();<br />GPIO_LCD_Init();<br />Delay(0xAAAAA);<br />LCD_Init();<br />LCD_Clear();<br />Wyslij_na_LCD(licznik);<br />}<br /><br />void Delay(__IO uint32_t nTick)<br />{<br />for(; nTick != 0; nTick--);<br />}[/syntax]<br /><br />Na wyświetlaczu nic nie wyświetla, a powinno wyświetlić 2. Co może być nie tak?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=488">rafkins22</a> — 14 maja 2013, o 18:22</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-14T17:04:19+01:00</updated>
<published>2013-05-14T17:04:19+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36926#p36926</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36926#p36926"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36926#p36926"><![CDATA[
zawsze można dopisac choć działa normalnie <br />wyslij_na_lcd(zmienna);<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 14 maja 2013, o 17:04</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T16:03:15+01:00</updated>
<published>2013-05-14T16:03:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36920#p36920</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36920#p36920"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36920#p36920"><![CDATA[
licznik=10<br /><br />Nie chodzi mi o wpisanie Wyslij_na_LCD(&quot;10&quot;), tylko przykładowo zmienna licznik jest zmieniana w programie przez inkrementacja i przyjmuje kolejne wartości. Funkcja powinna wyglądać podobnie do funkcji lcd_int autorstwa mirekk36, czyli lcd_int(licznik);<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=488">rafkins22</a> — 14 maja 2013, o 16:03</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-14T15:54:32+01:00</updated>
<published>2013-05-14T15:54:32+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36919#p36919</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36919#p36919"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36919#p36919"><![CDATA[
poprzez wyświetlanie wartości zmiennej np <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 14 maja 2013, o 15:54</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T15:43:06+01:00</updated>
<published>2013-05-14T15:43:06+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36916#p36916</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36916#p36916"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36916#p36916"><![CDATA[
Ok wyłączyłem kursor i zrobiłem funkcję LCD_locate. A w jaki sposób można wyświetlać wartości zmiennych w postaci dziesiętnej?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=488">rafkins22</a> — 14 maja 2013, o 15:43</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-14T15:25:42+01:00</updated>
<published>2013-05-14T15:25:42+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36913#p36913</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36913#p36913"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36913#p36913"><![CDATA[
musisz wyłaczyc kursor<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 14 maja 2013, o 15:25</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T15:13:11+01:00</updated>
<published>2013-05-14T15:13:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36912#p36912</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36912#p36912"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36912#p36912"><![CDATA[
Ok uruchomiłem bibliotekę. Wyświetla mi znak oraz łańcuch, jednak na końcu wyrażenia zawsze jest &quot;_&quot;, tzn np wpisuje w funkcji Wyslij_na_lCD(&quot;witam&quot;) a na wyświetlaczu mam &quot;witam_&quot;. Ponadto bardzo zależałoby mi na jeszcze 2 funkcjach : lcd_locate oraz lcd_int(), która pozwala na wyświetlanie wartości zmiennych. Jak można to zrealizować. Próbowałem funkcji itoa z lekcji ADC ale straszne krzaczki wyskakują. <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=488">rafkins22</a> — 14 maja 2013, o 15:13</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-14T12:28:16+01:00</updated>
<published>2013-05-14T12:28:16+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36904#p36904</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36904#p36904"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36904#p36904"><![CDATA[
poszukaj na mojej stronie lepszej biblioteki ....<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 14 maja 2013, o 12:28</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rafkins22]]></name></author>
<updated>2013-05-14T12:20:17+01:00</updated>
<published>2013-05-14T12:20:17+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36902#p36902</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36902#p36902"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36902#p36902"><![CDATA[
Posiadam zestaw STM32VLdiscovery i zabrałem się za obsługę wyświetlacza zgodnego ze standardem HD44870. Znalazłem biblioteki, które wyglądają następująco:<br /><br />[syntax=c]//******************************************************************************<br />//    THE SOFTWARE INCLUDED IN THIS FILE IS FOR GUIDANCE ONLY.<br />//    AUTHOR SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT<br />//    OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING<br />//    FROM USE OF THIS SOFTWARE.<br />//<br />//    PROGRAM ZAWARTY W TYM PLIKU PRZEZNACZONY JEST WYLACZNIE<br />//    DO CELOW SZKOLENIOWYCH. AUTOR NIE PONOSI ODPOWIEDZIALNOSCI<br />//    ZA ZADNE EWENTUALNE, BEZPOSREDNIE I POSREDNIE SZKODY<br />//    WYNIKLE Z JEGO WYKORZYSTANIA.<br />//******************************************************************************<br /><br />#include &quot;lcd_hd44780_lib.h&quot;<br />#include &quot;stm32f10x_gpio.h&quot;<br /><br /><br />GPIO_InitTypeDef GPIO_InitStructure;<br /><br />//-----------------------------------------------------------------------------<br />void LCD_WriteNibble(unsigned char nibbleToWrite)<br />{<br />  GPIO_WriteBit(LCD_GPIO, LCD_EN, Bit_SET);<br />  GPIO_WriteBit(LCD_GPIO, LCD_D4, (nibbleToWrite &amp; 0x01));<br />  GPIO_WriteBit(LCD_GPIO, LCD_D5, (nibbleToWrite &amp; 0x02));<br />  GPIO_WriteBit(LCD_GPIO, LCD_D6, (nibbleToWrite &amp; 0x04));<br />  GPIO_WriteBit(LCD_GPIO, LCD_D7, (nibbleToWrite &amp; 0x08));<br />  GPIO_WriteBit(LCD_GPIO, LCD_EN, Bit_RESET);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />unsigned char LCD_ReadNibble(void)<br />{<br />  unsigned char tmp = 0;<br />  GPIO_WriteBit(LCD_GPIO, LCD_EN, Bit_SET);<br />  tmp |= (GPIO_ReadInputDataBit(LCD_GPIO, LCD_D4) &lt;&lt; 0);<br />  tmp |= (GPIO_ReadInputDataBit(LCD_GPIO, LCD_D5) &lt;&lt; 1);<br />  tmp |= (GPIO_ReadInputDataBit(LCD_GPIO, LCD_D6) &lt;&lt; 2);<br />  tmp |= (GPIO_ReadInputDataBit(LCD_GPIO, LCD_D7) &lt;&lt; 3);<br />  GPIO_WriteBit(LCD_GPIO, LCD_EN, Bit_RESET);<br />  return tmp;<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />unsigned char LCD_ReadStatus(void)<br />{<br />  unsigned char status = 0;<br />  <br />  GPIO_InitStructure.GPIO_Pin   =  LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7;<br />  GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_IPU;<br />  GPIO_Init(LCD_GPIO, &amp;GPIO_InitStructure);<br />  <br />  GPIO_WriteBit(LCD_GPIO, LCD_RW, Bit_SET);<br />  GPIO_WriteBit(LCD_GPIO, LCD_RS, Bit_RESET);<br />  <br />  status |= (LCD_ReadNibble() &lt;&lt; 4);<br />  status |= LCD_ReadNibble();<br />  <br />  GPIO_InitStructure.GPIO_Pin   =  LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7;<br />  GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_Out_PP;<br />  GPIO_Init(LCD_GPIO, &amp;GPIO_InitStructure);<br />  <br />  return status;<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_WriteData(unsigned char dataToWrite)<br />{<br />  GPIO_WriteBit(LCD_GPIO, LCD_RW, Bit_RESET);<br />  GPIO_WriteBit(LCD_GPIO, LCD_RS, Bit_SET);<br />  <br />  LCD_WriteNibble(dataToWrite &gt;&gt; 4);<br />  LCD_WriteNibble(dataToWrite &amp; 0x0F);<br />  <br />  while(LCD_ReadStatus() &amp; 0x80);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_WriteCommand(unsigned char commandToWrite)<br />{<br />  GPIO_WriteBit(LCD_GPIO, LCD_RW | LCD_RS, Bit_RESET);<br />  LCD_WriteNibble(commandToWrite &gt;&gt; 4);<br />  LCD_WriteNibble(commandToWrite &amp; 0x0F);<br />  <br />  while(LCD_ReadStatus() &amp; 0x80);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_str(unsigned char * text)<br />{<br />  while(*text)<br />    LCD_WriteData(*text++);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_locate(unsigned char x, unsigned char y)<br />{<br />  LCD_WriteCommand(HD44780_DDRAM_SET | (x + (0x40 * y)));<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_strXY(unsigned char * text, unsigned char x, unsigned char y)<br />{<br />  LCD_locate(x,y);<br />  while(*text)<br />    LCD_WriteData(*text++);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_WriteBinary(unsigned int var, unsigned char bitCount)<br />{<br />  signed char i;<br />  <br />  for(i = (bitCount - 1); i &gt;= 0; i--)<br />     {<br />     LCD_WriteData((var &amp; (1 &lt;&lt; i))?'1':'0');<br />     }<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_ShiftLeft(void)<br />{<br />  LCD_WriteCommand(HD44780_DISPLAY_CURSOR_SHIFT | HD44780_SHIFT_LEFT | HD44780_SHIFT_DISPLAY);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_ShiftRight(void)<br />{<br />  LCD_WriteCommand(HD44780_DISPLAY_CURSOR_SHIFT | HD44780_SHIFT_RIGHT | HD44780_SHIFT_DISPLAY);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_init(void)<br />{<br />  volatile unsigned char i = 0;<br />  volatile unsigned int delayCnt = 0;<br />  <br />  GPIO_InitStructure.GPIO_Pin   =  LCD_D4|LCD_D5|LCD_D6|LCD_D7|LCD_RS|LCD_RW|LCD_EN;<br />  GPIO_InitStructure.GPIO_Speed =  GPIO_Speed_50MHz;<br />  GPIO_InitStructure.GPIO_Mode  =  GPIO_Mode_Out_PP;<br />  <br />  GPIO_Init(LCD_GPIO, &amp;GPIO_InitStructure);<br />  <br />  GPIO_ResetBits(LCD_GPIO, LCD_RS | LCD_EN | LCD_RW);<br />  <br />  for(delayCnt = 0; delayCnt &lt; 300000; delayCnt++);<br />  <br />  for(i = 0; i &lt; 3; i++) {<br />    LCD_WriteNibble(0x03);            <br />    for(delayCnt = 0; delayCnt &lt; 30000; delayCnt++);<br />  }<br />  <br />  LCD_WriteNibble(0x02);             <br />  <br />  for(delayCnt = 0; delayCnt &lt; 6000; delayCnt++);<br />     <br />  LCD_WriteCommand(HD44780_FUNCTION_SET | <br />                   HD44780_FONT5x7 | <br />                   HD44780_TWO_LINE | <br />                   HD44780_4_BIT);<br />  <br />  LCD_WriteCommand(HD44780_DISPLAY_ONOFF | <br />                   HD44780_DISPLAY_OFF); <br />  <br />  LCD_WriteCommand(HD44780_CLEAR); <br />  <br />  LCD_WriteCommand(HD44780_ENTRY_MODE | <br />                   HD44780_EM_SHIFT_CURSOR | <br />                   HD44780_EM_INCREMENT);<br />  <br />  LCD_WriteCommand(HD44780_DISPLAY_ONOFF | <br />                   HD44780_DISPLAY_ON |<br />                   HD44780_CURSOR_OFF | <br />                   HD44780_CURSOR_NOBLINK);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_SetUserChar (unsigned char chrNum, unsigned char n, const unsigned char *p)<br />{         //chrNum  - character number (code) to be registered (0..7)<br />          //n       - number of characters to register<br />          //*p      - pointer to the character pattern (8 * n bytes)<br />LCD_WriteCommand(HD44780_CGRAM_SET | chrNum * 8);<br />n *= 8;<br />do<br />LCD_WriteData(*p++);<br />while (--n);<br />}<br /><br /><br />//-----------------------------------------------------------------------------<br />void LCD_cls(void){<br />LCD_WriteCommand(HD44780_CLEAR);<br />}<br />//-----------------------------------------------------------------------------<br />unsigned char* intToStr(int n) //prymitywny przetwornik int to string<br />{<br />     int i = 0;<br />     char *tmp = (char*)malloc(12); // stdlib<br />     char *ret = (char*)malloc(12);<br />     if(n &lt; 0) {<br />          *ret = '-';<br />          i++;<br />          n = -n;<br />     }<br />     do {<br />          *tmp = n % 10 + 48;<br />          n -= n % 10;<br />          if(n &gt; 9) *tmp++;<br />     }<br />     while(n /= 10);<br />     while(ret&#91;i++&#93; = *tmp--);<br />     return ret;<br />}<br />//------------------------------------------------------------------------------<br />void LCD_int(int n){<br /><br />LCD_str(intToStr(n));<br />}[/syntax]<br /><br />oraz <br /><br />[syntax=c]//******************************************************************************<br />//    THE SOFTWARE INCLUDED IN THIS FILE IS FOR GUIDANCE ONLY.<br />//    AUTHOR SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT<br />//    OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING<br />//    FROM USE OF THIS SOFTWARE.<br />//<br />//    PROGRAM ZAWARTY W TYM PLIKU PRZEZNACZONY JEST WYLACZNIE<br />//    DO CELOW SZKOLENIOWYCH. AUTOR NIE PONOSI ODPOWIEDZIALNOSCI<br />//    ZA ZADNE EWENTUALNE, BEZPOSREDNIE I POSREDNIE SZKODY<br />//    WYNIKLE Z JEGO WYKORZYSTANIA.<br />//******************************************************************************<br /><br />#define LCD_GPIO GPIOC<br />#define LCD_D4 GPIO_Pin_0<br />#define LCD_D5 GPIO_Pin_1<br />#define LCD_D6 GPIO_Pin_2<br />#define LCD_D7 GPIO_Pin_3<br /><br />#define LCD_RS GPIO_Pin_6<br />#define LCD_RW GPIO_Pin_13<br />#define LCD_EN GPIO_Pin_7<br /><br /><br />#define HD44780_CLEAR       0x01<br /><br />#define HD44780_HOME       0x02<br /><br />#define HD44780_ENTRY_MODE   0x04<br />#define HD44780_EM_SHIFT_CURSOR 0<br />#define HD44780_EM_SHIFT_DISPLAY 1<br />#define HD44780_EM_DECREMENT   0<br />#define HD44780_EM_INCREMENT   2<br /><br />#define HD44780_DISPLAY_ONOFF   0x08<br />#define HD44780_DISPLAY_OFF     0<br />#define HD44780_DISPLAY_ON   4<br />#define HD44780_CURSOR_OFF   0<br />#define HD44780_CURSOR_ON     2<br />#define HD44780_CURSOR_NOBLINK   0<br />#define HD44780_CURSOR_BLINK   1<br /><br />#define HD44780_DISPLAY_CURSOR_SHIFT 0x10<br />#define HD44780_SHIFT_CURSOR   0<br />#define HD44780_SHIFT_DISPLAY   8<br />#define HD44780_SHIFT_LEFT   0<br />#define HD44780_SHIFT_RIGHT     4<br /><br />#define HD44780_FUNCTION_SET   0x20<br />#define HD44780_FONT5x7     0<br />#define HD44780_FONT5x10     4<br />#define HD44780_ONE_LINE     0<br />#define HD44780_TWO_LINE     8<br />#define HD44780_4_BIT       0<br />#define HD44780_8_BIT       16<br /><br />#define HD44780_CGRAM_SET     0x40<br /><br />#define HD44780_DDRAM_SET     0x80<br /><br />void LCD_init(void);<br />void LCD_locate(unsigned char x, unsigned char y);<br />void LCD_str(unsigned char * text);<br />void LCD_strXY(unsigned char * text, unsigned char x, unsigned char y);<br />void LCD_cls(void);<br />void LCD_int(int n);<br /><br />//################################################<br /><br />void LCD_WriteData(unsigned char dataToWrite);<br />void LCD_WriteCommand(unsigned char commandToWrite);<br />void LCD_WriteBinary(unsigned int var, unsigned char bitCount);<br />void LCD_SetUserChar (unsigned char chrNum, unsigned char n, const unsigned char *p);[/syntax]<br /><br />Problem pojawia się w momencie kiedy chcę wyświetlić zmienną w postaci dziesiętnej używając funkcji LCD_int(), która nie działa poprawnie, tzn. np licznik=1, wyświetla na LCD 1 i jakieś 3 krzaczki. Czy wiecie w jaki sposób można skonwertować int na string, aby przykładowo wyświetlacz liczbę obrotów na wyświetlaczu LCD?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=488">rafkins22</a> — 14 maja 2013, o 12:20</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rogal.150]]></name></author>
<updated>2013-05-07T16:56:10+01:00</updated>
<published>2013-05-07T16:56:10+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36385#p36385</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36385#p36385"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36385#p36385"><![CDATA[
generalnie chodzi mi o wymiar czcionki <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /> bo przy dużym monitorze to czcionka jest bardzo mała.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1237">rogal.150</a> — 7 maja 2013, o 16:56</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-07T08:54:42+01:00</updated>
<published>2013-05-07T08:54:42+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36361#p36361</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36361#p36361"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36361#p36361"><![CDATA[
przecież jest w porządku czcionka w CoIDE<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 7 maja 2013, o 08:54</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[rogal.150]]></name></author>
<updated>2013-05-07T08:37:13+01:00</updated>
<published>2013-05-07T08:37:13+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36360#p36360</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36360#p36360"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=36360#p36360"><![CDATA[
siema , możne ktoś poradził sobie ze zmianą czcionki w CooCox ?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1237">rogal.150</a> — 7 maja 2013, o 08:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Alltronik]]></name></author>
<updated>2013-05-01T15:54:43+01:00</updated>
<published>2013-05-01T15:54:43+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35763#p35763</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35763#p35763"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35763#p35763"><![CDATA[
Oczywiście jak dla mnie to nawet M0 by wystarczyło jak na moje początki z STM.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=985">Alltronik</a> — 1 maja 2013, o 15:54</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[jachu]]></name></author>
<updated>2013-05-01T14:35:43+01:00</updated>
<published>2013-05-01T14:35:43+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35749#p35749</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35749#p35749"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35749#p35749"><![CDATA[
<div class="quotetitle">SunRiver napisał(a):</div><div class="quotecontent"><br />F103 na pokładzie z cortex-M3 <br /><br />ja tylko sie zastanawiam co wy tak się spinacie na F4  do migania diodą wystarczy M3 <br />a nawet i M0 ..<br /></div><br /><br /><br />oni chca migac wypasem a nie golasem <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=110">jachu</a> — 1 maja 2013, o 14:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2013-05-01T13:59:34+01:00</updated>
<published>2013-05-01T13:59:34+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35744#p35744</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35744#p35744"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35744#p35744"><![CDATA[
F103 na pokładzie z cortex-M3 <br /><br />ja tylko sie zastanawiam co wy tak się spinacie na F4  do migania diodą wystarczy M3 <br />a nawet i M0 ..<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 1 maja 2013, o 13:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Alltronik]]></name></author>
<updated>2013-05-01T13:40:15+01:00</updated>
<published>2013-05-01T13:40:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35742#p35742</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35742#p35742"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35742#p35742"><![CDATA[
To nie będzie F4 tylko gratis mini Stm. Nic poczekamy zobaczymy, pewnie kupie.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=985">Alltronik</a> — 1 maja 2013, o 13:40</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Wojciech89]]></name></author>
<updated>2013-05-01T12:54:18+01:00</updated>
<published>2013-05-01T12:54:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35735#p35735</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35735#p35735"/>
<title type="html"><![CDATA[Re: STM32 Discovery]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1625&amp;p=35735#p35735"><![CDATA[
A ja nie dzwoniłem, ale wiem tyle samo <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> Oto informacja na ten temat: <!-- m --><a class="postlink" href="http://mikrokontroler.pl/content/nowa-ksi%C4%85%C5%BCka-aplikacje-usb-na-mikrokontrolerach-stm32" >http://mikrokontroler.pl/content/nowa-k ... rach-stm32</a><!-- m --><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=560">Wojciech89</a> — 1 maja 2013, o 12:54</p><hr />
]]></content>
</entry>
</feed>