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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2013-12-08T11:07:44+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=5062&amp;mode</id>
<entry>
<author><name><![CDATA[tevo]]></name></author>
<updated>2013-12-08T11:07:44+01:00</updated>
<published>2013-12-08T11:07:44+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=5062&amp;p=60060#p60060</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=5062&amp;p=60060#p60060"/>
<title type="html"><![CDATA[Generacja 38kHz i przerwanie]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=5062&amp;p=60060#p60060"><![CDATA[
Witam mam taki problem próbuję pożenić generacje 38kHz oraz przerwanie w jednym programie i za bardzo mi to nie wychodzi. <br />[syntax=basic4gl]$regfile = &quot;ATtiny45.dat&quot;                                   'procesor Attiny13<br /><br />$crystal = 9600000                                          'niższe taktowanie, CKDIV=0<br />                                                             'przy zmianie CKDIV = 1<br />                                                             'zmienić wartośc na 9600000<br /><br />Ddrb = &amp;B11110011                                           'konfiguracja portu 1-wyjscie, 0-wejscie<br />Portb = &amp;B00001000                                          '1-rezystor podciagajacy<br /><br />Tccr0a.wgm01 = 1                                            'CTC mode<br />Tccr0b.cs00 = 1                                             'Prescale 1<br />Tccr0a.com0b0 = 1                                           'Toggle OC0<br />Ocr0a = 124                                                 'Toggle every (9600000/(38kHz*2))=124<br />Timsk.ocie0b = 1<br />'Config Timer0 = 124 , Prescale = 1<br />Enable Timer0 : On Timer0 Prztimer0<br />Enable Interrupts<br /><br />Dim Flaga_1 As Bit<br />Dim Licznik(6) As Integer<br /><br />Do                                                          'pętla<br /><br />   If Flaga_1 = 1 Then<br />      Flaga_1 = 0<br />      Gosub Led<br />      End If<br />   If Pinb.3 = 0 Then Portb.4 = 1<br />   If Pinb.3 = 1 Then Portb.4 = 0<br /><br /><br />Loop                                                        'koniec pętli<br />End<br /><br /><br />Prztimer0:<br /><br />'Incr Licznik(1)<br />Incr Licznik(3)<br />If Licznik(3) = 100 Then<br />   Set Flaga_1<br />   Licznik(3) = 0<br />   End If<br /><br /><br /><br />Return<br /><br />Led:<br /><br />Toggle Portb.0<br /><br />Return                                                      'koniec programu[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2191">tevo</a> — 8 gru 2013, o 11:07</p><hr />
]]></content>
</entry>
</feed>