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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2017-11-21T18:43:44+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=58&amp;t=19572&amp;mode</id>
<entry>
<author><name><![CDATA[zonced]]></name></author>
<updated>2017-11-21T18:43:44+01:00</updated>
<published>2017-11-21T18:43:44+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=199363#p199363</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=199363#p199363"/>
<title type="html"><![CDATA[Re: Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=199363#p199363"><![CDATA[
No cóż, czasem takie błędy się zdarzają, wielkie dzięki <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=18277">zonced</a> — 21 lis 2017, o 18:43</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mczarny]]></name></author>
<updated>2017-11-08T18:31:58+01:00</updated>
<published>2017-11-08T18:31:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198560#p198560</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198560#p198560"/>
<title type="html"><![CDATA[Re: Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198560#p198560"><![CDATA[
<div class="quotetitle">xentis napisał(a):</div><div class="quotecontent"><br />Może się mylę ale funkcja którą próbujesz użyć nazywa się <span style="color: #BF00FF">pgm</span>_read_byte a nie pmg_...<br /></div><br /><br /> <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /> noo<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=4651">mczarny</a> — 8 lis 2017, o 18:31</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xentis]]></name></author>
<updated>2017-11-08T18:18:12+01:00</updated>
<published>2017-11-08T18:18:12+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198557#p198557</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198557#p198557"/>
<title type="html"><![CDATA[Re: Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198557#p198557"><![CDATA[
Może się mylę ale funkcja którą próbujesz użyć nazywa się <span style="color: #BF00FF">pgm</span>_read_byte a nie pmg_...<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=6265">xentis</a> — 8 lis 2017, o 18:18</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[zonced]]></name></author>
<updated>2017-11-08T17:37:54+01:00</updated>
<published>2017-11-08T17:37:54+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198555#p198555</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198555#p198555"/>
<title type="html"><![CDATA[Re: Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198555#p198555"><![CDATA[
[syntax=c]#ifndef D_LED_H_<br />#define D_LED_H_<br /><br />#define LED_DATA PORTD<br />#define LED_DATA_DIR DDRD<br />#define ANODY_PORT PORTC<br />#define ANODY_DIR DDRC<br /><br />#define CA1 (1 &lt;&lt; PC0)<br />#define CA2 (1 &lt;&lt; PC1)<br />#define CA3 (1 &lt;&lt; PC2)<br />#define CA4 (1 &lt;&lt; PC3)<br /><br />extern volatile uint8_t cy1;<br />extern volatile uint8_t cy2;<br />extern volatile uint8_t cy3;<br />extern volatile uint8_t cy4;<br /><br />#define SEG_A (1 &lt;&lt; 0)<br />#define SEG_B (1 &lt;&lt; 1)<br />#define SEG_C (1 &lt;&lt; 2)<br />#define SEG_D (1 &lt;&lt; 3)<br />#define SEG_E (1 &lt;&lt; 4)<br />#define SEG_F (1 &lt;&lt; 5)<br />#define SEG_G (1 &lt;&lt; 6)<br />#define SEG_H (1 &lt;&lt; 7)<br />#define NIC 10<br /><br />void d_led_init(void);<br /><br /><br />#endif /* D_LED_H_ */[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18277">zonced</a> — 8 lis 2017, o 17:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mczarny]]></name></author>
<updated>2017-11-08T17:26:44+01:00</updated>
<published>2017-11-08T17:26:44+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198554#p198554</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198554#p198554"/>
<title type="html"><![CDATA[Re: Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198554#p198554"><![CDATA[
pokaż jeszcze plik &quot;d_led.h&quot; bo warning dotyczy funkcji 'pmg_read_byte'<br />coś tam musiałeś skopać<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=4651">mczarny</a> — 8 lis 2017, o 17:26</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[zonced]]></name></author>
<updated>2017-11-08T16:49:27+01:00</updated>
<published>2017-11-08T16:49:27+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198550#p198550</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198550#p198550"/>
<title type="html"><![CDATA[Problem z multipleksowanym LED]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19572&amp;p=198550#p198550"><![CDATA[
Witam mam problem ze skompilowaniem programu z książki.<br />Używam Atmegi88.<br />Tutaj zamieszczam logi z konsoli<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">16:42:52 **** Build of configuration Release for project 7_seg ****<br />make all <br />Building file: ../d_led.c<br />Invoking: AVR Compiler<br />avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega88pa -DF_CPU=8000000UL -MMD -MP -MF&quot;d_led.d&quot; -MT&quot;d_led.o&quot; -c -o &quot;d_led.o&quot; &quot;../d_led.c&quot;<br />../d_led.c: In function '__vector_14':<br />../d_led.c:56:3: warning: implicit declaration of function 'pmg_read_byte' &#91;-Wimplicit-function-declaration&#93;<br />   LED_DATA = pmg_read_byte( &amp;cyfry&#91;cy1&#93;);<br />   ^<br />Finished building: ../d_led.c<br /> <br />Building file: ../main.c<br />Invoking: AVR Compiler<br />avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega88pa -DF_CPU=8000000UL -MMD -MP -MF&quot;main.d&quot; -MT&quot;main.o&quot; -c -o &quot;main.o&quot; &quot;../main.c&quot;<br />Finished building: ../main.c<br /> <br />Building target: 7_seg.elf<br />Invoking: AVR C Linker<br />avr-gcc -Wl,-Map,7_seg.map -mmcu=atmega88pa -o &quot;7_seg.elf&quot;  ./d_led.o ./main.o   <br />./d_led.o: In function `__vector_14':<br />d_led.c:(.text.__vector_14+0x62): undefined reference to `pmg_read_byte'<br />collect2.exe: error: ld returned 1 exit status<br />make: *** &#91;7_seg.elf&#93; Błąd 1<br /><br />16:42:52 Build Finished (took 533ms)<br /></div><br />A tutaj kod tego pliku<br />[syntax=c]#include &lt;avr/io.h&gt;<br />#include &lt;avr/interrupt.h&gt;<br />#include &lt;avr/pgmspace.h&gt;<br />#include &quot;d_led.h&quot;<br /><br />volatile uint8_t cy1;<br />volatile uint8_t cy2;<br />volatile uint8_t cy3;<br />volatile uint8_t cy4;<br /><br />const uint8_t cyfry&#91;&#93; PROGMEM =<br />{<br />~(SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F), //0<br />~(SEG_B | SEG_C), //1<br />~(SEG_A | SEG_B | SEG_D | SEG_E | SEG_G), //2<br />~(SEG_A | SEG_B | SEG_C | SEG_D | SEG_G), //3<br />~(SEG_B | SEG_C | SEG_F | SEG_G), //4<br />~(SEG_A | SEG_C | SEG_D | SEG_F | SEG_G), //5<br />~(SEG_A | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G), //6<br />~(SEG_A | SEG_B | SEG_C | SEG_F), //7<br />~(SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G), //8<br />~(SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G), //9<br />0xFF<br /><br />};<br /><br />void d_led_init (void)<br />{<br />LED_DATA_DIR = 0xFF;<br />LED_DATA = 0xFF;<br /><br />ANODY_DIR |= CA1 | CA2 | CA3 | CA4;<br />ANODY_PORT |= CA1 | CA2 | CA3 | CA4;<br /><br />TCCR0A |= (1 &lt;&lt; WGM01); //CTC ON<br />TCCR0B |= ((1 &lt;&lt; CS02) | (1 &lt;&lt; CS00)); //Preskaler<br />OCR0A = 39; //Compare value<br />TIMSK0 |= (1 &lt;&lt; OCIE0A); // Enable Interrupt CompareMatch<br />}<br /><br />ISR(TIMER0_COMPA_vect)<br />{<br />static uint8_t licznik = 1;<br /><br />ANODY_PORT = (ANODY_PORT &amp; 0xF0) | (~licznik &amp; 0x0F);<br /><br />if(licznik == 1)<br />LED_DATA = pmg_read_byte( &amp;cyfry&#91;cy1&#93;);<br />else if(licznik == 2)<br />LED_DATA =  pmg_read_byte( &amp;cyfry&#91;cy2&#93;);<br />else if(licznik == 4)<br />LED_DATA =  pmg_read_byte( &amp;cyfry&#91;cy3&#93;);<br />else if(licznik == 8)<br />LED_DATA =  pmg_read_byte( &amp;cyfry&#91;cy4&#93;);<br />licznik &lt;&lt;= 1;<br />if(licznik &gt; 8)<br />licznik = 1;<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=18277">zonced</a> — 8 lis 2017, o 16:49</p><hr />
]]></content>
</entry>
</feed>