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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-07-28T17:21:03+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=15879&amp;mode</id>
<entry>
<author><name><![CDATA[kicajek]]></name></author>
<updated>2016-07-28T17:21:03+01:00</updated>
<published>2016-07-28T17:21:03+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164951#p164951</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164951#p164951"/>
<title type="html"><![CDATA[Re: Inicjalizacja modułu wyświetlacza hd44780]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164951#p164951"><![CDATA[
Witam<br />Te &quot; #define... &quot; troche zakręcone:<br />[syntax=c]#define RS (1&lt;&lt;PA0)<br />#define RW (1&lt;&lt;PA1)<br />#define D7 (1&lt;&lt;PA2)<br />#define D6 (1&lt;&lt;PA3)<br />#define D5 (1&lt;&lt;PA4)<br />#define D4 (1&lt;&lt;PA5)<br /> <br />//zerowanie wyjsc<br />#define RS_0 (PORT&amp;=~(1&lt;&lt;RS))<br />#define RW_0 (PORT&amp;=~(1&lt;&lt;RW))<br />#define D7_0 (PORT&amp;=~(1&lt;&lt;D7))<br />#define D6_0 (PORT&amp;=~(1&lt;&lt;D6))<br />#define D5_0 (PORT&amp;=~(1&lt;&lt;D5))<br />#define D4_0 (PORT&amp;=~(1&lt;&lt;D4))<br /> <br />//ustawienie bitu na 1<br />#define RS_1 (PORT|=(1&lt;&lt;RS))<br />#define RW_1 (PORT|=(1&lt;&lt;RW))<br />#define D7_1 (PORT|=(1&lt;&lt;D7))<br />#define D6_1 (PORT|=(1&lt;&lt;D6))<br />#define D5_1 (PORT|=(1&lt;&lt;D5))<br />#define D4_1 (PORT|=(1&lt;&lt;D4))[/syntax] <br />Weźmy na to:<br />[syntax=c]//zerowanie wyjsc<br />#define RS_0 (PORT&amp;=~(1&lt;&lt;RS))<br />...<br />#define RS (1&lt;&lt;PA0)<br />a wyjdzie:<br />#define RS_0 (PORT&amp;=~(1&lt;&lt;(1&lt;&lt;PA0))[/syntax]<br />z resztą sam się pogubiłem  <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> <br /><br />Pozdr.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=826">kicajek</a> — 28 lip 2016, o 17:21</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kurnachatka]]></name></author>
<updated>2016-07-28T12:57:04+01:00</updated>
<published>2016-07-28T12:57:04+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164920#p164920</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164920#p164920"/>
<title type="html"><![CDATA[Re: Inicjalizacja modułu wyświetlacza hd44780]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164920#p164920"><![CDATA[
Tutaj kiedyś fajnie kolega z forum przedstawił łopatologicznie zasadę inicjacji wyświetlacza.<br /><div style="width: 583px; height: 471px; margin: 0 auto; padding-left: 26px; padding-top: 48px; background: url('https://www.atnel.pl/download/atnel_tv.png') no-repeat;"> <strong>iframe</strong> </div><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=930">kurnachatka</a> — 28 lip 2016, o 12:57</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Daro69]]></name></author>
<updated>2016-07-28T11:49:27+01:00</updated>
<published>2016-07-28T11:49:27+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164911#p164911</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164911#p164911"/>
<title type="html"><![CDATA[Re: Inicjalizacja modułu wyświetlacza hd44780]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164911#p164911"><![CDATA[
witam,<br />Nie widzę w kodzie linii sterującej &quot;E&quot;.<br />może to jest problemem.?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=11549">Daro69</a> — 28 lip 2016, o 11:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Mr. Strzelczyk]]></name></author>
<updated>2016-07-28T10:49:01+01:00</updated>
<published>2016-07-28T10:49:01+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164903#p164903</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164903#p164903"/>
<title type="html"><![CDATA[Inicjalizacja modułu wyświetlacza hd44780]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=15879&amp;p=164903#p164903"><![CDATA[
<strong>uC</strong>:ATmega32<br /><strong>Środowisko</strong>:ATMEL STUDIO 7<br /><strong>Interfejs</strong>: 4Bit'owy<br /><br />Powiedzcie co robie źle przy inicjalizacji jesli możecie:) <br /><img src="http://web.alfredstate.edu/weimandn/lcd/lcd_initialization/Initialization%204-Bit%20Interface.gif" alt="Obrazek" /><br /><br /><br />[syntax=c]* HD44780.c<br />/*<br /> *<br /> * Created: 2016-07-28 10:34:36<br /> * Author : Mr. Strzelczyk<br /> */ <br /><br />#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />#define PORT_io DDRA //ustaw port IO<br />#define PORT PORTA//ustaw port 1/0<br />#define PORT_CLEAR (PORT=0x00)<br /><br />#define RS (1&lt;&lt;PA0)<br />#define RW (1&lt;&lt;PA1)<br />#define D7 (1&lt;&lt;PA2)<br />#define D6 (1&lt;&lt;PA3)<br />#define D5 (1&lt;&lt;PA4)<br />#define D4 (1&lt;&lt;PA5)<br /><br />//zerowanie wyjsc<br />#define RS_0 (PORT&amp;=~(1&lt;&lt;RS))<br />#define RW_0 (PORT&amp;=~(1&lt;&lt;RW))<br />#define D7_0 (PORT&amp;=~(1&lt;&lt;D7))<br />#define D6_0 (PORT&amp;=~(1&lt;&lt;D6))<br />#define D5_0 (PORT&amp;=~(1&lt;&lt;D5))<br />#define D4_0 (PORT&amp;=~(1&lt;&lt;D4))<br /><br />//ustawienie bitu na 1<br />#define RS_1 (PORT|=(1&lt;&lt;RS))<br />#define RW_1 (PORT|=(1&lt;&lt;RW))<br />#define D7_1 (PORT|=(1&lt;&lt;D7))<br />#define D6_1 (PORT|=(1&lt;&lt;D6))<br />#define D5_1 (PORT|=(1&lt;&lt;D5))<br />#define D4_1 (PORT|=(1&lt;&lt;D4))<br /><br /><br /><br />void port_ini()<br />{<br />PORT_io=0xFF;//A -&gt;out<br />PORT=0x00;//LOW <br />}<br /><br />void hd44780_ini()<br />{<br />_delay_ms(50); // reset<br />for(uint8_t i=0; i&lt;3; i++) //3krotne wykonanie (1&lt;&lt;D5) | (1&lt;&lt;D4)<br />{<br />PORT=(D5 | D4);<br />_delay_ms(5);<br />}<br /> D4_0;<br /> D4_0;<br />PORT=D7;<br />PORT_CLEAR;<br />PORT=D7;<br />PORT_CLEAR;<br />PORT=D4;<br />PORT_CLEAR;<br />PORT=(D5|D6);<br /><br />}<br /><br />int main(void)<br />{<br />    port_ini();<br />hd44780_ini();<br />    while (1) <br />    {<br />    }<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10805">Mr. Strzelczyk</a> — 28 lip 2016, o 10:49</p><hr />
]]></content>
</entry>
</feed>