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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-05-13T17:24:57+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=58&amp;t=7032&amp;mode</id>
<entry>
<author><name><![CDATA[Maciek 222]]></name></author>
<updated>2014-05-13T17:24:57+01:00</updated>
<published>2014-05-13T17:24:57+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=81010#p81010</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=81010#p81010"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=81010#p81010"><![CDATA[
[syntax=basic4gl]$regfile = &quot;m328pdef.DAT&quot;<br />$crystal = 16000000<br />Config Portd.1 = Output<br />Pind.1 = 0<br /><br />Dim A As Word<br /><br />Dim Green As Byte , Red As Byte , Blue As Byte<br /><br /><br />   Red = 100<br />   Green = 200<br />   Blue = 10<br /><br /><br /><br /><br />Do<br /><br />Gosub Rgb0<br />  Wait 1<br /><br />Loop<br /><br /><br /><br />'Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br /><br />Rgb0:<br />Loadadr Green , X                                           'załaduj adres zmiennej GREEN do rejestru X<br /><br />                                                         'niestety to też mi nie działa<br />$asm<br />; .dseg<br />   ;    Rsbufor : .byte 16 ; Rezerwuje 16 Bajtów Dla Rsbufor<br /><br /><br />    ;ustawić portD na 1 i w zależności od BRCS C=1 tzn bit=1 1=800ns 0=400ns<br /><br />    ;-----&quot;&quot;------ na 0  ------&quot;&quot;----- od BRCS C=0 tzn bit=0 0=400ns 1=800ns<br /><br />                                 ; 12,8=800 13 CYKLI     810ns<br />                                 ;  6,4=400  6 CYKLI     375ns<br />                                 ;150ns  Tolerancja 2,4  Cykle<br /><br /><br />Ldi r16,30                       ;ilosc diod  LDI laduj do r16<br /><br />LDI R18,6      ; ilosc diod *3<br /><br />;Loop6:<br />       ldi ZL,low  (Ledy*2)   ;adres tabeli w pamięci programu data ledy<br />       ldi ZH,high (Ledy*2)<br /><br />Loop6:<br />      LPM R17,Z+                     ; Kolor 1 Cykl<br /><br />      Ldi r19,8                      ;ilosc bitow     1 CYKL<br /><br /><br /><br />Loop4:<br /><br />      SBI portd,1              ;  USTAWIA 1 NA PORCIE D               2 CYKLE<br />      LSL r17                  ;                                       1 CYKL<br />      NOP                       ;                                     1 CYKL<br />    ;  NOP                       ;                                     1 CYKL<br /><br />     ; nop                      ;BEZ TYCH NOP lepiej swieci tzn po odłaczeniu (-) nie<br />                                 ; swieci żadna dioda w 1 diodzie a 2 wogóle<br />     ;nop<br />      brcs jeden               ; jesli 1bit to C=1    jesli 0 to C=0   2 CYKLE lub 1<br />                              ;  SBIS      PIND, 3          ' jak bit ustawiony to omiń skok<br />      cbi PORTd,1             ;           USTAW 0 NA PORCIE            2 CYKLE<br /><br />Jeden:<br /><br />      nop<br />      nop<br />      nop<br />      nop<br />      NOP<br />      DEC R19         ;                                               1 CYKL<br /><br /><br />      cbi PORTd,1             ;           ZERUJ  NA PORCIE D           2 CYKLE<br />       nop<br /><br />       NOP<br />       NOP<br />      BRNE Loop4                  ; 2 Cykle<br /><br />      DEC R18<br /><br />     BRNE LOOP6<br /><br />      NOP<br /><br /><br />        rjmp LOOP8          ; 2 CYKLE<br /><br /><br />'---------------------------------------------------------------------------------<br />'---------------------------------------------------------------------------------<br /><br />Loop8:<br /><br />$end Asm<br /><br />   Return<br />   End<br /><br /> Ledy:<br />Data 10 , 0 , 0 , 0 , 255 , 0[/syntax]<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 2 minutach ]</span></strong><br /><br />Witam może mi ktoś pomoże udało mi się z DATA pobierać zmienne i wszystkie z 1 diody tzn GRB świecą i działa PWM ale następne nie chcą się zapalać <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /> nie mam już nerwów <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1523">Maciek 222</a> — 13 maja 2014, o 17:24</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Maciek 222]]></name></author>
<updated>2014-05-12T14:54:08+01:00</updated>
<published>2014-05-12T14:54:08+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80905#p80905</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80905#p80905"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80905#p80905"><![CDATA[
Witam może mi ktoś cokolwiek powie na temat tego kodu - niestety nie mogę sobie poradzić 1 dioda się zapala w różnych PWM-ach i kolorach niestety następna nie chce ani pozostałe - dzięki <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1523">Maciek 222</a> — 12 maja 2014, o 14:54</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Maciek 222]]></name></author>
<updated>2014-05-11T13:09:15+01:00</updated>
<published>2014-05-11T13:09:15+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80806#p80806</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80806#p80806"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80806#p80806"><![CDATA[
Dzięki Wam za zwrócenie uwagi na &quot;niewidomego&quot; forumpowicza <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> <br />i jeśli ktoś może pomódz mi z tym kodem - dzięki <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: kilkunastu sekundach ]</span></strong><br /><br />sorry &quot;pomóc&quot;<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1523">Maciek 222</a> — 11 maja 2014, o 13:09</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[OdeOn]]></name></author>
<updated>2014-05-11T12:39:34+01:00</updated>
<published>2014-05-11T12:39:34+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80803#p80803</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80803#p80803"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80803#p80803"><![CDATA[
to może ja wstawie <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br />[syntax=basic4gl]$regfile = &quot;m328pdef.DAT&quot;<br />$crystal = 16000000<br />Config Portd.1 = Output<br />Pind.1 = 0<br /><br />Dim A As Word<br /><br />Dim Green As Byte , Red As Byte , Blue As Byte<br /><br /><br /> Red = 100<br /> Green = 200<br /> Blue = 10<br /><br /><br /><br /><br />Do<br /><br />Gosub Rgb0<br /> Wait 1<br /><br />Loop<br /><br /><br /><br />'Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br /><br />Rgb0:<br />Loadadr Green , X 'załaduj adres zmiennej GREEN do rejestru X<br /> 'niestety to też mi nie działa<br />$asm<br /><br /><br /> ;ustawić portD na 1 i w zależności od BRCS C=1 tzn bit=1 1=800ns 0=400ns<br /> ;-----&quot;&quot;------ na 0 ------&quot;&quot;----- od BRCS C=0 tzn bit=0 0=400ns 1=800ns<br /> ;Ldi R17,(X) ; Kolor 1 Cykl<br /><br />Ldi r16,30 ;ilosc diod LDI laduj do r16<br />;ldi r17,255 ;kolor<br /> INC R16<br />LDI R18,3<br /><br />Loop6:<br /> ; ldi ZL,low &#91;Ledy*2&#93; ;adres tabeli w pamięci programu<br /> ; ldi ZH,high &#91;Ledy*2&#93; niestety taki zapis nie kompiluje mi Bascom<br /><br /><br /> Ldi R17,10 ; Kolor 1 Cykl<br /> Ldi r19,8 ;ilosc bitow 1 CYKL<br /><br /><br /> ; 12,8=800 13 CYKLI 810ns<br /> ; 6,4=400 6 CYKLI 375ns<br /> ;150ns Tolerancja 2,4 Cykle<br />Loop4:<br /> SBI portd,1 ; USTAWIA 1 NA PORCIE D 2 CYKLE<br /> lsl r17 ; 1 CYKL<br /> NOP ; 1 CYKL<br /> NOP ; 1 CYKL<br /> brcs jeden ; jesli 1bit to C=1 jesli 0 to C=0 2 CYKLE lub 1<br /><br /> cbi PORTd,1 ; USTAW 0 NA PORCIE 2 CYKLE<br /><br />Jeden:<br /><br /> nop<br /> nop<br /> nop<br /> nop<br /> NOP<br /> DEC R19 ; 1 CYKL<br /><br /><br /> cbi PORTd,1 ; ZERUJ NA PORCIE D 2 CYKLE<br /><br /> NOP<br /> NOP<br /> BRNE Loop4 ; 2 Cykle<br /> DEC R18<br /><br /> BRNE LOOP6<br /><br /> NOP<br /><br /><br /> rjmp LOOP8 ; 2 CYKLE<br /><br />Ledy:<br />.db 10 , 20 , 30<br />'---------------------------------------------------------------------------------<br />'---------------------------------------------------------------------------------<br /><br />Loop8:<br /><br />$end Asm<br />Return[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1407">OdeOn</a> — 11 maja 2014, o 12:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Zaba]]></name></author>
<updated>2014-05-11T11:30:53+01:00</updated>
<published>2014-05-11T11:30:53+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80797#p80797</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80797#p80797"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80797#p80797"><![CDATA[
@Maciek 222  co do znaczników &quot;Syntax&quot;<br />Edytuj swój post z kodem<br />w edytrze zaznacz kod i naciśnij Ctrl+x następnie<br />wybierz z listy rozwijanej &quot;SYNTAX wybierz&quot; (zaraz nad oknem edycji)<br />&quot;Basic (bascom)&quot; i wciśnij klawisze Ctrl+v.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1044">Zaba</a> — 11 maja 2014, o 11:30</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Maciek 222]]></name></author>
<updated>2014-05-11T10:21:09+01:00</updated>
<published>2014-05-11T10:21:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80792#p80792</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80792#p80792"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80792#p80792"><![CDATA[
kurcze nie wiem jak to się robi <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 56 minutach ]</span></strong><br /><br />Może mi ktoś pomoże <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /> zapala mi się tylko 1 dioda i wszystkie kolory następne nie chcą <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /> - dzięki<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1523">Maciek 222</a> — 11 maja 2014, o 10:21</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Mateo193]]></name></author>
<updated>2014-05-11T10:15:33+01:00</updated>
<published>2014-05-11T10:15:33+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80790#p80790</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80790#p80790"/>
<title type="html"><![CDATA[Re: Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80790#p80790"><![CDATA[
Wstaw to w znacznikach<br />[syntax] i użyj tabulatorów bo jest strasznie nieprzejrzyste<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1349">Mateo193</a> — 11 maja 2014, o 10:15</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Maciek 222]]></name></author>
<updated>2014-05-11T08:40:40+01:00</updated>
<published>2014-05-11T08:40:40+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80783#p80783</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80783#p80783"/>
<title type="html"><![CDATA[Pomoc LED RGB WS2812B wstawka Asm w Bascom]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=7032&amp;p=80783#p80783"><![CDATA[
Witam sorry jestem początkujący i nie mogę sobie poradzić ze wstawką w ASM w Bascom j/w<br />oto co wypociłem <img src="https://forum.atnel.pl/images/smilies/icon_e_sad.gif" alt=":(" title="Smutny" /><br /><br />$regfile = &quot;m328pdef.DAT&quot;<br />$crystal = 16000000<br />Config Portd.1 = Output<br />Pind.1 = 0<br /><br />Dim A As Word<br /><br />Dim Green As Byte , Red As Byte , Blue As Byte<br /><br /><br />   Red = 100<br />   Green = 200<br />   Blue = 10<br /><br /><br /><br /><br />Do<br /><br />Gosub Rgb0<br />  Wait 1<br /><br />Loop<br /><br /><br /><br />'Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br /><br />Rgb0:<br />Loadadr Green , X                                           'załaduj adres zmiennej GREEN do rejestru X<br />                                                              'niestety to też mi nie działa<br />$asm<br /><br /><br />    ;ustawić portD na 1 i w zależności od BRCS C=1 tzn bit=1 1=800ns 0=400ns<br />    ;-----&quot;&quot;------ na 0  ------&quot;&quot;----- od BRCS C=0 tzn bit=0 0=400ns 1=800ns<br />         ;Ldi R17,(X)          ; Kolor 1 Cykl<br /><br />Ldi r16,30         ;ilosc diod  LDI laduj do r16<br />;ldi r17,255        ;kolor<br />  INC R16<br />LDI R18,3<br /><br />Loop6:<br />      ; ldi ZL,low  [Ledy*2]   ;adres tabeli w pamięci programu<br />      ; ldi ZH,high [Ledy*2]   niestety taki zapis nie kompiluje mi Bascom<br /><br /><br />      Ldi R17,10          ; Kolor 1 Cykl<br />      Ldi r19,8             ;ilosc bitow     1 CYKL<br /><br /><br />                                  ; 12,8=800 13 CYKLI     810ns<br />                                 ;  6,4=400  6 CYKLI     375ns<br />                                 ;150ns  Tolerancja 2,4  Cykle<br />Loop4:<br />      SBI portd,1              ;  USTAWIA 1 NA PORCIE D               2 CYKLE<br />      lsl r17                  ;                                       1 CYKL<br />      NOP                       ;                                     1 CYKL<br />      NOP                       ;                                     1 CYKL<br />      brcs jeden               ; jesli 1bit to C=1    jesli 0 to C=0   2 CYKLE lub 1<br /><br />      cbi PORTd,1             ;           USTAW 0 NA PORCIE            2 CYKLE<br /><br />Jeden:<br /><br />      nop<br />      nop<br />      nop<br />      nop<br />      NOP<br />      DEC R19         ;                                               1 CYKL<br /><br /><br />      cbi PORTd,1             ;           ZERUJ  NA PORCIE D           2 CYKLE<br /><br />       NOP<br />       NOP<br />      BRNE Loop4                  ; 2 Cykle<br />      DEC R18<br /><br />      BRNE LOOP6<br /><br />      NOP<br /><br /><br />        rjmp LOOP8          ; 2 CYKLE<br /><br />Ledy:<br />.db 10 , 20 , 30<br />'---------------------------------------------------------------------------------<br />'---------------------------------------------------------------------------------<br /><br />Loop8:<br /><br />$end Asm<br />Return<br /><br />jeśli ktoś z kolegów mógłby mi pomóc to bym był wdzięczny (ewentualnie wyprowadził na dobre tory <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=1523">Maciek 222</a> — 11 maja 2014, o 08:40</p><hr />
]]></content>
</entry>
</feed>