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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-05-12T19:37:18+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=11642&amp;mode</id>
<entry>
<author><name><![CDATA[Jacek]]></name></author>
<updated>2015-05-12T19:37:18+01:00</updated>
<published>2015-05-12T19:37:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128996#p128996</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128996#p128996"/>
<title type="html"><![CDATA[Re: Atmega 32 2 x Pwm]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128996#p128996"><![CDATA[
Witam - ok dzięki Bartek za informację - będę próbował dalej.<br />pozdrawiam Jacek.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=193">Jacek</a> — 12 maja 2015, o 19:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jacek]]></name></author>
<updated>2015-05-08T23:01:54+01:00</updated>
<published>2015-05-08T23:01:54+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128629#p128629</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128629#p128629"/>
<title type="html"><![CDATA[Atmega 32 2 x Pwm]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=11642&amp;p=128629#p128629"><![CDATA[
witam - napisałem taki programik:<br /><br />[syntax=basic4gl]'testowy program sterowania<br />'silnikiem DC mostek H<br />'start 07-05-2015<br /><br />$regfile = &quot;m32def.dat&quot;<br />$crystal = 16000000<br />$hwstack = 40<br />$swstack = 16<br />$framesize = 32<br /><br />$lib &quot;glcd.lib&quot;<br />'-------------------------------------------------------------------------------<br />'konfiguracja wyświetlacza graficznego<br />Config Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 5 , Cd = 6 , Wr = 3 , Rd = 4 , Reset = 7 , Fs = 2 , Mode = 6<br /><br />'-------------------------------------------------------------------------------<br />'konfiguracja portów<br /><br />Config Portd = &amp;B11110011<br />Config Portb = &amp;B11000000<br /><br /><br />'-------------------------------------------------------------------------------<br />'ustawienia początkowe portów<br /> Portd = &amp;B00000011<br /> Portb = &amp;B11111111<br /><br />'-------------------------------------------------------------------------------<br />'aliasy portów<br /><br />Pwm_cw Alias Portd.5<br />Pwm_ccw Alias Portd.4<br />Cw Alias Portd.6<br />Ccw Alias Portd.7<br />Sw_cw Alias Pinb.0<br />Sw_ccw Alias Pinb.1<br />Led_cw Alias Portb.6<br />Led_ccw Alias Portb.7<br /><br /><br />'-------------------------------------------------------------------------------<br />'zmienne<br /><br />Dim Pwm_set As Byte<br /><br /><br /><br /><br />Config Timer1 = Pwm , Pwm = 8 , Prescale = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down<br />Enable Timer1<br />Start Timer1<br /><br />Cursor Off<br />Cls<br />Wait 1<br /><br /><br />Pwm_set = 128<br /><br />Do<br /><br />Locate 1 , 1 : Lcd Pwm1a ; &quot;  &quot;<br />Locate 1 , 5 : Lcd &quot;Pwm1a&quot;<br />Locate 2 , 1 : Lcd Pwm1b ; &quot;  &quot;<br />Locate 2 , 5 : Lcd &quot;Pwm1b&quot;<br />Locate 3 , 1 : Lcd &quot;Pwm_set=&quot; ; Pwm_set<br /><br /><br />If Sw_cw = 0 Then<br />   Gosub Prog_cw<br />   Else<br />   Gosub Prog_stop<br />  End If<br /><br />If Sw_ccw = 0 Then<br />   Gosub Prog_ccw<br />   ' Else            '?? błąd jak uruchomię te dwie linie to przestaje działać<br />   'Gosub Prog_stop  '??  Pwm1a<br />  End If<br /><br />Loop<br /><br />End<br /><br /><br /><br /><br /><br /><br />Prog_cw:<br /><br />Pwm1a = Pwm_set<br />Set Cw<br />Pwm1b = 0<br />Reset Ccw<br />Reset Led_cw<br />Return<br /><br />Prog_ccw:<br /><br />Pwm1b = Pwm_set<br />Set Ccw<br />Pwm1a = 0<br />Reset Cw<br />Reset Led_ccw<br />Return<br /><br />Prog_stop:<br />Pwm1a = 0<br />Reset Cw<br />Pwm1b = 0<br />Reset Ccw<br />Set Led_cw<br />Set Led_ccw<br />Return[/syntax]<br /><br />i jak w opisie - jak uruchomię 2 linie które są opisane to przestaje działać Pwm1a<br /><br />co robię źle.<br />pozdrawiam Jacek.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=193">Jacek</a> — 8 maja 2015, o 23:01</p><hr />
]]></content>
</entry>
</feed>