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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-03-29T15:25:50+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=6544&amp;mode</id>
<entry>
<author><name><![CDATA[gordo]]></name></author>
<updated>2014-03-29T15:25:50+01:00</updated>
<published>2014-03-29T15:25:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76250#p76250</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76250#p76250"/>
<title type="html"><![CDATA[Re: optymalizacja i poprawnosc fragmentu kodu dla LCD]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76250#p76250"><![CDATA[
<div class="quotetitle">arturf209 napisał(a):</div><div class="quotecontent"><br /><div class="quotetitle">gordo napisał(a):</div><div class="quotecontent">Oszczędność 26 bajtów.<br /></div><br />Po skompilowaniu? o.O</div><br /><br />Tak, po skompilowaniu <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=2592">gordo</a> — 29 mar 2014, o 15:25</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[arturf209]]></name></author>
<updated>2014-03-29T13:57:25+01:00</updated>
<published>2014-03-29T13:57:25+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76238#p76238</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76238#p76238"/>
<title type="html"><![CDATA[Re: optymalizacja i poprawnosc fragmentu kodu dla LCD]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76238#p76238"><![CDATA[
<div class="quotetitle">gordo napisał(a):</div><div class="quotecontent"><br />Oszczędność 26 bajtów.<br /></div><br />Po skompilowaniu? o.O<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=801">arturf209</a> — 29 mar 2014, o 13:57</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gordo]]></name></author>
<updated>2014-03-29T02:50:31+01:00</updated>
<published>2014-03-29T02:50:31+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76228#p76228</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76228#p76228"/>
<title type="html"><![CDATA[Re: optymalizacja i poprawnosc fragmentu kodu dla LCD]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76228#p76228"><![CDATA[
<div class="quotetitle">blowin napisał(a):</div><div class="quotecontent"><br />czy poniższy fragment kodu jest poprawny? jeśli tak, to czy da się go jakoś zoptymalizować? (zależy mi na maksymalnej oszczędności pamięci)<br /></div><br /><br />[syntax=c]#define PORT_COMM PORTC<br />#define PORT_DATA PORTD<br /><br />#define RS (1&lt;&lt;PC0)<br />#define E (1&lt;&lt;PC1)<br />#define RW (1&lt;&lt;PC2)<br />#define DB4 (1&lt;&lt;PD4)<br />#define DB5 (1&lt;&lt;PD5)<br />#define DB6 (1&lt;&lt;PD6)<br />#define DB7 (1&lt;&lt;PD7)<br /><br />void LCD_DisplayControl(uint8_t D, uint8_t C, uint8_t B)<br />{<br />     PORT_COMM &amp;= ~RS &amp; ~RW &amp; ~E;<br />     PORT_DATA &amp;= ~DB4 &amp; ~DB5 &amp; ~DB6 &amp; ~DB7;<br />     PORT_COMM |= E;<br />     _delay_ms(2);<br />     PORT_COMM &amp;= ~E;<br />     PORT_DATA |= DB7 | (D == 0 ? 0x00 : DB6) | (C == 0 ? 0x00 : DB5)<br />          | (B == 0 ? 0x00 : DB4);<br />     PORT_COMM |= E;<br />     _delay_ms(2);<br />     PORT_COMM &amp;= ~E;<br />}[/syntax]<br /><br />Oszczędność 26 bajtów.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2592">gordo</a> — 29 mar 2014, o 02:50</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[blowin]]></name></author>
<updated>2014-03-28T20:12:59+01:00</updated>
<published>2014-03-28T20:12:59+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76188#p76188</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76188#p76188"/>
<title type="html"><![CDATA[optymalizacja i poprawnosc fragmentu kodu dla LCD]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6544&amp;p=76188#p76188"><![CDATA[
czy poniższy fragment kodu jest poprawny? jeśli tak, to czy da się go jakoś zoptymalizować? (zależy mi na maksymalnej oszczędności pamięci)<br /><br />[syntax=c]#define PORT_COMM PORTC<br />#define PORT_DATA PORTD<br /><br />#define RS (1&lt;&lt;PC0)<br />#define E (1&lt;&lt;PC1)<br />#define RW (1&lt;&lt;PC2)<br />#define DB4 (1&lt;&lt;PD4)<br />#define DB5 (1&lt;&lt;PD5)<br />#define DB6 (1&lt;&lt;PD6)<br />#define DB7 (1&lt;&lt;PD7)<br /><br />void LCD_EnableSignal() <br />{<br />     PORT_COMM |= E;<br />     _delay_ms(2);<br />     PORT_COMM &amp;= ~E;<br />}<br /><br />void LCD_DisplayControl(uint8_t D, uint8_t C, uint8_t B)<br />{<br />     PORT_COMM &amp;= ~RS &amp; ~RW &amp; ~E;<br />     PORT_DATA &amp;= ~DB4 &amp; ~DB5 &amp; ~DB6 &amp; ~DB7;<br />     LCD_EnableSignal();<br />     PORT_DATA |= DB7 | (D == 0 ? 0x00 : DB6) | (C == 0 ? 0x00 : DB5)<br />          | (B == 0 ? 0x00 : DB4);<br />     LCD_EnableSignal();<br />}[/syntax]<br /><br />w zależności od argumentów wywołania procedury chcę ustawić odpowiednie bity.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3699">blowin</a> — 28 mar 2014, o 20:12</p><hr />
]]></content>
</entry>
</feed>