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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-10-20T16:34:10+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=8691&amp;mode</id>
<entry>
<author><name><![CDATA[majster]]></name></author>
<updated>2014-10-20T16:34:10+01:00</updated>
<published>2014-10-20T16:34:10+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99864#p99864</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99864#p99864"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99864#p99864"><![CDATA[
Kolego a ja polecam dla każdego twojego problemu zakladac nowy temat bo teraz atmega8 wejscia wyjscia to temat rzeka.<br /><br />Namazane ze smarta.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1628">majster</a> — 20 paź 2014, o 16:34</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-20T14:24:32+01:00</updated>
<published>2014-10-20T14:24:32+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99859#p99859</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99859#p99859"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99859#p99859"><![CDATA[
Witam mam problem z lcd cały czas są kwadraciki podłączyłem go tak w książce zmieniając porty w kodzie bo były inne niż w książce ale nie działa.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 20 paź 2014, o 14:24</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[majster]]></name></author>
<updated>2014-10-19T18:28:18+01:00</updated>
<published>2014-10-19T18:28:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99707#p99707</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99707#p99707"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99707#p99707"><![CDATA[
Zlap wysun po za obszar i kliknij X<br /><br />Namazane ze smarta.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1628">majster</a> — 19 paź 2014, o 18:28</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-18T11:29:05+01:00</updated>
<published>2014-10-18T11:29:05+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99498#p99498</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99498#p99498"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99498#p99498"><![CDATA[
Wie ktoś jak zamknąć okienko zaznaczone na czerwono?<a href="http://forum.atnel.pl/_obrazki/o/6007/2836b67e9ec6eaa46ccbe13ffc20eb7f.png"  class="postlink"><img src="http://forum.atnel.pl/_obrazki/o/thumb/6007/2836b67e9ec6eaa46ccbe13ffc20eb7f.png" alt="Obrazek" /></a><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 18 paź 2014, o 11:29</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-18T08:16:11+01:00</updated>
<published>2014-10-18T08:16:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99476#p99476</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99476#p99476"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99476#p99476"><![CDATA[
Chciałem tylko zapytać co poprawić wiem ale dziwne literki się pojawiały potem jeszcze raz spróbuje.<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 34 minutach ]</span></strong><br /><br />Witam przerobiłem trochę kod wcześniejszy i wyszło coś takiego wpisuje 1 liczbę i zapala się dana liczba kod [syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br />//*******************************************************TUTAJ DEFINICJE PORTÓW<br />#define LED_DDR DDRD<br />#define LED_PORT PORTD<br />#define LED_1_PIN ( 1&lt;&lt;PD0 )<br />#define LED_2_PIN ( 1&lt;&lt;PD1 )<br />#define LED_3_PIN ( 1&lt;&lt;PD2 )<br />#define LED_4_PIN ( 1&lt;&lt;PD3 )<br />#define LED_5_PIN ( 1&lt;&lt;PD4 )<br />#define LED_6_PIN ( 1&lt;&lt;PD5 )<br />#define LED_7_PIN ( 1&lt;&lt;PD6 )<br />#define LED_8_PIN ( 1&lt;&lt;PD7 )<br />//******************************************************************************TUTAJ LICZBY JAKO LED1_0 ZERO OZNACZA LICZBE<br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br />#define LED1_0_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3  | 1&lt;&lt;PD4  | 1&lt;&lt;PD5 | 1&lt;&lt;PD7   )<br />#define LED1_1_PIN ( 1&lt;&lt;PD3 | 1&lt;&lt;PD7)<br />#define LED1_2_PIN ( 1&lt;&lt;PD2 )<br />#define LED1_3_PIN ( 1&lt;&lt;PD3 )<br />#define LED1_4_PIN ( 1&lt;&lt;PD4 )<br />#define LED1_5_PIN ( 1&lt;&lt;PD5 )<br />#define LED1_6_PIN ( 1&lt;&lt;PD6 )<br />#define LED1_7_PIN ( 1&lt;&lt;PD7 )<br /><br /><br /><br />//PONIŻSZEGO NIE ZMIENIAMY<br />#define LED1_0_ON LED1_PORT &amp;= ~LED1_0_PIN<br />#define LED1_0_OFF LED1_PORT |= LED1_0_PIN<br />#define LED1_0_TOG LED1_PORT ^= LED1_0_PIN<br />#define LED1_1_ON LED1_PORT &amp;= ~LED1_1_PIN<br />#define LED1_1_OFF LED1_PORT |= LED1_1_PIN<br />#define LED1_1_TOG LED1_PORT ^= LED1_1_PIN<br />#define LED1_2_ON LED1_PORT &amp;= ~LED1_2_PIN<br />#define LED1_2_OFF LED1_PORT |= LED1_2_PIN<br />#define LED1_2_TOG LED1_PORT ^= LED1_2_PIN<br />#define LED1_3_ON LED1_PORT &amp;= ~LED1_3_PIN<br />#define LED1_3_OFF LED1_PORT |= LED1_3_PIN<br />#define LED1_3_TOG LED1_PORT ^= LED1_3_PIN<br />#define LED1_4_ON LED1_PORT &amp;= ~LED1_4_PIN<br />#define LED1_4_OFF LED1_PORT |= LED1_4_PIN<br />#define LED1_4_TOG LED1_PORT ^= LED1_4_PIN<br />#define LED1_5_ON LED1_PORT &amp;= ~LED1_5_PIN<br />#define LED1_5_OFF LED1_PORT |= LED1_5_PIN<br />#define LED1_5_TOG LED1_PORT ^= LED1_5_PIN<br />#define LED1_6_ON LED1_PORT &amp;= ~LED1_6_PIN<br />#define LED1_6_OFF LED1_PORT |= LED1_6_PIN<br />#define LED1_6_TOG LED1_PORT ^= LED1_6_PIN<br />#define LED1_7_ON LED1_PORT &amp;= ~LED1_7_PIN<br />#define LED1_7_OFF LED1_PORT |= LED1_7_PIN<br />#define LED1_7_TOG LED1_PORT ^= LED1_7_PIN<br />//********************************<br />#define LED_1_ON LED_PORT &amp;= ~LED_1_PIN<br />#define LED_1_OFF LED_PORT |= LED_1_PIN<br />#define LED_1_TOG LED_PORT ^= LED_1_PIN<br />#define LED_2_ON LED_PORT &amp;= ~LED_2_PIN<br />#define LED_2_OFF LED_PORT |= LED_2_PIN<br />#define LED_2_TOG LED_PORT ^= LED_2_PIN<br />#define LED_3_ON LED_PORT &amp;= ~LED_3_PIN<br />#define LED_3_OFF LED_PORT |= LED_3_PIN<br />#define LED_3_TOG LED_PORT ^= LED_3_PIN<br />#define LED_4_ON LED_PORT &amp;= ~LED_4_PIN<br />#define LED_4_OFF LED_PORT |= LED_4_PIN<br />#define LED_4_TOG LED_PORT ^= LED_4_PIN<br />#define LED_5_ON LED_PORT &amp;= ~LED_5_PIN<br />#define LED_5_OFF LED_PORT |= LED_5_PIN<br />#define LED_5_TOG LED_PORT ^= LED_5_PIN<br />#define LED_6_ON LED_PORT &amp;= ~LED_6_PIN<br />#define LED_6_OFF LED_PORT |= LED_6_PIN<br />#define LED_6_TOG LED_PORT ^= LED_6_PIN<br />#define LED_7_ON LED_PORT &amp;= ~LED_7_PIN<br />#define LED_7_OFF LED_PORT |= LED_7_PIN<br />#define LED_7_TOG LED_PORT ^= LED_7_PIN<br />#define LED_8_ON LED_PORT &amp;= ~LED_8_PIN<br />#define LED_8_OFF LED_PORT |= LED_8_PIN<br />#define LED_8_TOG LED_PORT ^= LED_8_PIN<br /><br /><br /><br /><br />int main (void)<br />{<br />    LED1_DDR = 0xFF;<br /><br /><br />    while(1)<br />    {<br />        //0<br />    LED1_PORT = LED1_0_PIN ;//TU DAJE PORT JAKI BEDE URZYWAC<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;//DAJE STAN WYSOKI ZEBY NIE SWICILY POZOSTALE PORTY<br />        LED1_0_ON;//TU SIE ZAPALA LICZBA ZERO<br />        _delay_ms(1000);<br /><br />        //1<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_1_ON;<br />        _delay_ms(1000);<br /><br /><br /><br /><br /><br />    }}[/syntax] taki zapis skróci kod gdzieś o 3/4.<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 47 minutach ]</span></strong><br /><br />Troszku zmieniony kod <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> [syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br />//*******************************************************TUTAJ DEFINICJE PORTÓW<br />#define LED_DDR DDRD<br />#define LED_PORT PORTD<br />#define LED_1_PIN ( 1&lt;&lt;PD0 )<br />#define LED_2_PIN ( 1&lt;&lt;PD1 )<br />#define LED_3_PIN ( 1&lt;&lt;PD2 )<br />#define LED_4_PIN ( 1&lt;&lt;PD3 )<br />#define LED_5_PIN ( 1&lt;&lt;PD4 )<br />#define LED_6_PIN ( 1&lt;&lt;PD5 )<br />#define LED_7_PIN ( 1&lt;&lt;PD6 )<br />#define LED_8_PIN ( 1&lt;&lt;PD7 )<br />//******************************************************************************TUTAJ LICZBY JAKO LED1_0 ZERO OZNACZA LICZBE<br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br />#define LED1_0_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3  | 1&lt;&lt;PD4  | 1&lt;&lt;PD5 | 1&lt;&lt;PD7   )<br />#define LED1_1_PIN ( 1&lt;&lt;PD3 | 1&lt;&lt;PD7)<br />#define LED1_2_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD6 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5  )<br />#define LED1_3_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 | 1&lt;&lt;PD5 )<br />#define LED1_4_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD6 | 1&lt;&lt;PD3 | 1&lt;&lt;PD7 )<br />#define LED1_5_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 | 1&lt;&lt;PD5 )<br />#define LED1_6_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 )<br />#define LED1_7_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD7)<br />#define LED1_8_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7)<br />#define LED1_9_PIN ( 1&lt;&lt;PD5 | 1&lt;&lt;PD7 | 1&lt;&lt;PD3 | 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD6)<br /><br /><br /><br />//PONIŻSZEGO NIE ZMIENIAMY<br />#define LED1_0_ON LED1_PORT &amp;= ~LED1_0_PIN<br />#define LED1_0_OFF LED1_PORT |= LED1_0_PIN<br />#define LED1_0_TOG LED1_PORT ^= LED1_0_PIN<br />#define LED1_1_ON LED1_PORT &amp;= ~LED1_1_PIN<br />#define LED1_1_OFF LED1_PORT |= LED1_1_PIN<br />#define LED1_1_TOG LED1_PORT ^= LED1_1_PIN<br />#define LED1_2_ON LED1_PORT &amp;= ~LED1_2_PIN<br />#define LED1_2_OFF LED1_PORT |= LED1_2_PIN<br />#define LED1_2_TOG LED1_PORT ^= LED1_2_PIN<br />#define LED1_3_ON LED1_PORT &amp;= ~LED1_3_PIN<br />#define LED1_3_OFF LED1_PORT |= LED1_3_PIN<br />#define LED1_3_TOG LED1_PORT ^= LED1_3_PIN<br />#define LED1_4_ON LED1_PORT &amp;= ~LED1_4_PIN<br />#define LED1_4_OFF LED1_PORT |= LED1_4_PIN<br />#define LED1_4_TOG LED1_PORT ^= LED1_4_PIN<br />#define LED1_5_ON LED1_PORT &amp;= ~LED1_5_PIN<br />#define LED1_5_OFF LED1_PORT |= LED1_5_PIN<br />#define LED1_5_TOG LED1_PORT ^= LED1_5_PIN<br />#define LED1_6_ON LED1_PORT &amp;= ~LED1_6_PIN<br />#define LED1_6_OFF LED1_PORT |= LED1_6_PIN<br />#define LED1_6_TOG LED1_PORT ^= LED1_6_PIN<br />#define LED1_7_ON LED1_PORT &amp;= ~LED1_7_PIN<br />#define LED1_7_OFF LED1_PORT |= LED1_7_PIN<br />#define LED1_7_TOG LED1_PORT ^= LED1_7_PIN<br />#define LED1_8_ON LED1_PORT &amp;= ~LED1_8_PIN<br />#define LED1_8_OFF LED1_PORT |= LED1_8_PIN<br />#define LED1_8_TOG LED1_PORT ^= LED1_8_PIN<br />#define LED1_9_ON LED1_PORT &amp;= ~LED1_9_PIN<br />#define LED1_9_OFF LED1_PORT |= LED1_9_PIN<br />#define LED1_9_TOG LED1_PORT ^= LED1_9_PIN<br /><br />//********************************<br />#define LED_1_ON LED_PORT &amp;= ~LED_1_PIN<br />#define LED_1_OFF LED_PORT |= LED_1_PIN<br />#define LED_1_TOG LED_PORT ^= LED_1_PIN<br />#define LED_2_ON LED_PORT &amp;= ~LED_2_PIN<br />#define LED_2_OFF LED_PORT |= LED_2_PIN<br />#define LED_2_TOG LED_PORT ^= LED_2_PIN<br />#define LED_3_ON LED_PORT &amp;= ~LED_3_PIN<br />#define LED_3_OFF LED_PORT |= LED_3_PIN<br />#define LED_3_TOG LED_PORT ^= LED_3_PIN<br />#define LED_4_ON LED_PORT &amp;= ~LED_4_PIN<br />#define LED_4_OFF LED_PORT |= LED_4_PIN<br />#define LED_4_TOG LED_PORT ^= LED_4_PIN<br />#define LED_5_ON LED_PORT &amp;= ~LED_5_PIN<br />#define LED_5_OFF LED_PORT |= LED_5_PIN<br />#define LED_5_TOG LED_PORT ^= LED_5_PIN<br />#define LED_6_ON LED_PORT &amp;= ~LED_6_PIN<br />#define LED_6_OFF LED_PORT |= LED_6_PIN<br />#define LED_6_TOG LED_PORT ^= LED_6_PIN<br />#define LED_7_ON LED_PORT &amp;= ~LED_7_PIN<br />#define LED_7_OFF LED_PORT |= LED_7_PIN<br />#define LED_7_TOG LED_PORT ^= LED_7_PIN<br />#define LED_8_ON LED_PORT &amp;= ~LED_8_PIN<br />#define LED_8_OFF LED_PORT |= LED_8_PIN<br />#define LED_8_TOG LED_PORT ^= LED_8_PIN<br /><br /><br /><br /><br />int main (void)<br />{<br />    LED1_DDR = 0xFF;<br /><br /><br />    while(1)<br />    {<br />        //0<br />    LED1_PORT = LED1_0_PIN ;//TU DAJE PORT JAKI BEDE URZYWAC<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;//DAJE STAN WYSOKI ZEBY NIE SWICILY POZOSTALE PORTY<br />        LED1_0_ON;//TU SIE ZAPALA LICZBA ZERO<br />        _delay_ms(1000);<br /><br />        //1<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_1_ON;<br />        _delay_ms(1000);<br /><br />        //2<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_2_ON;<br />        _delay_ms(1000);<br /><br />        //3<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_3_ON;<br />        _delay_ms(1000);<br /><br />        //4<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //5<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_5_ON;<br />        _delay_ms(1000);<br /><br /><br />        //6<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //7<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //8<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //9<br />    LED1_PORT = LED1_0_PIN ;<br />        LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN | LED_7_PIN | LED_8_PIN ;<br />        LED1_9_ON;<br />        _delay_ms(1000);<br /><br /><br /><br /><br /><br />    }}[/syntax] teraz żeby wyświetlić liczbę wpisuje [syntax=c]LED1_JAKĄ LICZBĘ CHCE WYŚWIETLIĆ_ON;[/syntax] <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 49 minutach ]</span></strong><br /><br />Jeszcze mam błędy w definicjach zaraz wkleję poprawiony kod.<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 55 minutach ]</span></strong><br /><br /><span style="color: #00BF00">No kod poprawiony</span> [syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />//******************************************************************************TUTAJ LICZBY JAKO LED1_0 ZERO OZNACZA LICZBE<br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br />#define LED1_0_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3  | 1&lt;&lt;PD4  | 1&lt;&lt;PD5 | 1&lt;&lt;PD7   )<br />#define LED1_1_PIN ( 1&lt;&lt;PD3 | 1&lt;&lt;PD7)<br />#define LED1_2_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD6 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5  )<br />#define LED1_3_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 | 1&lt;&lt;PD5 )<br />#define LED1_4_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD6 | 1&lt;&lt;PD3 | 1&lt;&lt;PD7 )<br />#define LED1_5_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 | 1&lt;&lt;PD5 )<br />#define LED1_6_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7 )<br />#define LED1_7_PIN ( 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD7)<br />#define LED1_8_PIN ( 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7)<br />#define LED1_9_PIN ( 1&lt;&lt;PD5 | 1&lt;&lt;PD7 | 1&lt;&lt;PD3 | 1&lt;&lt;PD2 | 1&lt;&lt;PD1 | 1&lt;&lt;PD6)<br />#define LED1_PUSTY_PIN ( 1&lt;&lt;PD0 | 1&lt;&lt;PD1 | 1&lt;&lt;PD2 | 1&lt;&lt;PD3 | 1&lt;&lt;PD4 | 1&lt;&lt;PD5 | 1&lt;&lt;PD6 | 1&lt;&lt;PD7)<br /><br /><br /><br />//PONIŻSZEGO NIE ZMIENIAMY<br />#define LED1_0_ON LED1_PORT &amp;= ~LED1_0_PIN<br />#define LED1_0_OFF LED1_PORT |= LED1_0_PIN<br />#define LED1_0_TOG LED1_PORT ^= LED1_0_PIN<br />#define LED1_1_ON LED1_PORT &amp;= ~LED1_1_PIN<br />#define LED1_1_OFF LED1_PORT |= LED1_1_PIN<br />#define LED1_1_TOG LED1_PORT ^= LED1_1_PIN<br />#define LED1_2_ON LED1_PORT &amp;= ~LED1_2_PIN<br />#define LED1_2_OFF LED1_PORT |= LED1_2_PIN<br />#define LED1_2_TOG LED1_PORT ^= LED1_2_PIN<br />#define LED1_3_ON LED1_PORT &amp;= ~LED1_3_PIN<br />#define LED1_3_OFF LED1_PORT |= LED1_3_PIN<br />#define LED1_3_TOG LED1_PORT ^= LED1_3_PIN<br />#define LED1_4_ON LED1_PORT &amp;= ~LED1_4_PIN<br />#define LED1_4_OFF LED1_PORT |= LED1_4_PIN<br />#define LED1_4_TOG LED1_PORT ^= LED1_4_PIN<br />#define LED1_5_ON LED1_PORT &amp;= ~LED1_5_PIN<br />#define LED1_5_OFF LED1_PORT |= LED1_5_PIN<br />#define LED1_5_TOG LED1_PORT ^= LED1_5_PIN<br />#define LED1_6_ON LED1_PORT &amp;= ~LED1_6_PIN<br />#define LED1_6_OFF LED1_PORT |= LED1_6_PIN<br />#define LED1_6_TOG LED1_PORT ^= LED1_6_PIN<br />#define LED1_7_ON LED1_PORT &amp;= ~LED1_7_PIN<br />#define LED1_7_OFF LED1_PORT |= LED1_7_PIN<br />#define LED1_7_TOG LED1_PORT ^= LED1_7_PIN<br />#define LED1_8_ON LED1_PORT &amp;= ~LED1_8_PIN<br />#define LED1_8_OFF LED1_PORT |= LED1_8_PIN<br />#define LED1_8_TOG LED1_PORT ^= LED1_8_PIN<br />#define LED1_9_ON LED1_PORT &amp;= ~LED1_9_PIN<br />#define LED1_9_OFF LED1_PORT |= LED1_9_PIN<br />#define LED1_9_TOG LED1_PORT ^= LED1_9_PIN<br />#define LED1_PUSTY_ON LED1_PORT &amp;= ~LED1_PUSTY_PIN<br />#define LED1_PUSTY_OFF LED1_PORT |= LED1_PUSTY_PIN<br />#define LED1_PUSTY_TOG LED1_PORT ^= LED1_PUSTY_PIN<br /><br /><br /><br /><br /><br /><br />int main (void)<br />{<br />    LED1_DDR = 0xFF;<br /><br /><br />    while(1)<br />    {<br />        //0<br />    LED1_PORT = LED1_PUSTY_PIN;//TU DAJE PORT JAKI BEDE URZYWAC<br /><br />        LED1_0_ON;//TU SIE ZAPALA LICZBA ZERO<br />        _delay_ms(1000);<br /><br />        //1<br />    LED1_PORT = LED1_PUSTY_PIN;//TU DAJE PORT JAKI BEDE URZYWAC<br /><br />        LED1_1_ON;//TU SIE ZAPALA LICZBA ZERO<br />        _delay_ms(1000);<br /><br /><br /><br /><br /><br /><br /><br />    }}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 18 paź 2014, o 08:16</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[doman89]]></name></author>
<updated>2014-10-17T22:22:36+01:00</updated>
<published>2014-10-17T22:22:36+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99461#p99461</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99461#p99461"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99461#p99461"><![CDATA[
Witam,<br /><br />Kolega zaznaczyłem, że kod nie testowany na nawet ledwo zipiącym organiźmie <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />Robiłem wszystko metodą CTRL+C i CTRL+V, do tego byłem prawie 9h w pracy i ta godzina... Ale z takim błędem to kolega powinien się raz dwa rozprawić,<br /><br /><span style="color: #0040FF">z Niebieskim pozdRowieniem,<br />Doman89</span><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3271">doman89</a> — 17 paź 2014, o 22:22</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-17T17:39:00+01:00</updated>
<published>2014-10-17T17:39:00+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99431#p99431</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99431#p99431"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99431#p99431"><![CDATA[
Wydaje mi się że kolega zrobił błąd w 2 kodzie jest   <br />[syntax=c]#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /> <br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /> <br /> <br /> <br />#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /> <br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD[/syntax]<br /><br />a powinno być moim zdaniem mogę się mylić  <br /><br />[syntax=c]#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /> <br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /> <br /> <br /> <br />#define LED1_DDR DDRB<br />#define LED1_PORT PORTB<br />#define LED1_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED1_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED1_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED1_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED1_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED1_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED1_7_PIN ( 1&lt;&lt;PB6 )<br /> <br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD[/syntax]<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: kilkunastu sekundach ]</span></strong><br /><br />Abo nie rozumie po co jest 2 razy define portów.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 17 paź 2014, o 17:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-17T05:48:15+01:00</updated>
<published>2014-10-17T05:48:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99377#p99377</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99377#p99377"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99377#p99377"><![CDATA[
Dzięki zaraz przeglądnę kody i zmienię podpis.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 17 paź 2014, o 05:48</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[doman89]]></name></author>
<updated>2014-10-16T23:25:35+01:00</updated>
<published>2014-10-16T23:25:35+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99370#p99370</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99370#p99370"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99370#p99370"><![CDATA[
Witam,<br /><br />Widzę, że kolega to masochizm w najczystszej postaci uprawia <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />Zgodzę się z p. Mirkiem, Bluebook nie gryzie poradniki też <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><br /><br />Ale skoro kolega lubi malutkimi kroczkami do przodu to zaprezentuję kod który trochę zmniejszy odczucia masochistyczne <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /> <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /> <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br /><br />Generalnie co by kolega nie mówił, że kod nie działa to:<br />1. Przerzuciłem wyświetlanie znaków na porty B i D,<br />2. Przyjąłem identyczność połączeń - PB0 i PD0 to na przykład segment A, PB1 i PD1 to segment B itd - inaczej trzeba mieć 2 zmienne znaki_wyswietlacza dla każdego z osobna.<br />3. Jeżeli wyświetla głupoty, zmienną zanegować - bo zależne czy steruje się katodą czy anodą.<br /><br />4. KOD NIETESTOWANY NA ŻYWYM ORGANIŹMIE <img src="https://forum.atnel.pl/images/smilies/icon_razz.gif" alt=":P" title="Pokazuje język" /><br /><br />A oto kod - wrzucam w celach &quot;naukowo-poglądowych&quot;, bo jak kolega nie przejdzie na mulipleksację to ułożymy taki kod, że trafi on do tematu &quot;Paskudztwo...&quot; <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br /><br />[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br /><br /><br />#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /><br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br /><br />uint16_t znaki_wyswietlacza_cyfra&#91;&#93; = <br />{<br /><br />(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN), //0<br />(LED_2_PIN|LED_3_PIN), //1<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_5_PIN|LED_4_PIN), //2<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN), //3<br />(LED_6_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN), //4<br />(LED_1_PIN|LED_6_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN),//5<br />(LED_1_PIN|LED_6_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN),//6<br />(LED_1_PIN|LED_2_PIN|LED_3_PIN),//7<br />(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN|LED_7_PIN),//8<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN|LED_6_PIN),//9<br />~(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN|LED_7_PIN),//pusty<br />};<br /><br /><br />int main (void)<br />{<br />    LED_DDR = 0xFF;<br />    LED1_DDR = 0xFF;<br /><br />    while(1)<br />    {<br />        //0<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;0&#93;;<br />        _delay_ms(1000);<br /><br />        //1<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;1&#93;;<br />        _delay_ms(1000);<br /><br />        //2<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;2&#93;;<br />        _delay_ms(1000);<br /><br />        //3<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;3&#93;;<br />        _delay_ms(1000);<br /><br />        //4<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;4&#93;;<br />        _delay_ms(1000);<br /><br />        //5<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;5&#93;;<br />        _delay_ms(1000);<br /><br />        //6<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;6&#93;;<br />        _delay_ms(1000);<br /><br />        //7<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;7&#93;;<br />        _delay_ms(1000);<br /><br />        //8<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;8&#93;;<br />        _delay_ms(1000);<br /><br />        //9<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;10&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;9&#93;;<br />        _delay_ms(1000);<br /><br />        //10<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;1&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;0&#93;;<br />        _delay_ms(1000);<br /><br />        //11<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;1&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;1&#93;;<br />        _delay_ms(1000);<br /><br /><br />        //12<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;1&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;2&#93;;<br />        _delay_ms(1000);<br /><br />        //...<br />        <br />        //60<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;6&#93;;<br />    LED_PORT = znaki_wyswietlacza_cyfra&#91;0&#93;;<br />        _delay_ms(1000);<br /><br />    }<br />}[/syntax]<br /><br /><span style="color: #0000FF">z Niebieskim pozdRowieniem,<br />Doman89</span><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 9 minutach ]</span></strong><br /><br />Kolega jak już powalczysz z w/w kodem to zobacz jaką potęgę mają pętle:<br /><br />[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br /><br /><br />#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /><br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br /><br /><br />#define LED_DDR DDRB<br />#define LED_PORT PORTB<br />#define LED_1_PIN ( 1&lt;&lt;PB0 )<br />#define LED_2_PIN ( 1&lt;&lt;PB1 )<br />#define LED_3_PIN ( 1&lt;&lt;PB2 )<br />#define LED_4_PIN ( 1&lt;&lt;PB3 )<br />#define LED_5_PIN ( 1&lt;&lt;PB4 )<br />#define LED_6_PIN ( 1&lt;&lt;PB5 )<br />#define LED_7_PIN ( 1&lt;&lt;PB6 )<br /><br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br /><br />uint16_t znaki_wyswietlacza_cyfra&#91;&#93; = <br />{<br /><br />(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN), //0<br />(LED_2_PIN|LED_3_PIN), //1<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_5_PIN|LED_4_PIN), //2<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN), //3<br />(LED_6_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN), //4<br />(LED_1_PIN|LED_6_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN),//5<br />(LED_1_PIN|LED_6_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN),//6<br />(LED_1_PIN|LED_2_PIN|LED_3_PIN),//7<br />(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN|LED_7_PIN),//8<br />(LED_1_PIN|LED_2_PIN|LED_7_PIN|LED_3_PIN|LED_4_PIN|LED_6_PIN),//9<br />~(LED_1_PIN|LED_2_PIN|LED_3_PIN|LED_4_PIN|LED_5_PIN|LED_6_PIN|LED_7_PIN),//pusty<br />};<br /><br /><br />int main (void)<br />{<br />    LED_DDR = 0xFF;<br />    LED1_DDR = 0xFF;<br /><br />    while(1)<br />    {<br />        for( uint8_t x = 0; x &lt; 61; x++)<br />        {<br />            LED_PORT = znaki_wyswietlacza_cyfra&#91;x/10&#93;;<br />            LED_PORT = znaki_wyswietlacza_cyfra&#91;x%10&#93;;<br />            _delay_ms(1000);<br />        }<br />    }<br />}[/syntax]<br /><br />Musiałem dodać bo mi sumienie spokoju nie dawało <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=3271">doman89</a> — 16 paź 2014, o 23:25</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2014-10-16T22:38:16+01:00</updated>
<published>2014-10-16T22:38:16+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99364#p99364</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99364#p99364"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99364#p99364"><![CDATA[
Nie będziemy bić (tylko proszę nie używaj czerwonego koloru ani w postach ani w podpisie - proszę zmień ....<br /><br />a bić nie ma co - tak chyba każdy zaczyna - to co zrobiłeś to się nazywa programowanie LINIOWE w najczystszej postaci ... i sam już dostrzegasz że to jest koszmar i że trzeba coś z tym zrobić ... więc jesteś na dobrej drodze <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: kilkunastu sekundach ]</span></strong><br /><br />teraz poczytaj w książce o pętlach np for(), while() i podobnych - żeby zacząć sobie radzić z tym koszmarkiem<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 1 minucie ]</span></strong><br /><br />poza tym tyle razy już ci powtarzałem - oglądaj też poradniki z bloga - dlaczego nie obejrzysz tego:<br /><br /><!-- m --><a class="postlink" href="http://mirekk36.blogspot.com/2014/05/mikrokontrolery-avr-jak-zaczac-wprawki.html" >http://mirekk36.blogspot.com/2014/05/mi ... rawki.html</a><!-- m --><br /><br />i tego<br /><br /><!-- m --><a class="postlink" href="http://mirekk36.blogspot.com/2014/06/wprawki-w-c-z-diodami-led-i-klawiszem.html" >http://mirekk36.blogspot.com/2014/06/wp ... iszem.html</a><!-- m --><br /><br />to właśnie dla takich początkujących jak ty - więc korzystaj<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 16 paź 2014, o 22:38</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-17T06:03:05+01:00</updated>
<published>2014-10-16T21:45:46+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99359#p99359</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99359#p99359"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99359#p99359"><![CDATA[
Witam da się jakoś skrócić instrukcje wyświetlania 60 cyfr kod[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br /><br /><br />#define LED_DDR DDRC<br />#define LED_PORT PORTC<br />#define LED_1_PIN ( 1&lt;&lt;PC0 )<br />#define LED_2_PIN ( 1&lt;&lt;PC1 )<br />#define LED_3_PIN ( 1&lt;&lt;PC2 )<br />#define LED_4_PIN ( 1&lt;&lt;PC3 )<br />#define LED_5_PIN ( 1&lt;&lt;PC4 )<br />#define LED_6_PIN ( 1&lt;&lt;PC5 )<br /><br />#define LED1_DDR DDRD<br />#define LED1_PORT PORTD<br />#define LED1_1_PIN ( 1&lt;&lt;PD0 )<br />#define LED1_2_PIN ( 1&lt;&lt;PD1 )<br />#define LED1_3_PIN ( 1&lt;&lt;PD2 )<br />#define LED1_4_PIN ( 1&lt;&lt;PD3 )<br />#define LED1_5_PIN ( 1&lt;&lt;PD4 )<br />#define LED1_6_PIN ( 1&lt;&lt;PD5 )<br />#define LED1_7_PIN ( 1&lt;&lt;PD6 )<br />#define LED1_8_PIN ( 1&lt;&lt;PD7 )<br /><br /><br />#define LED_1_ON LED_PORT &amp;= ~LED_1_PIN<br />#define LED_1_OFF LED_PORT |= LED_1_PIN<br />#define LED_1_TOG LED_PORT ^= LED_1_PIN<br />#define LED_2_ON LED_PORT &amp;= ~LED_2_PIN<br />#define LED_2_OFF LED_PORT |= LED_2_PIN<br />#define LED_2_TOG LED_PORT ^= LED_2_PIN<br />#define LED_3_ON LED_PORT &amp;= ~LED_3_PIN<br />#define LED_3_OFF LED_PORT |= LED_3_PIN<br />#define LED_3_TOG LED_PORT ^= LED_3_PIN<br />#define LED_4_ON LED_PORT &amp;= ~LED_4_PIN<br />#define LED_4_OFF LED_PORT |= LED_4_PIN<br />#define LED_4_TOG LED_PORT ^= LED_4_PIN<br />#define LED_5_ON LED_PORT &amp;= ~LED_5_PIN<br />#define LED_5_OFF LED_PORT |= LED_5_PIN<br />#define LED_5_TOG LED_PORT ^= LED_5_PIN<br />#define LED_6_ON LED_PORT &amp;= ~LED_6_PIN<br />#define LED_6_OFF LED_PORT |= LED_6_PIN<br />#define LED_6_TOG LED_PORT ^= LED_6_PIN<br />#define LED_7_ON LED_PORT &amp;= ~LED_7_PIN<br />#define LED_7_OFF LED_PORT |= LED_7_PIN<br />#define LED_7_TOG LED_PORT ^= LED_7_PIN<br />#define LED_8_ON LED_PORT &amp;= ~LED_8_PIN<br />#define LED_8_OFF LED_PORT |= LED_8_PIN<br />#define LED_8_TOG LED_PORT ^= LED_8_PIN<br /><br />#define LED1_1_ON LED1_PORT &amp;= ~LED1_1_PIN<br />#define LED1_1_OFF LED1_PORT |= LED1_1_PIN<br />#define LED1_1_TOG LED1_PORT ^= LED1_1_PIN<br />#define LED1_2_ON LED1_PORT &amp;= ~LED1_2_PIN<br />#define LED1_2_OFF LED1_PORT |= LED1_2_PIN<br />#define LED1_2_TOG LED1_PORT ^= LED1_2_PIN<br />#define LED1_3_ON LED1_PORT &amp;= ~LED1_3_PIN<br />#define LED1_3_OFF LED1_PORT |= LED1_3_PIN<br />#define LED1_3_TOG LED1_PORT ^= LED1_3_PIN<br />#define LED1_4_ON LED1_PORT &amp;= ~LED1_4_PIN<br />#define LED1_4_OFF LED1_PORT |= LED1_4_PIN<br />#define LED1_4_TOG LED1_PORT ^= LED1_4_PIN<br />#define LED1_5_ON LED1_PORT &amp;= ~LED1_5_PIN<br />#define LED1_5_OFF LED1_PORT |= LED1_5_PIN<br />#define LED1_5_TOG LED1_PORT ^= LED1_5_PIN<br />#define LED1_6_ON LED1_PORT &amp;= ~LED1_6_PIN<br />#define LED1_6_OFF LED1_PORT |= LED1_6_PIN<br />#define LED1_6_TOG LED1_PORT ^= LED1_6_PIN<br />#define LED1_7_ON LED1_PORT &amp;= ~LED1_7_PIN<br />#define LED1_7_OFF LED1_PORT |= LED1_7_PIN<br />#define LED1_7_TOG LED1_PORT ^= LED1_7_PIN<br />#define LED1_8_ON LED1_PORT &amp;= ~LED1_8_PIN<br />#define LED1_8_OFF LED1_PORT |= LED1_8_PIN<br />#define LED1_8_TOG LED1_PORT ^= LED1_8_PIN<br /><br />int main (void)<br />{<br />    LED_DDR = 0xFF;<br />    LED1_DDR = 0xFF;<br /><br />    while(1)<br />    {<br />        //0<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //1<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //2<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //3<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //4<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //5<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //6<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //7<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //8<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //9<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //10<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //11<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //12<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //13<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //14<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //15<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //16<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //17<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //18<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //19<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //20<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //21<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //22<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //23<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //24<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //25<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //26<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //27<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //28<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //29<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //30<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //31<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //32<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //33<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //34<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //35<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //36<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //37<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //37<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //38<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //39<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_4_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //40<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //41<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //42<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //43<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //44<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //45<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //46<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //47<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //48<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //49<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_4_ON;<br />        LED1_2_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //50<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //51<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //52<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //53<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_6_ON;<br />        _delay_ms(1000);<br /><br />        //54<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        LED1_4_ON;<br />        _delay_ms(1000);<br /><br />        //55<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //56<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        LED1_7_ON;<br />        _delay_ms(1000);<br /><br />        //57<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //58<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //59<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED_3_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED1_1_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_6_ON;<br />        LED1_7_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br />        //60<br />    LED_PORT = LED_1_PIN | LED_2_PIN | LED_3_PIN | LED_4_PIN | LED_5_PIN | LED_6_PIN;<br />        LED1_PORT = LED1_1_PIN | LED1_2_PIN | LED1_3_PIN | LED1_4_PIN | LED1_5_PIN | LED1_6_PIN | LED1_7_PIN | LED1_8_PIN ;<br />        LED1_1_ON;<br />        LED_1_ON;<br />        LED_2_ON;<br />        LED_3_ON;<br />        LED_5_ON;<br />        LED_6_ON;<br />        LED1_2_ON;<br />        LED1_3_ON;<br />        LED1_4_ON;<br />        LED1_5_ON;<br />        LED1_6_ON;<br />        LED1_8_ON;<br />        _delay_ms(1000);<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />        LED_PORT &lt;&lt;= 1;<br />       <br />    }<br />}[/syntax] Tylko nie bijcie <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 1 minucie ]</span></strong><br /><br />Myślałem nad połączeniem pinów wyświetlacza tak by było tylko 8 pinów do sterowania do było by krócej.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 16 paź 2014, o 21:45</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2014-10-16T20:25:02+01:00</updated>
<published>2014-10-16T20:25:02+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99346#p99346</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99346#p99346"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99346#p99346"><![CDATA[
<div class="quotetitle">radex324 napisał(a):</div><div class="quotecontent"><br />OK na razie trenuje na wyświetlaczu 7 segmentowym podwójnym chce uzyskać liczenie do 99.<br /></div><br /><br />No to masz w książce przykład takiego licznika <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=54">mirekk36</a> — 16 paź 2014, o 20:25</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-16T17:48:09+01:00</updated>
<published>2014-10-16T17:48:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99328#p99328</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99328#p99328"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99328#p99328"><![CDATA[
OK na razie trenuje na wyświetlaczu 7 segmentowym podwójnym chce uzyskać liczenie do 99.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 16 paź 2014, o 17:48</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2014-10-16T16:57:58+01:00</updated>
<published>2014-10-16T16:57:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99317#p99317</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99317#p99317"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99317#p99317"><![CDATA[
<div class="quotetitle">radex324 napisał(a):</div><div class="quotecontent"><br />2 nawiasy dałem po to żeby delay dotyczyło instrukcji w nawiasach mam rozumieć że nie jest to potrzebne?<br /></div><br /><br />To nie jest tak że nawiasy klamrowe można sobie dawać po to żeby to dotyczyło czegoś tam .... na tą chwilę musisz zrozumieć że programujesz liniowo<br /><br />czyli jak sam oczami czytasz taki kod<br /><br />[syntax=c]while(1) {<br />    PORTA ^= (1&lt;&lt;PA2);<br />    _delay_ms(100);<br />}[/syntax]<br /><br />to oznacza że w pętli wciąż po kolei procek będzie wykonywał te polecenia czyli <br /><br />1. zmieni stan PA2 na przeciwny<br />2. poczeka 100ms<br />3 wróci do początku pętli i od nowa<br /><br />jaki sens miałoby coś takiego (gdyby było w ogóle możliwe)- zastanów się:<br /><br />[syntax=c]while(1) {<br />    PORTA ^= (1&lt;&lt;PA2);<br />    _delay_ms(100) {        // &lt;------ zapis BEZ SENSU<br />        PORTB ^= (1&lt;&lt;PB3);<br />        PORTC ^= (1&lt;&lt;PC7);<br />    }<br />}[/syntax]<br /><br />no jaki sens ? że niby co miałoby zrobić takie delay ? <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> - ZROZUM to jest zapis bez sensu ....<br /><br />owszem ja czuję przez skórę o co ci chodzi , pomimo że ty jeszcze nie potrafisz tego nazwać - podpowiem - chodzi ci o przejście z programowania LINIOWEGO (gdzie wszystko dzieje się PO KOLEI jak w pierwszym przykładzie) na programowanie nieliniowe oparte o zdarzenia i ew procesy, które mogą się wykonywać prawie w tym samym czasie <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> ... ale spokojnie i o tym będzie w Bluebooku ... na razie powolutku trenuj<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 16 paź 2014, o 16:57</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-16T16:49:30+01:00</updated>
<published>2014-10-16T16:49:30+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99316#p99316</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99316#p99316"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99316#p99316"><![CDATA[
2 nawiasy dałem po to żeby delay dotyczyło instrukcji w nawiasach mam rozumieć że nie jest to potrzebne?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 16 paź 2014, o 16:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2014-10-16T16:30:59+01:00</updated>
<published>2014-10-16T16:30:59+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99311#p99311</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99311#p99311"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99311#p99311"><![CDATA[
komendę delay jak najbardziej dobrze napisałeś - przekazałeś stałą dosłowną jako opóźnienie<br /><br />ale po co ci te dwa nawiasy klamrowe ??? - tutaj pewnie czegoś nie rozumiesz<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 16 paź 2014, o 16:30</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-16T14:24:17+01:00</updated>
<published>2014-10-16T14:24:17+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99294#p99294</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99294#p99294"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99294#p99294"><![CDATA[
Witam mam pytanie czy można tak stosować komendę delay sprawdzone działa a czy można tak robić?[syntax=c]_delay_ms(100);{<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 16 paź 2014, o 14:24</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kaka0204]]></name></author>
<updated>2014-10-15T20:33:00+01:00</updated>
<published>2014-10-15T20:33:00+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99210#p99210</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99210#p99210"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99210#p99210"><![CDATA[
<div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Dzięki bardzo ja niestety jeszcze nie rozumiem kilku rzeczy:)<br /></div><br />To jest normalne <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> Najważniejsze, to nie zniechęcać się i pisać, pisać i jeszcze raz pisać. Poza tym dobrze, że pytasz jak czegoś nie rozumiesz. Nie krępuj się, ktoś napewno pomoże <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=889">kaka0204</a> — 15 paź 2014, o 20:33</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-15T20:28:32+01:00</updated>
<published>2014-10-15T20:28:32+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99209#p99209</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99209#p99209"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99209#p99209"><![CDATA[
Dzięki bardzo ja niestety jeszcze nie rozumiem kilku rzeczy:)<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 15 paź 2014, o 20:28</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kaka0204]]></name></author>
<updated>2014-10-15T20:10:09+01:00</updated>
<published>2014-10-15T20:10:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99205#p99205</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99205#p99205"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99205#p99205"><![CDATA[
Kolego. Wyżej dostałeś wskazówkę co jest źle. Musisz definicję zmiennej x wyrzucić poza zmienną while(1).<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=889">kaka0204</a> — 15 paź 2014, o 20:10</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-15T19:47:12+01:00</updated>
<published>2014-10-15T19:47:12+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99199#p99199</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99199#p99199"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99199#p99199"><![CDATA[
Poprawiony kod ale teraz miga tylko PC5 [syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />int main (void){<br /><br /><br /> DDRC |=(1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /> PORTC |= (1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /><br /><br />  while(1)<br />{<br />uint8_t x=0;<br /><br />    switch(x)<br />{<br /><br />     case 0:<br />     PORTC ^=(1&lt;&lt;PC5);<br />     _delay_ms(1000);<br />     x = x+1;<br />     break;<br /><br /><br /><br />     case 6:<br />     PORTC ^=(1&lt;&lt;PC4);<br />     _delay_ms(1000);<br />     break;<br /><br />     default:<br /> PORTC =(1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /><br />}<br /><br />}<br /><br />}[/syntax]<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 1 minucie ]</span></strong><br /><br />Czy &quot;x = x+1&quot; ma być w instrukcji czy może gdzieś indziej mogę dać?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 15 paź 2014, o 19:47</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[jacekk232]]></name></author>
<updated>2014-10-15T19:36:42+01:00</updated>
<published>2014-10-15T19:36:42+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99197#p99197</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99197#p99197"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99197#p99197"><![CDATA[
Zauważ, że ten program nigdy nie dojdzie do case 6 bo zmienna x nigdy nie osiągnie wartości równej 6. Z każdym obiegiem pętli while wartość zmiennej x jest wciąż ustawiana na zero w tym miejscu [syntax=c]int x=0;[/syntax]<br />W case 0 jest następnie zwiększana o jeden a potem znów ustawiana na zero na początku pętli while.<br /><br />I zamiast typu <strong>int</strong> lepiej używać typów, które oferuje avr-gcc czyli <strong>uint8_t, int8_t, uint16_t</strong> itd. W tym programie spokojnie wystarczy użyć jednobajtowego <strong>uint8_t</strong> lub <strong>int8_t</strong> zamiast dwubajtowego <strong>int</strong>. Dzięki temu od razu widać ile bajtów zajmuje dana zmienna.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=204">jacekk232</a> — 15 paź 2014, o 19:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-15T19:12:40+01:00</updated>
<published>2014-10-15T19:12:40+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99191#p99191</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99191#p99191"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99191#p99191"><![CDATA[
To tak program zaświeca diody na porcie PC4 i PC5 dział switch(przycisk) program ma wykonać instrukcje 1 i przy okazji sprawdza jaka jest wartość &quot;x&quot; gdy jest x=0 to wykonuje się 1 program gdy x=6 to ma się wykonać 2 program<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 15 paź 2014, o 19:12</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[jacekk232]]></name></author>
<updated>2014-10-15T19:07:56+01:00</updated>
<published>2014-10-15T19:07:56+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99189#p99189</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99189#p99189"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99189#p99189"><![CDATA[
Najpierw może napisz co ten program ma robić. Tak będzie łatwiej coś doradzić.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=204">jacekk232</a> — 15 paź 2014, o 19:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radex324]]></name></author>
<updated>2014-10-15T18:50:40+01:00</updated>
<published>2014-10-15T18:50:40+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99184#p99184</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99184#p99184"/>
<title type="html"><![CDATA[Re: Całkiem zielony Atmega8 wejścia/wyjścia]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8691&amp;p=99184#p99184"><![CDATA[
Ok postaram się a czy możesz wyjaśnić to co napisałem?<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 1 minucie ]</span></strong><br /><br />Poprawiony kod chyba dobrze [syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;util/delay.h&gt;<br /><br />int main (void){<br /><br /><br /> DDRC |=(1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /> PORTC |= (1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /><br /><br />while(1)<br />{<br />    int x=0;<br />    switch(x)<br />{<br /><br />      case 0:<br />      PORTC ^=(1&lt;&lt;PC5);<br />      _delay_ms(1000);<br />      x = x+1;<br />      break;<br /><br />      case 6:<br />      PORTC ^=(1&lt;&lt;PC4);<br />      _delay_ms(1000);<br />      break;<br /><br />      default:<br /> PORTC =(1&lt;&lt;PC5 | 1&lt;&lt;PC4);<br /><br /><br /><br />}<br /><br />}<br /><br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6007">radex324</a> — 15 paź 2014, o 18:50</p><hr />
]]></content>
</entry>
</feed>