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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2023-09-12T23:03:09+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=30&amp;t=24546&amp;mode</id>
<entry>
<author><name><![CDATA[fazik]]></name></author>
<updated>2023-09-12T23:03:09+01:00</updated>
<published>2023-09-12T23:03:09+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237334#p237334</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237334#p237334"/>
<title type="html"><![CDATA[Re: UART]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237334#p237334"><![CDATA[
wow !!! patrzył bym na ten kod 2 godziny i bym tego nie widział !!! Myślałem ze chodzi o rejestry,  dzięki, temat do zamknięcia;<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=21644">fazik</a> — 12 wrz 2023, o 23:03</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[moscow]]></name></author>
<updated>2023-09-12T22:23:11+01:00</updated>
<published>2023-09-12T22:23:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237333#p237333</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237333#p237333"/>
<title type="html"><![CDATA[Re: UART]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237333#p237333"><![CDATA[
<div class="quotetitle">fazik napisał(a):</div><div class="quotecontent"><br />dla czego taki zapis działa:<br /><br /># define _ADPS0 1<br /># define _ADPS1 1<br /># define _ADPS2 0<br /><br />    ADCSRA=(_ADPS0&lt;&lt;ADPS0)| (_ADPS1&lt;&lt;ADPS1)|(_ADPS2&lt;&lt;ADPS2);<br /><br />a taki już nie(wyskakuje błąd ze brakuje :<br /><br /><strong>#define _REFS0 1;</strong><br />#define _REFS1 1 <br />ADMUX= (_REFS0&lt;&lt;REFS0)|(_REFS1&lt;&lt;REFS1);<br /><br />[...]<br /></div><br />W pogrubionej linijce masz średnik.<br /><br />Ja zrobiłem sobie coś w tym stylu kiedyś - mniejsze szanse, żeby się machnąć:<br /><br />[syntax=c]/**<br /> * @def KMC_ALL_BITS_CLEARED<br /> * @brief Constant representing all bits cleared (zeroed).<br /> */<br />#define KMC_ALL_BITS_CLEARED 0x00u<br /><br />// ADMUX: ADC Multiplexer Selection Register<br />// Bit 7:6 - REFS1:0: Reference Selection Bits<br />/// ADMUX: ADC Voltage Reference Selection - AREF, Internal VREF turned off <br />#define KM_ADC_REF_AREF(KMC_ALL_BITS_CLEARED)<br />/// ADMUX: ADC Voltage Reference Selection - AVCC with external capacitor at AREF pin<br />#define KM_ADC_REF_AVCC(_BV(REFS0))<br />/// ADMUX: ADC Voltage Reference Selection - Internal 1.1V Voltage Reference with external capacitor at AREF pin<br />#define KM_ADC_REF_1_1V(_BV(REFS0)// ATmega32 - RESERVED<br />/// ADMUX: ADC Voltage Reference Selection - Internal 2.56V Voltage Reference with external capacitor at AREF pin<br />#define KM_ADC_REF_2_56V(_BV(REFS1)|_BV(REFS0))<br />/// Bit mask for ADC Voltage Reference Selection<br />#define KM_ADC_REF_MASK(~KM_ADC_REF_2_56V)<br /><br />inline void kmAdcSetReference(uint8_t reference) {<br />ADMUX = (ADMUX &amp; KM_ADC_REF_MASK) | reference;<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=20760">moscow</a> — 12 wrz 2023, o 22:23</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[fazik]]></name></author>
<updated>2023-09-12T20:24:21+01:00</updated>
<published>2023-09-12T20:24:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237332#p237332</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237332#p237332"/>
<title type="html"><![CDATA[UART]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=24546&amp;p=237332#p237332"><![CDATA[
dla czego taki zapis działa:<br /><br /># define _ADPS0 1<br /># define _ADPS1 1<br /># define _ADPS2 0<br /><br />    ADCSRA=(_ADPS0&lt;&lt;ADPS0)| (_ADPS1&lt;&lt;ADPS1)|(_ADPS2&lt;&lt;ADPS2);<br /><br />a taki już nie(wyskakuje błąd ze brakuje :<br /><br />#define _REFS0 1;<br />#define _REFS1 1 <br />ADMUX= (_REFS0&lt;&lt;REFS0)|(_REFS1&lt;&lt;REFS1);<br /><br />kompilator wywala taki błąd:<br />||=== Build: Release in gadanie (compiler: GNU GCC Compiler for AVR) ===|<br />..\..\Libs\Adc.c||In function 'ADC_Init':|<br />..\..\Libs\Adc.c|7|error: expected ')' before ';' token|<br />..\..\Libs\Adc.c|7|error: expected ')' before ';' token|<br />||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|<br /><br />nie jest to nic ważnego bo wystarczy na sztywno te jedynki dopisać, ale pytam tak z czystej ciekawości<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 35 minutach ]</span></strong><br /><br />to nie rejestu uart tylko ADC<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=21644">fazik</a> — 12 wrz 2023, o 20:24</p><hr />
]]></content>
</entry>
</feed>