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

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

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=8592&amp;mode</id>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2014-10-19T15:42:50+01:00</updated>
<published>2014-10-19T15:42:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99685#p99685</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99685#p99685"/>
<title type="html"><![CDATA[Re: Instrukcja Line a wyświetlanie tekstowe]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99685#p99685"><![CDATA[
Pomogła zmiana <br /><br />$hwstack = 128' default use 32 for the hardware stack<br />$swstack = 128 ' default use 10 for the SW stack<br />$framesize = 128<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 19 paź 2014, o 15:42</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[grzeniu 73]]></name></author>
<updated>2014-10-19T11:26:25+01:00</updated>
<published>2014-10-19T11:26:25+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99654#p99654</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99654#p99654"/>
<title type="html"><![CDATA[Re: Instrukcja Line a wyświetlanie tekstowe]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99654#p99654"><![CDATA[
$hwstack = 32                                               ' default use 32 for the hardware stack<br />$swstack = 10                                               ' default use 10 for the SW stack<br />$framesize = 40 <br /><br />Ja miałem podobne problemy.Zwiększyłem wszędzie na 128 i to pomogło.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1519">grzeniu 73</a> — 19 paź 2014, o 11:26</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2014-10-19T09:36:05+01:00</updated>
<published>2014-10-19T09:36:05+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99626#p99626</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99626#p99626"/>
<title type="html"><![CDATA[Re: Instrukcja Line a wyświetlanie tekstowe]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=99626#p99626"><![CDATA[
kod poniżej , problem jest z instrukcją line , Boxfill ... wyświetlacz po naciśnięciu jakiegoś klawisza wygląda jak stop klatka z analogowego magnetowidu z odświeżaniem  <img src="https://forum.atnel.pl/images/smilies/icon_e_surprised.gif" alt=":o" title="Zdziwiony" /> <br /><br />[syntax=basic4gl]$regfile = &quot;m644pdef.dat&quot;                                   ' specify the used micro<br />$crystal = 16000000<br />$baud = 19200                                               ' use baud rate<br />$hwstack = 32                                               ' default use 32 for the hardware stack<br />$swstack = 10                                               ' default use 10 for the SW stack<br />$framesize = 40                                             ' default use 40 for the frame space<br /><br />$lib &quot;glcdKS108.lbx&quot;<br /><br /><br />'First we define that we use a graphic LCD<br />Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portb , Ce = 1 , Ce2 = 0 , Cd = 4 , Rd = 3 , Reset = 2 , Enable = 5<br />Ddrd = &amp;B00000000                                           'Portd = input<br />Portd = &amp;B11111111                          'PINB.0 = Encoder Pin A<br />'                                                 'PINB.1 = Encoder Pin B<br />'                                                 'PINB.2 = Encoder key<br />Enc_a Alias Pind.7                                          'Encoder A<br />Enc_b Alias Pind.6                                          'Encoder B<br />Enc_k Alias Pind.5                                          'Encoder key<br /><br />'Configure Timer0 interrupt for encoder  --------------------------------------<br />'Timer0 = 8 bit<br />'Overflow time: overflow counts * Prescale / crystal frequency<br />'= 256 * 256 / 16.000.000 Hz = 4,1 msec = ~ 244 Hz<br />'Here Prescale = 256<br />'The encoder is polled every 4,1 msec. To shorten time set PresetTimer 0 &gt; 0<br />'Possible Prescales: 8, 64, 256, 1024<br />Config Timer0 = Timer , Prescale = 256<br />Const Presettimer0 = 0                                      'Initialize Timer0<br />On Timer0 Timer0_isr                                        'Timer0 Interrupt service routine<br /><br />'Common Variables, multiply used ----------------------------------------------<br />Dim Lngfreq As Long<br />Dim Lngstep As Long<br />Dim Strfreq As String * 9<br /><br />'Variables Encoder  -----------------------------------------------------------<br />Dim Bytincr As Byte                                         '=2: Encoder incr., =1: decr., =0: ./.<br />Dim Bytenc_old As Byte<br />Dim Bytenc_new As Byte<br />Dim Bitkey_enc As Bit                                       'Encoder key, =1: pressed<br />Dim Modulacja As Byte<br />Const Doublestep = 0                                        '=1: intermediate position detected<br /><br /><br /><br />'Main program  ****************************************************************<br />Cls<br /><br /><br />Lngfreq = 14000000<br />Lngstep = 10<br />Modulacja = 1<br />Strfreq = Str(lngfreq)<br />Strfreq = Format(strfreq , &quot; 0.000000&quot;)<br />Setfont My12_16 : Lcdat 3 , 20 , Strfreq<br /><br />Bytenc_old = 0                                              'Encoder data<br />Bytenc_new = 0                                              'Encoder data<br />Bytincr = 0<br /><br />Enable Timer0                                               'Interrupt encoder<br />Enable Interrupts                                           'enable all Interrupts<br /><br />Do<br /><br />   Disable Timer0                                           'Stop Timer0 for display<br /><br />   Select Case Bytincr                                      'Set/show TRX freq.<br />      Case 2                                                'Encoder incremented<br />         Lngfreq = Lngfreq + Lngstep<br />      Case 1                                                'Encoder decremented<br />         Lngfreq = Lngfreq - Lngstep<br />   End Select<br /><br />   If Bytincr &gt; 0 Then                                      'Freq. was changed<br />      Strfreq = Str(lngfreq)<br />      Strfreq = Format(strfreq , &quot; 0.000000&quot;)<br /><br />      Setfont My12_16 : Lcdat 3 , 20 ,  Strfreq<br />      Bytincr = 0                                           'Reset increment flag<br />   End If<br /><br />   Enable Timer0                                            'Restart Timer0<br />   Debounce Pind.0 , 0 , Rit_sub , Sub                      'RIT<br />   Debounce Pind.1 , 0 , Modechange , Sub<br />Loop<br /><br />End<br /><br />Wyswietlacz:<br /> Setfont My6_8 : Lcdat 1 , 26 , &quot;&amp;&quot; :<br />    Setfont My6_8 : Lcdat 5 , 1 , &quot;^&quot; : Lcdat 5 , 10 , &quot;1&quot; , 1 : Lcdat 5 , 20 , &quot;ATT&quot; : Lcdat 5 , 40 , &quot;0dB&quot; , 1 :       'Line(57 , 32) -(57 , 39) , 1<br />    Setfont My6_8 : Lcdat 6 , 1 , &quot;S ~1~3~5~7~9+20+40 dB&quot; :<br />    Setfont My6_8 : Lcdat 8 , 1 , &quot;Po   10  30  50   100&quot; :<br />    Setfont Font16x16 : Lcdat 1 , 40 , &quot;&amp;&quot;<br />    Setfont Font16x16 : Lcdat 1 , 60 , &quot;'&quot;<br />    Setfont Font16x16 : Lcdat 1 , 80 , &quot;(&quot;<br />    Setfont Font16x16 : Lcdat 1 , 100 , &quot;)&quot;<br />           'Boxfill(0 , 48) -(1 , 54) , 1                    ' show circle<br />         'Line(0 , 54) -(0 , 48) , 1<br />      Boxfill(0 , 48) -(1 , 54) , 1<br />      Boxfill(3 , 48) -(4 , 54) , 1<br />      Boxfill(6 , 48) -(7 , 54) , 1<br />      Boxfill(9 , 48) -(10 , 54) , 1<br />      Boxfill(12 , 48) -(13 , 54) , 1<br /><br /><br />      If Modulacja = 1 Then<br />    Setfont My6_8 : Lcdat 1 , 2 , &quot;CW &quot;<br /><br />   Elseif Modulacja = 2 Then<br />     Setfont My6_8 : Lcdat 1 , 2 , &quot;LSB&quot;<br />   Elseif Modulacja = 3 Then<br />     Setfont My6_8 : Lcdat 1 , 2 , &quot;USB&quot;<br />   Elseif Modulacja = 4 Then<br />      Setfont My6_8 : Lcdat 1 , 2 , &quot;AM &quot;<br />   Elseif Modulacja = 5 Then<br />     Setfont My6_8 : Lcdat 1 , 2 , &quot;FM &quot;<br />   End If<br />Return<br /><br />Rit_sub:<br />   Gosub Wyswietlacz<br />Return<br />Modechange:<br /><br />  If Modulacja = 1 Then<br />   Modulacja = 2<br /><br />  Elseif Modulacja = 2 Then<br />   Modulacja = 3<br /><br />  Elseif Modulacja = 3 Then<br />   Modulacja = 4<br /><br />  Elseif Modulacja = 4 Then<br />   Modulacja = 5<br /><br />  Elseif Modulacja = 5 Then<br />   Modulacja = 1<br /><br />  End If<br />Gosub Wyswietlacz<br />Return<br /><br /><br /><br /><br /><br />'End of main program **********************************************************<br /><br />'------------------------------------------------------------------------------<br />Timer0_isr:<br />'Encoder interrupt on Timer0 overflow<br />'While data are displayed Timer0 should be stopped<br />'Output: bytIncr = 2: increment, =1: decrement if encoder was changed<br />'Having processed the bytIncr data in the main program reset bytIncr = 0<br />'Switching pattern of ALPS STEC11 encoder:<br />'Turning clockwise              ... counter clockwise<br />'A    B                             A     B<br />'1    1  start detent position      1     1<br />'1    0  intermediate position 1    0     1<br />'0    0  intermediate position 2    0     0<br />'0    1  intermediate position 3    1     0<br />'1    1  next detent position       1     1<br /><br />   Timer0 = Presettimer0<br />   Bytenc_new.0 = Enc_a                                     'Set bit 0 of bytEnc_new<br />   Bytenc_new.1 = Enc_b                                     'Set bit 1 of bytEnc_new<br /><br />   'Check encoder pattern if encoder is changed<br />   'bytIncr = 1: decremented (turned counter clockwise)<br />   'bytIncr = 2: incremented (turned         clockwise)<br />   If Bytenc_new &lt;&gt; Bytenc_old Then                         'encoder is changed<br />      'from intermediate position 3 to quiescent position<br />      If Bytenc_new = &amp;B00000011 And Bytenc_old = &amp;B00000010 Then Bytincr = 2<br />      If Bytenc_new = &amp;B00000011 And Bytenc_old = &amp;B00000001 Then Bytincr = 1<br />      'from intermediate position 1 to intermediate position 2<br />      'DoubleStep = 1:  intermediate position 2 gives an additional tick<br />      '                 2 ticks between 2 detent positions on slow rotation<br />      '           = 0:  1 tick  between 2 detent positions<br />      #if Doublestep = 1<br />         If Bytenc_new = &amp;B00000000 And Bytenc_old = &amp;B00000001 Then Bytincr = 2<br />         If Bytenc_new = &amp;B00000000 And Bytenc_old = &amp;B00000010 Then Bytincr = 1<br />      #endif<br />      Bytenc_old = Bytenc_new                               'old &lt;- new for the next time<br />   End If<br />Return<br /><br />'------------------------------------------------------------------------------<br /><br /><br />$include &quot;font16x16.font&quot;                                   'End Sub<br />$include &quot;my12_16.font&quot;<br />$include &quot;my6_8.font&quot;[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 19 paź 2014, o 09:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kazzik87]]></name></author>
<updated>2014-09-24T09:34:58+01:00</updated>
<published>2014-09-24T09:34:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96541#p96541</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96541#p96541"/>
<title type="html"><![CDATA[Re: Instrukcja Line a wyświetlanie tekstowe]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96541#p96541"><![CDATA[
Wstaw kod.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=476">kazzik87</a> — 24 wrz 2014, o 09:34</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2014-09-21T16:30:05+01:00</updated>
<published>2014-09-21T16:30:05+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96262#p96262</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96262#p96262"/>
<title type="html"><![CDATA[Instrukcja Line a wyświetlanie tekstowe]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=8592&amp;p=96262#p96262"><![CDATA[
Witam,<br /><br />Mam problem z wyświetlaczem 128x64 podczas korzystania z instrukcji graficznych np.Line <br />objawy są ,że obraz się dzieli na dwie części i jedna z nich przesuwa się o 8 lub 16 pixeli w dół lub w górę , jednocześnie wyświetlam text z czcionkami w/w rozmiarze ... jak to można poprawić ?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 21 wrz 2014, o 16:30</p><hr />
]]></content>
</entry>
</feed>