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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2012-08-26T10:18:18+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=1019&amp;mode</id>
<entry>
<author><name><![CDATA[zenowi]]></name></author>
<updated>2012-08-26T10:18:18+01:00</updated>
<published>2012-08-26T10:18:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13720#p13720</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13720#p13720"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13720#p13720"><![CDATA[
Ale ja mówiłem o nałogach.  <img src="https://forum.atnel.pl/images/smilies/icon_lol.gif" alt=":lol:" title="Śmieje się" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=233">zenowi</a> — 26 sie 2012, o 10:18</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2012-08-26T10:12:42+01:00</updated>
<published>2012-08-26T10:12:42+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13719#p13719</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13719#p13719"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13719#p13719"><![CDATA[
Przecież to jest jak z językami obcymi  trzeba szlifować języki , i można w wielu się porozumiewać<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 26 sie 2012, o 10:12</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2012-08-26T10:09:09+01:00</updated>
<published>2012-08-26T10:09:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13718#p13718</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13718#p13718"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13718#p13718"><![CDATA[
<div class="quotetitle">zenowi napisał(a):</div><div class="quotecontent"><br />Żeby nie było tak słodko. O ile Bascom jest &quot;nałogiem&quot; z którego można się jeszcze wyleczyć, to z C nie ma już żadnego wyjścia, bo go po prostu nie ma. I to wcale nie jest optymistyczne.<br /></div><br /><br />Spokojnie jak ktoś ma silną wolę to z każdego nałogu się wyleczy. Zobacz na Sun'a zna C a pomimo to pisuje czasem w Bascomie <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> ... ja może już nie pisuję .... ale nie mam nic przeciwko Bascomowi <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> — 26 sie 2012, o 10:09</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[zenowi]]></name></author>
<updated>2012-08-26T10:07:18+01:00</updated>
<published>2012-08-26T10:07:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13717#p13717</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13717#p13717"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13717#p13717"><![CDATA[
Żeby nie było tak słodko. O ile Bascom jest &quot;nałogiem&quot; z którego można się jeszcze wyleczyć, to z C nie ma już żadnego wyjścia, bo go po prostu nie ma. I to wcale nie jest optymistyczne.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=233">zenowi</a> — 26 sie 2012, o 10:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2012-08-26T09:16:58+01:00</updated>
<published>2012-08-26T09:16:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13713#p13713</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13713#p13713"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13713#p13713"><![CDATA[
<div class="quotetitle">Antystatyczny napisał(a):</div><div class="quotecontent"><br />Przyjrzałem się dokładniej i już widzę deklaracje znaków. Tak się przestawiłem na C, że kłopotem jest dla mnie czytanie listingu w Bascom <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><br /></div><br /><br />hahahaa - to tak samo jak się ktoś odzwyczai od palenia to potem ponoć nawet nie może znieść dymu papierosów wokoło siebie <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> Zatem warto porzucać nałogi <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> — 26 sie 2012, o 09:16</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[foreste]]></name></author>
<updated>2012-08-26T08:18:50+01:00</updated>
<published>2012-08-26T08:18:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13707#p13707</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13707#p13707"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13707#p13707"><![CDATA[
A w C na pewno więcej linijek by zajął ten program <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=525">foreste</a> — 26 sie 2012, o 08:18</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2012-08-26T07:59:18+01:00</updated>
<published>2012-08-26T07:59:18+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13705#p13705</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13705#p13705"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=13705#p13705"><![CDATA[
Antystatyczny --&gt; przecież jak się spojrzy na kod to od razu widać że to programowa realizacja, sterowniki HD44780 nie mają takich możliwości <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> — 26 sie 2012, o 07:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2012-04-22T20:16:06+01:00</updated>
<published>2012-04-22T20:16:06+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5710#p5710</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5710#p5710"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5710#p5710"><![CDATA[
A tam zaraz Mirku , ale fakt śmiać mi się chce jak sobie przypomnę miał działać na bateriach ale ze względu na LCD skończyło się na zasilaczu <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />Skubany żarł prąd wiadrami , jak tylko odpaliło się podświetlenie <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" />   Ostatecznie tyle z niego zostało 2 fotki i kod <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=58">SunRiver</a> — 22 kwi 2012, o 20:16</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2012-04-21T19:53:49+01:00</updated>
<published>2012-04-21T19:53:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5631#p5631</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5631#p5631"/>
<title type="html"><![CDATA[Re: Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5631#p5631"><![CDATA[
Jak zwykle uniwersalny SunRiver <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> normalnie prawie jak McGyver wśród mikrokontrolerów.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 21 kwi 2012, o 19:53</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[SunRiver]]></name></author>
<updated>2012-04-21T18:20:01+01:00</updated>
<published>2012-04-21T18:20:01+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5625#p5625</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5625#p5625"/>
<title type="html"><![CDATA[Śmiech na sali Zegar z termometrem na LCD 4x20]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=1019&amp;p=5625#p5625"><![CDATA[
Z czystej złośliwości może, ale sporo czasu temu zrobiłem już ten zegarek na wielkich fontach <br />dla wyświetlacza 4x20 znaków, ot po prostu tak jakoś wyszło, że w bascomie.<br />A potem nie było potrzeby by go robić w C.<br /><br />Osobiście jakoś do mnie obecnie nie przemawia potrzeba robienia takich rzeczy.<br />Nie trafia tez do mnie potrzeba bawienia się w C  z wielkimi czcionkami na HD44780.<br />Jeśli już to wolę użyć GLCD <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />Ale skoro już wykopałem i fotki i program to pokazuję go tutaj:)  <br /><br />Program wyświetla czas i temperaturę na wielkich fontach.<br />schematu niema , ale nie jest do niczego potrzebny bo wszystko jest w kodzie.<br />Wszystko na ATmedze 8 z zegarem 8Mhz <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />[syntax=basic4gl]<br />$regfile = &quot;m8def.dat&quot;<br />$crystal = 8000000<br /><br /><br />Config Lcd = 20 * 4<br />Config Lcdpin = Pin , Db4 = Portd.5 , Db5 = Portd.6 , Db6 = Portd.7 , Db7 = Portd.4 , E = Portd.3 , Rs = Portd.2<br /><br />Config Pinb.3 = Input                                       'linia PB1 jako wejściowa<br />Config Pinb.4 = Input                                       'linia PB2 jako<br /><br />'Config Pind.1 = Input<br /><br /><br /><br />Config Timer1 = Timer , Prescale = 256<br />      'konfiguracja Timer1 jako timer<br />      'z podziałem preskalera przez<br />      '256<br /><br />Declare Sub Wysw_czas                                       'procedura wyświetlająca czas na<br />      'LCD w formacie gg:mm:ss<br />On Timer1 Odmierz_1s                                        'przerwanie od przepełnienia<br />      'Timer1 o etykiecie Odmierz_1s<br /><br />Dim Sekundy As Byte                                         'zmienna zliczaj¦ca sekundy<br />Dim Minuty As Byte                                          'zmienna zliczaj¦ca minuty<br />Dim Godziny As Byte                                         'zmienna zliczaj¦ca godziny<br />Dim Nowa_w As Bit<br />Dim Dodatek As Byte<br />Dim Dodatek1 As Bit<br /><br /><br />                                          'flaga zezwolenia aktualizacji<br />      'czasu na LCD<br /><br />Dim Wart_bcd2 As Byte<br />                                     'zmienna pomocnicza, w której<br />      'jest zapisywana wartość BCD<br />      'czasu<br /><br />S1 Alias Pinb.3                                             'przypisanie nazwie Pinb.2<br />      'nazwy S1<br />S2 Alias Pinb.4                                             'przypisanie nazwie Pinb.1<br />      'nazwy S2<br /><br />Enable Interrupts                                           'odblokowanie globalnego systemu<br />      'przerwa˝<br />Enable Timer1                                               'odblokowanie przerwania od<br />      'przepe-nienia Timer1<br />Counter1 = 34286                                            'wartoťŠ pocz¦tkowa wpisywana do<br />      'Timer1 (65536 - 31250 = 34286)<br /><br />Set Nowa_w                                                  'zezwolenie na wyťwietlenie<br />      'aktualnego czasu<br />Set Portb.3                                                 'dołączenie do linii PB1<br />      'rezystora podciągającego<br />Set Portb.4                                                 'dołączenie do linii PB2<br />      'rezystora podciągającego<br /><br />Dim T1 As Single<br />Dim T2 As Single<br />Dim B11 As Byte , B21 As Byte , R As Byte<br />Dim Tmp As String * 6<br />Dim Znak As String * 1<br />R = &amp;HFF<br />                                     'podprogram resetujacy magistrale 1w<br /><br /><br /><br />Cursor Off<br />Display On<br />Cls<br /><br />Deflcdchar 1 , 224 , 224 , 224 , 240 , 248 , 252 , 254 , 255       ' B<br />Deflcdchar 2 , 224 , 224 , 224 , 255 , 255 , 255 , 255 , 255       ' = O<br />Deflcdchar 3 , 255 , 255 , 255 , 255 , 254 , 252 , 248 , 240       ' !/ O<br />Deflcdchar 4 , 255 , 255 , 255 , 255 , 239 , 231 , 227 , 225       ' ! O<br />Deflcdchar 5 , 224 , 224 , 224 , 225 , 227 , 231 , 239 , 255       ' / B<br />Deflcdchar 6 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255       ' ! N<br /><br />' TAblica znaków - &gt; sześc dodatkowych powyżej<br /><br />Dim L1(17) As String * 4<br />Dim L2(17) As String * 4<br />Dim L3(17) As String * 4<br />Dim L4(17) As String * 4<br /><br /><br /><br /><br /><br /><br />' NUMER 1<br />L1(1) = &quot; &quot; + Chr(5) + Chr(2) + &quot; &quot;<br />L2(1) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />L3(1) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(1) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />' NUMER 2<br />L1(2) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(2) = Chr(5) + Chr(2) + Chr(3) + &quot; &quot;<br />L3(2) = Chr(6) + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L4(2) = Chr(6) + Chr(2) + Chr(2) + &quot; &quot;<br />' NUMER 3<br />L1(3) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(3) = &quot; &quot; + Chr(2) + Chr(6) + &quot; &quot;<br />L3(3) = Chr(2) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(3) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' NUMER 4<br />L1(4) = Chr(5) + &quot; &quot; + Chr(2) + &quot; &quot;<br />L2(4) = Chr(6) + Chr(2) + Chr(6) + &quot; &quot;<br />L3(4) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(4) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />' NUMER 5<br />L1(5) = Chr(2) + Chr(2) + Chr(2) + &quot; &quot;<br />L2(5) = Chr(6) + Chr(2) + Chr(1) + &quot; &quot;<br />L3(5) = Chr(2) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(5) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' NUMER 6<br />L1(6) = Chr(5) + Chr(2) + Chr(2) + &quot; &quot;<br />L2(6) = Chr(6) + Chr(2) + Chr(1) + &quot; &quot;<br />L3(6) = Chr(6) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(6) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' NUMER 7<br />L1(7) = Chr(2) + Chr(2) + Chr(2) + &quot; &quot;<br />L2(7) = &quot; &quot; + Chr(5) + Chr(3) + &quot; &quot;<br />L3(7) = &quot; &quot; + Chr(6) + &quot; &quot; + &quot; &quot;<br />L4(7) = &quot; &quot; + Chr(6) + &quot; &quot; + &quot; &quot;<br />' NUMER 8<br />L1(8) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(8) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />L3(8) = Chr(6) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(8) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' NUMER 9<br />L1(9) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(9) = Chr(4) + Chr(2) + Chr(6) + &quot; &quot;<br />L3(9) = &quot; &quot; + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(9) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' NUMER 0<br />L1(10) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(10) = Chr(6) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L3(10) = Chr(6) + &quot; &quot; + Chr(6) + &quot; &quot;<br />L4(10) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />' SYMBOL STOPNIA<br />L1(11) = Chr(5) + Chr(2) + Chr(1) + &quot; &quot;<br />L2(11) = Chr(4) + Chr(2) + Chr(3) + &quot; &quot;<br />L3(11) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L4(11) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />' LITERA  C<br />L1(12) = Chr(5) + Chr(2) + Chr(2) + &quot; &quot;<br />L2(12) = Chr(6) + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L3(12) = Chr(6) + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L4(12) = Chr(4) + Chr(2) + Chr(2) + &quot; &quot;<br /><br />' LITERA  F<br />L1(13) = Chr(5) + Chr(2) + Chr(2) + &quot; &quot;<br />L2(13) = Chr(6) + Chr(2) + Chr(2) + &quot; &quot;<br />L3(13) = Chr(6) + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L4(13) = Chr(6) + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />' DWUKROPEK<br />L1(14) = &quot; &quot; + &quot; &quot;<br />L2(14) = Chr(2) + &quot; &quot;<br />L3(14) = Chr(2) + &quot; &quot;<br />L4(14) = &quot; &quot; + &quot; &quot;<br />' SYMBOL :<br />L1(15) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L2(15) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L3(15) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />L4(15) = &quot; &quot; + &quot; &quot; + &quot; &quot; + &quot; &quot;<br />' PRZECINEK .<br />L1(16) = &quot; &quot; + &quot; &quot;<br />L2(16) = &quot; &quot; + &quot; &quot;<br />L3(16) = &quot; &quot; + &quot; &quot;<br />L4(16) = Chr(3) + &quot; &quot;<br />' HIHIHIH <img src="https://forum.atnel.pl/images/smilies/icon_razz.gif" alt=":P" title="Pokazuje język" /><br />L1(17) = &quot;?&quot; + &quot; &quot;<br />L2(17) = &quot;?&quot; + &quot; &quot;<br />L3(17) = &quot;?&quot; + &quot; &quot;<br />L4(17) = &quot;?&quot; + &quot; &quot;<br /><br /><br />Dim Stri As String * 5<br />Declare Sub Showstring(stri As String)<br /><br />'Dim Valu As Single<br />Declare Sub Rd1820<br />'Dim Valu As Single<br /><br />Dim E1 As String * 5<br />Dim E2 As String * 5<br />Dim E3 As String * 5<br /><br /><br />Config 1wire = Portd.1<br /><br />' /**** PĘTLA GŁÓWNA ****/<br />Do<br /><br /><br /><br /> Call Wysw_czas                                             'wywołanie procedury<br />      'wyťwietlaj¦cej aktualny czas<br /> If S1 = 0 Then                                             'jeśli przyciśnięty S1, to<br />  Waitms 25                                                 'opóźnienie dla eliminacji drgań<br />      'stykˇw<br />  If S1 = 0 Then                                            'sprawdzenie, czy przycisk S1<br />      'dalej naciťniety, jeťli tak, to<br />   Incr Minuty                                              'zwiŕkszenie wartoťci minut<br />   Sekundy = 0                                              'wyzerowanie zmiennej Sekundy<br />   If Minuty = 60 Then                                      'jeťli wartoťŠ Minuty = 60, to<br />    Minuty = 0                                              'zerowanie wartoťci Minuty<br />   End If<br />   Set Nowa_w                                               'zezwolenie na wyťwietlenie<br />      'czasu<br />   Call Wysw_czas                                           'wywołanie procedury<br />      'wyťwietlenia aktualnego czasu<br />   Waitms 200                                               'opóźnienie 200 ms<br />  End If                                                    'koniec instrukcji warunkowej<br /> End If<br /> If S2 = 0 Then                                             'jeśli przyciśnięty S2, to<br />  Waitms 25                                                 'opóźnienie dla eliminacji drgań<br />      'stykˇw<br />  If S2 = 0 Then                                            'sprawdzenie czy przycisk S2<br />      'dalej naciťniety, jeťli tak, to<br />   Incr Godziny                                             'zwiększenie wartości Godziny<br />   If Godziny = 24 Then                                     'jeśli wartość Godziny = 24, to<br />    Godziny = 0                                             'wyzerowanie wartoťci Godziny<br />   End If<br />   Set Nowa_w                                               'zezwolenie na wyświetlenie<br />      'czasu<br />   Call Wysw_czas                                           'wywołanie procedury<br />      'wyťwietlenia aktualnego czasu<br />   Waitms 200                                               'opóźnienie 200 ms<br />  End If                                                    'koniec instrukcji warunkowej<br /> End If<br /><br /><br /><br /><br /><br /><br />Loop<br /><br /><br />End<br /><br /><br /><br /><br /><br />' /**** KONIEC PĘTLI ****/<br /><br />Sub Rd1820<br />1wreset                                                     'podprogram 1wr<br />1wwrite &amp;HCC                                                'komenda skip ROM<br />1wwrite &amp;H44                                                'komenda convert T<br />Waitms 250<br />Waitms 250<br />1wreset                                                     'podprogram 1wr<br />1wwrite &amp;HCC                                                'komenda skip ROM<br />1wwrite &amp;HBE                                                'komenda read<br /><br />B11 = 1wread()                                              'odczyt z termometru<br />B21 = 1wread()<br /><br />1wreset                                                     'podprogram 1wr<br /><br />If B21 &gt;= 248 Then                                          'w przypadku temperatur ujemnych<br />B11 = R - B11                                               'Od 255 Odejmujemy B1<br />B21 = R - B21                                               'od 255 odejmujemy B2<br />Znak = &quot;-&quot;<br />Else<br />Znak = &quot;+&quot;<br />End If<br />T1 = B11 / 16                                               'Przesuniecie w pawo o 4 bajty<br />T2 = B21 * 16                                               'przesuniecie w lewo o 4 bajty<br />T1 = T1 + T2<br /><br />Tmp = Fusing(t1 , &quot; ###.&amp;&amp;&quot;)<br /><br /><br /><br />'Cls<br />'Lcd Tmp<br /><br />E1 = Str(t1)<br />E2 = Left(e1 , 4)<br /><br />E3 = E2 + &quot;°&quot; + &quot;C&quot; + &quot; &quot;<br />'Cls<br /><br />  Locate 4 , 19<br /> Lcd &quot;  &quot;<br />Call Showstring(e3)<br /><br /><br />Waitms 250<br />Waitms 250<br />Waitms 250<br />Waitms 50<br /><br />End Sub<br /><br /><br /><br /><br /><br /><br />'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br /><br /><br /><br /><br /><br /><br /><br /><br />Sub Showstring(stri As String * 5)<br /> If Len(stri) &gt; 5 Then Stri = Left(stri , 5)<br /> Dim A1 As Byte<br /> Dim A2 As String * 1<br /> Dim A3 As Byte<br /> Dim A4 As Byte<br /> Dim B1 As String * 20<br /> Dim B2 As String * 20<br /> Dim B3 As String * 20<br /> Dim B4 As String * 20<br /><br /> B1 = &quot;&quot; : B2 = &quot;&quot; : B3 = &quot;&quot; : B4 = &quot;&quot;<br /> A4 = Len(stri)<br /> For A1 = 1 To A4<br /> A2 = Mid(stri , A1 , 1)<br /><br /> Select Case A2<br /> Case Is = &quot;1&quot; : A3 = 1<br /> Case Is = &quot;2&quot; : A3 = 2<br /> Case Is = &quot;3&quot; : A3 = 3<br /> Case Is = &quot;4&quot; : A3 = 4<br /> Case Is = &quot;5&quot; : A3 = 5<br /> Case Is = &quot;6&quot; : A3 = 6<br /> Case Is = &quot;7&quot; : A3 = 7<br /> Case Is = &quot;8&quot; : A3 = 8<br /> Case Is = &quot;9&quot; : A3 = 9<br /> Case Is = &quot;0&quot; : A3 = 10<br /> Case Is = &quot;°&quot; : A3 = 11<br /> Case Is = &quot;C&quot; : A3 = 12<br /> Case Is = &quot;c&quot; : A3 = 12<br /> 'Case Is = &quot;F&quot; : A3 = 13<br /> 'Case Is = &quot;f&quot; : A3 = 13<br /> 'Case Is = &quot;H&quot; : A3 = 14<br /> Case Is = &quot;:&quot; : A3 = 14<br /> Case Is = &quot; &quot; : A3 = 15<br /> Case Is = &quot;.&quot; : A3 = 16<br /> Case Else : A3 = 17<br /> End Select<br /><br /> B1 = B1 + L1(a3)<br /> B2 = B2 + L2(a3)<br /> B3 = B3 + L3(a3)<br /> B4 = B4 + L4(a3)<br /><br /> Next A1<br /><br />Upperline<br />Lcd B1<br />Lowerline<br />Lcd B2<br />Thirdline<br />Lcd B3<br />Fourthline<br />Lcd B4<br /><br />End Sub<br /><br /><br />Sub Wysw_czas                                               'procedura wyświetlająca czas<br /> If Nowa_w = 1 Then                                         'jeśli flaga Nowa_w = 1, to<br /><br /><br />  Wart_bcd2 = Makebcd(sekundy)                              'zamiana wartości Sekundy na<br />      'wartość w kodzie BCD<br /><br /><br /><br />  If Dodatek1 = 0 Then<br /><br /><br />      Locate 4 , 19<br /> Lcd Bcd(wart_bcd2) ;                                       'wyświetlenie wartości sekund<br />      'w kodzie BCD zamienionych na<br />      'tekst<br /><br /><br /><br /><br /> E1 = Str(godziny)<br /> If Godziny &lt; 10 Then E1 = &quot; &quot; + E1<br />E2 = Str(minuty)<br />If Minuty &lt; 10 Then E2 = &quot;0&quot; + E2<br /><br />E3 = E1 + &quot;:&quot; + E2 + &quot; &quot; + &quot; &quot;<br />Call Showstring(e3)<br />End If<br /><br /><br />If Dodatek1 = 1 Then                                        ' ma być 1<br /><br /> Call Rd1820<br /><br /><br />End If<br /><br /><br /><br /><br /><br /><br /><br />  Reset Nowa_w                                              'zerowanie flagi Nowa_w<br /> End If<br />End Sub                                                     'koniec procedury<br /><br /><br /><br /><br /><br />Odmierz_1s:                                                 'podprogramu obsługi przerwania<br />      'przepe-nienia od Timer1<br /> Counter1 = Counter1 + 34286                                'wpisanie wartości początkowej<br />      'licznika<br /> Incr Sekundy<br /><br /> Incr Dodatek<br /> If Dodatek &gt; 10 Then Dodatek1 = 1<br /> If Dodatek &gt; 15 Then<br /> Dodatek1 = 0<br /> Dodatek = 0<br /> End If<br /><br />                                              'zwiększenie o 1 wartości<br />      'Sekundy<br /> Set Nowa_w                                                 'zezwolenie na wyświetlenie<br />      'czasu<br /> If Sekundy = 60 Then                                       'jeśli Sekundy = 60, to<br />  Sekundy = 0                                               'wyzerowanie wartoťci Sekundy<br />  Incr Minuty                                               'zwiększenie o 1 wartości Minuty<br />  If Minuty = 60 Then                                       'jeťli Minuty = 60, to<br />   Minuty = 0                                               'zerowanie wartoťci Minuty<br />   Incr Godziny                                             'zwiększenie o 1 wartoťci<br />      'Godziny<br />   If Godziny = 24 Then                                     'jelśi Godziny = 24, to<br />    Godziny = 0                                             'zerowanie wartości Godziny<br />   End If                                                   'koniec warunkˇw<br />  End If<br /> End If<br />Return                                                      'powrót z przerwania<br /><br />[/syntax]<br /><br />Fotki : gdzieś już je tu dawałem <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> <br /><br /><a href="http://img196.imageshack.us/i/s6301220.jpg/"  class="postlink"><img src="http://img196.imageshack.us/img196/7089/s6301220.th.jpg" alt="Obrazek" /></a><br /><br /><a href="http://img201.imageshack.us/i/s6301219.jpg/"  class="postlink"><img src="http://img201.imageshack.us/img201/9054/s6301219.th.jpg" alt="Obrazek" /></a><br /><br /><br />Wolno się śmiać <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />Bo mnie samemu śmiech ogarnia jak wspominam czasy Bascoma <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />Teraz zrobiłbym inaczej <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> ale ile razy można robić zegarek i termometr na DS18B20 <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />może kiedyś opiszę big fonty dla Arduino i w GCC , ale niema to chyba sensu bo wystarczy użyć google:)<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=58">SunRiver</a> — 21 kwi 2012, o 18:20</p><hr />
]]></content>
</entry>
</feed>