<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ReAl</title>
	<atom:link href="http://real.kiev.ua/feed/langswitch_lang/en/" rel="self" type="application/rss+xml" />
	<link>http://real.kiev.ua</link>
	<description>. .o .oO .oO       failed</description>
	<lastBuildDate>Sat, 04 Sep 2010 18:29:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Марічка вже «там»</title>
		<link>http://real.kiev.ua/2010/09/04/марічка-вже-там/</link>
		<comments>http://real.kiev.ua/2010/09/04/марічка-вже-там/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 11:17:42 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Life-is-life]]></category>
		<category><![CDATA[Навчання]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=583</guid>
		<description><![CDATA[Ось.
Десь в годину ночі по нашому часу Марічка дала sms-ку з Бангкоку (проміжна посадка &#8212; пересадка з літака «Аеросвіт» на літак Thai Airways). В дві години ночі вони з Оленкою перекинулися парою слів телефоном &#8212; веселий і задоволений життям голос навіть я чув.
А десь в сім ранку по нашому, в дванадцять по Тайбею вони (їх [...]]]></description>
			<content:encoded><![CDATA[<p>Ось.<br />
Десь в годину ночі по нашому часу <a class="linkext" href="http://sagitta145.livejournal.com/">Марічка</a> дала sms-ку з Бангкоку (проміжна посадка &#8212; пересадка з літака «Аеросвіт» на літак Thai Airways). В дві години ночі вони з Оленкою перекинулися парою слів телефоном &#8212; веселий і задоволений життям голос навіть я чув.<br />
А десь в сім ранку по нашому, в дванадцять по Тайбею вони (їх там п’ятеро в цьому році зі <a class="linkext" href="http://www.lic145.kiev.ua/">145-ї школи</a>) вже отримали багаж. І направилися в <a class="linkext" href="http://www.nctu.edu.tw/english/index.php">National Chiao Tung University</a><br />
Зараз, мабуть, ще відсипаються.</p>
<p>Ні, ну я в неповні п’ятнадцять поїхав з дому вчитися, а не в неповні вісімнадцять.<br />
Але ж за три з половиною сотні кілометрів, а не за десять тисяч!</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/09/04/марічка-вже-там/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bug in avreal 1.28r2 and 1.28r3</title>
		<link>http://real.kiev.ua/2010/08/29/bug-in-avreal-128r2-and-128r3/</link>
		<comments>http://real.kiev.ua/2010/08/29/bug-in-avreal-128r2-and-128r3/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 13:04:03 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[FT2232]]></category>
		<category><![CDATA[FT4232]]></category>
		<category><![CDATA[fuses]]></category>
		<category><![CDATA[synchronisation]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=568</guid>
		<description><![CDATA[A strange bug was found in avreal 1.28r2 and 1.28r3. At the coincidence of conditions

An FT2232/FT4232-based adapter is used
There are some data for top two flash bytes &#8212; either data from hex-file or erase counter
flash and fuses are used in one avreal call
-v verification switch is used

for some microcontroller types avreal fails with &#8220;synchronosation lost&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>A strange bug was found in avreal 1.28r2 and 1.28r3. At the coincidence of conditions</p>
<ul>
<li>An FT2232/FT4232-based adapter is used</li>
<li>There are some data for top two flash bytes &#8212; either data from hex-file or erase counter</li>
<li>flash and fuses are used in one avreal call</li>
<li>-v verification switch is used</li>
</ul>
<p>for <em>some</em> microcontroller types avreal fails with &#8220;synchronosation lost&#8221; error after the first verification.</p>
<p><span id="more-568"></span></p>
<p>If -n switch is used then code writing fails</p>
<pre class="console">
Writing erase counter = 125
Programming CODE memory
 done (7.9ms)
Verifying CODE memory

	% Verifying from 0x1FFFE to 0x1FFFF   passed
 done (2.83ms)
Programming CODE memory

Synchronisation lost
Reset pin released
</pre>
<p>If -n switch is not used fuse programming fails</p>
<pre class="console">
	% Verifying from 0x1E000 to 0x1EFFF  ........
	% Verifying from 0x1F000 to 0x1FFFF  ........ passed
 done (3.2s)
Programming fuses
	% Write Fuses	command AC A8 00 EB,  reply 00 87 31 03

Synchronisation lost
Reset pin released
</pre>
<p>If top two flash bytes are not used then verification and programming work fine.</p>
<pre class="console">
	% Verifying from 0x1E000 to 0x1EFFF  ........
	% Verifying from 0x1F000 to 0x1FFFD  ....... passed
 done (3.2s)
Programming fuses
	% Write Fuses	command AC A8 00 EB,  reply 00 AC A8 00
	% Write Fuses	command AC E0 00 F3,  reply EB AC E0 00
</pre>
<p>It is known that the bug affects ATmega128 programming and does not touch ATmega8, ATmega168, atmga328P, ATmega64, ATmega325, ATmega2561.<br />
The bug can be avoided by splitting code and fuse programming into two steps or by using LPT-based adapter.</p>
<p>Another bug &#8212; for <em>some</em> AVRs avreal 1.28r3 writes fuses properly</p>
<pre class="console">
Programming fuses
    % Write Fuses    command AC A0 00 <font color="white">E7</font>,  reply 00 AC A0 00
    % Write Fuses    command AC A8 00 <font color="white">F9</font>,  reply E7 AC A8 00
    % Write Fuses    command AC A4 00 <font color="white">FC</font>,  reply F9 AC A4 00
    % Read Fuses    command 50 00 00 00,  reply FC 50 00 <font color="white">E7</font>
    % Read Fuses    command 58 00 00 00,  reply 00 58 00 FF
    % Read Fuses    command 58 08 00 00,  reply 00 58 08 <font color="white">D9</font>
    % Read Fuses    command 50 08 00 00,  reply 00 50 08 <font color="white">FC</font>
</pre>
<p>But at verification stage avreal uses invalid data and reports &#8220;Verifying of fuses failed&#8221;.</p>
<p>Thus, it is recommended to use <a class="linkint" href="/avreal/download#128R2">1.28r2</a> or if updates from 1.28r1 are not essential &#8212; version <a class="linkint" href="/avreal/download#128R1">1.28r1</a>.</p>
<p>I am sorry.</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/29/bug-in-avreal-128r2-and-128r3/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVReAl update – 1.28r3</title>
		<link>http://real.kiev.ua/2010/08/16/avreal-update-1-28r3/</link>
		<comments>http://real.kiev.ua/2010/08/16/avreal-update-1-28r3/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:03:47 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[fuses]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=528</guid>
		<description><![CDATA[avreal v1.28r3 (Mon 2010-08-16) has been released.

avreal does not process fuses from Extended Fuse byte for ATmega16M1, ATmega32M1, ATmega64M1, ATmega32C1, ATmega64C1 &#8212; fixed.


Oops! Some bugs found.
]]></description>
			<content:encoded><![CDATA[<p>avreal <a class="linkint" href="/avreal/download#128R3">v1.28r3 (Mon 2010-08-16)</a> has been released.</p>
<ul>
<li>avreal does not process fuses from Extended Fuse byte for ATmega16M1, ATmega32M1, ATmega64M1, ATmega32C1, ATmega64C1 &#8212; fixed.
</ul>
<hr width="25%" align="left" />
<p>Oops! Some <a class="linkint" href="/2010/08/29/bug-in-avreal-128r2-and-128r3">bugs</a> found.</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/16/avreal-update-1-28r3/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is the difference between ATtiny2313A and ATtiny2313?</title>
		<link>http://real.kiev.ua/2010/08/11/what-is-the-difference-between-attiny2313a-and-attiny2313/</link>
		<comments>http://real.kiev.ua/2010/08/11/what-is-the-difference-between-attiny2313a-and-attiny2313/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 20:39:13 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[FAQ]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=514</guid>
		<description><![CDATA[Questions about differences between new &#8220;A-version&#8221; of AVR mirocontrollers and their predecessors often are found in site log. People look for &#8220;what is the difference between atmega48p and atmega48pa&#8221; or &#8220;atmega8a and atmega8 programming distinction&#8221;.
The &#8220;microcontroller programming&#8221; sentence may have different meanings.

If &#8220;programming&#8221; means &#8220;writing and compiling a program&#8221; you should examine datasheets for given [...]]]></description>
			<content:encoded><![CDATA[<p>Questions about differences between new &#8220;A-version&#8221; of AVR mirocontrollers and their predecessors often are found in site log. People look for &#8220;what is the difference between atmega48p and atmega48pa&#8221; or &#8220;atmega8a and atmega8 programming distinction&#8221;.</p>
<p>The &#8220;microcontroller programming&#8221; sentence may have different meanings.</p>
<p><span id="more-514"></span></p>
<p>If &#8220;programming&#8221; means &#8220;writing and compiling a program&#8221; you should examine datasheets for given microcontrollers and <a class="linkext" href="http://atmel.com/dyn/products/app_notes.asp?family_id=607#Migration_Notes">Migration Notes</a> page. As for program writing there is no difference in most cases. <a class="linkext" href="http://atmel.com/dyn/resources/prod_documents/AVR523.pdf">AVR523: Migration from ATmega8 to ATmega8A</a> says:</p>
<blockquote><p>The ATmega8A is a functionally identical, drop-in replacement for the ATmega8. All devices are subject to the same qualification process and same set of production tests, but as the manufacturing process is not the same some electrical characteristics differ.</p></blockquote>
<p>The next text shows that only electrical characteristics differ indeed. ATmega8A has lower consumption current and works in VCC and frequency range that was covered by both ATmega8 and ATmega8L.</p>
<p>Be careful.<br />
In some cases, for example for <a class="linkext" href="http://atmel.com/dyn/resources/prod_documents/doc8261.pdf">ATtiny2313 and ATtiny2313A</a> we have the same text at the top of the application note but there are much more differences. ATtiny2313A has more capabilities and more registers. An ATtiny2313-oriented program &#8220;must&#8221; work right in ATtiny2313A because for compatibility reason all new capabilities are disabled by default after the microcontroller reset. Anyway it is worth to examine a new microcontroller datasheet in order to refine your program.</p>
<p>It is quite easy if &#8220;programming&#8221; means program loading into the microcontroller flash memory.</p>
<p>&#8220;A&#8221; and &#8220;not-A&#8221; mirocontrollers have not any differences for programming device. They have the same fuse set and the same signature so avreal can&#8217;t distinguish between them. That why avreal displays all posible device names for given signature both in supported device list and in diagnostic messages:</p>
<blockquote><p>
Device connected, tiny2313|tiny2313A detected.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/11/what-is-the-difference-between-attiny2313a-and-attiny2313/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Спека</title>
		<link>http://real.kiev.ua/2010/08/10/спека/</link>
		<comments>http://real.kiev.ua/2010/08/10/спека/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 13:38:18 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Погода]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=507</guid>
		<description><![CDATA[Незвична і неочікувано тяжко переноситься. На роботі сонячний бік і  «так склалося», що саме у нашій кімнаті кондиціонера нема. І комп’ютери — не ті кіловатні, що були раніше, але однак гріються. Вдома теж кондиціонера нема, завжди виручало те, що перший поверх і деяка прохолода йде від підвалу. Рано-вранці провітрити як слід, задраїтися і до [...]]]></description>
			<content:encoded><![CDATA[<p>Незвична і неочікувано тяжко переноситься. На роботі сонячний бік і  «так склалося», що саме у нашій кімнаті кондиціонера нема. І комп’ютери — не ті кіловатні, що були раніше, але однак гріються. Вдома теж кондиціонера нема, завжди виручало те, що перший поверх і деяка прохолода йде від підвалу. Рано-вранці провітрити як слід, задраїтися і до вечора досить прохолодно.</p>
<p>Цього року не виручило. Нічого не хочеться робити, особливо не хочеться думати. Можу себе заставити робити тільки дрібні рутинні справи, та й то давно вже заплановані. Не знаю, коли наздоганятиму відкладені роботи.</p>
<p>Вчора, щоб з чистою совістю нічого не робити, знайшов старий електродвигун ЭДГ-3 1967-го року від деки програвача III-ЭПУ-щось там і поліетиленову крильчатку від колись поширеного побутового вентилятора. Якось їх зліпив докупи і вийшов вентилятор класу «пан сам скле́пав», який непогано допоміг сьогодні о 4-тій ранку накачати в квартиру прохолодного повітря.<br />
Зниження температури ввімкнуло мізки, вимкнені перед тим по thermal shutdown і через кілька годин я згадав, що з тих двигунів більшість була 127-вольтові. І цей теж. На диво, він не згорів. Температура осердя була градусів під шістдесят (і це при інтенсивному обдуві), але запаху перегрітих обмоток наче не було. Ввечері полізу шукати на балконі якийсь трансформатор, ТПП-254 чи подібний, використаю первинні напівобмотки як автотрансформатор 220/127.</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/10/спека/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LPT and Windows PnP.</title>
		<link>http://real.kiev.ua/2010/08/05/lpt-and-windows-pnp/</link>
		<comments>http://real.kiev.ua/2010/08/05/lpt-and-windows-pnp/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 21:27:39 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Adapters and Drivers]]></category>
		<category><![CDATA[DLportIO]]></category>
		<category><![CDATA[LPT]]></category>
		<category><![CDATA[PnP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=497</guid>
		<description><![CDATA[Sometimes avreal works unstable with LPT under OS Windows. Programming can be successfull or can fault, for example synchronisation lost.
A reason of these faults may be LPT polling by Windows Plug-and-Play (PnP) subsystem in order to detect connected devices. The polling is made at OS booting which is indicated by adapter LED blinking. Windows also [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes avreal works unstable with <strong>LPT</strong> under OS <strong>Windows</strong>. Programming can be successfull or can fault, for example <a class="linkint" href="/2010/07/28/avreal-synchronisation-lost/">synchronisation lost</a>.</p>
<p>A reason of these faults may be LPT polling by Windows <strong>Plug-and-Play</strong> (PnP) subsystem in order to detect connected devices. The polling is made at OS booting which is indicated by adapter LED blinking. Windows also can make the polling during its working. <strong>DLportIO.sys</strong> driver does not block access to LPT from another programs that why the polling can interfere in the microcontroller programming.</p>
<p>To avoid PnP interference download and run <a class="linkint" href="/files/avreal/disable-lpt-poll.reg">disable-lpt-poll.reg</a> file. As you can see from the text, the file adds registry key which disables LPT polling.</p>
<blockquote><p>
REGEDIT4</p>
<p>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]<br />
&#8220;DisableWarmPoll&#8221;=dword:00000001
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/05/lpt-and-windows-pnp/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Еліта-Центр</title>
		<link>http://real.kiev.ua/2010/08/03/еліта-центр/</link>
		<comments>http://real.kiev.ua/2010/08/03/еліта-центр/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 22:12:03 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Лохотрон]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=491</guid>
		<description><![CDATA[Воно вже не найсвіжіша новина, але&#8230; Суд виправдав гендиректора &#8220;Еліта-Центру&#8221;
Що відчували надурені люди, коли почули цю новину? Люди, які чотири роки реєструвалися, перереєтровувалсия, вносилися в списки потерпілих. Бігали між міліцією, судами, міськрадою та зборами таких самих. Лаялися між собою про те, чий комітет потерпілих комітетіший і які потерпілі потерпіліші.
Скільки на все це пішло нервів, ліків [...]]]></description>
			<content:encoded><![CDATA[<p>Воно вже не найсвіжіша новина, але&#8230; <a class="linkext" href="http://www.epravda.com.ua/news/2010/07/27/242980/">Суд виправдав гендиректора &#8220;Еліта-Центру&#8221;</a></p>
<p>Що відчували надурені люди, коли почули цю новину? Люди, які чотири роки реєструвалися, перереєтровувалсия, вносилися в списки потерпілих. Бігали між міліцією, судами, міськрадою та зборами таких самих. Лаялися між собою про те, чий комітет потерпілих комітетіший і які потерпілі потерпіліші.</p>
<p>Скільки на все це пішло нервів, ліків від нервів і грошей на ліки. Скільки <em>не прожито</em> (бо «хіба це життя») за ці роки́. І скільки ще буде не прожито за наступні, бо ну не вірю я в те, що щось аж таке велике в лісі здохне, що всім цим людям повернуть гроші чи дадуть квартири.</p>
<p>Та і яким коштом? За чий рахунок? Саме втрачені гроші не повернуть, вони вже давно, що називається, «тю-тю». Навіть якщо комусь щось повернуть &#8212; це ж втричі більше заберуть у якоїсь лікарні чи школи. Адже по дорозі гроші всихатимуть («а  тим  жиром,  що  у  мене  на  руках зостався, я помастю голову» © <a class="linkext" href="http://www.ukrcenter.com/library/read.asp?id=970#top">«Хазяїн»</a>).</p>
<p>Думаю, що правильно було ще тоді махнути на все рукою і спокійно <em>жити</em> далі.</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/03/еліта-центр/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bug in ext fuse processing</title>
		<link>http://real.kiev.ua/2010/08/01/bug-in-ext-fuse-processing/</link>
		<comments>http://real.kiev.ua/2010/08/01/bug-in-ext-fuse-processing/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 14:11:29 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/2010/08/01/bug-in-ext-fuse-processing/</guid>
		<description><![CDATA[avreal does not process fuses from Extended Fuse byte for ATmega16M1, ATmega32M1, ATmega64M1, ATmega32C1, ATmega64C1. The fuses are read as 0 and not writed.

Fixed in avreal 1.28rev3
]]></description>
			<content:encoded><![CDATA[<p>avreal does not process fuses from Extended Fuse byte for ATmega16M1, ATmega32M1, ATmega64M1, ATmega32C1, ATmega64C1. The fuses are read as 0 and not writed.</p>
<hr align="left" width="20%" />
Fixed in <a class="linkint" href="/2010/08/16/avreal-update-1-28r3/">avreal 1.28rev3</a></td>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/08/01/bug-in-ext-fuse-processing/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>avreal synchronisation lost</title>
		<link>http://real.kiev.ua/2010/07/28/avreal-synchronisation-lost/</link>
		<comments>http://real.kiev.ua/2010/07/28/avreal-synchronisation-lost/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 21:15:48 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[FAQ]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[SPI]]></category>
		<category><![CDATA[synchronisation]]></category>
		<category><![CDATA[programmer]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=437</guid>
		<description><![CDATA[Everything you wanted to know about, but were afraid to ask.

As can be found in site log phrase &#8220;synchronisation lost&#8221; is one of most popular in site search, but no one asks the question in comments.
&#8220;synchronisation lost&#8221; message means programmer-to-microcontroller communication fault. SPI interconnection between programming adapter and microcontroller works in the same manner as [...]]]></description>
			<content:encoded><![CDATA[<p><div align="right">Everything you wanted to know about,<br/> but were afraid to ask.</div>
<p/>
<p>As can be found in site log phrase &#8220;synchronisation lost&#8221; is one of most popular in site search, but no one asks the question in comments.</p>
<p>&#8220;synchronisation lost&#8221; message means programmer-to-microcontroller communication fault. SPI interconnection between programming adapter and microcontroller works in the same manner as between two microcontrollers.</p>
<p><img src="http://real.kiev.ua/wp-content/uploads/2010/07/spi-loop.png" alt="spi-loop" title="spi-loop" width="541" height="184" class="aligncenter size-full wp-image-435" /></p>
<p><span id="more-437"></span></p>
<p>Bytes shifted out by programmer (MASTER) are placed into microcontroller (SLAVE) shift register. If the bytes are not replaced by internal programming hardware they will be shifted out back to programmer.</p>
<p>For write commands the first byte of reply is the last byte of previous command and first three bytes of four-byte command are repeated on MISO output with one-byte delay.<br />
For read commands the first two command bytes are echoed back in reply bytes 2 and 3 and the third command byte is replaced with byte read from microcontroller.</p>
<p>For example, <code>Read Fuse High bits</code> command data flow looks as</p>
<table border="1" cellpadding="5" cellspacing="0" width="auto" align="center">
<tbody>
<tr>
<th>Direction</th>
<th>Byte 1</th>
<th>Byte 2</th>
<th>Byte 3</th>
<th>Byte 4</th>
</tr>
<tr>
<td>programmer &rarr; controller</td>
<td>0&#215;58</td>
<td>0&#215;08</td>
<td>0&#215;00</td>
<td>0&#215;00</td>
</tr>
<tr>
<td>controller &rarr; programmer</td>
<td>last byte of <br /> previous command</td>
<td>0&#215;58</td>
<td>0&#215;08</td>
<td>fuse value</td>
</tr>
</tbody>
</table>
<p>Some command and reply codes can be found in avreal output with -% switch.</p>
<pre class="console">
Adapter enabled
	% Reset
	% PgmOn reply  FF FE 53 00
	% Synchronised after 1 try
	% GetID reply  00 30 00 1E
	% GetID reply  00 30 00 94
	% GetID reply  00 30 00 06
	% Read ID: 0x1E9406
Device connected, mega168|mega168A detected
	% Read Lock	command 58 00 00 00,  reply 00 58 00 FF
Chip not locked
	% Read Osccal	command 38 00 00 00,  reply 00 38 00 B0
	% Read Fuses	command 50 00 00 00,  reply 00 50 00 C2
	% Read Fuses	command 58 00 00 00,  reply 00 58 00 FF
	% Read Fuses	command 58 08 00 00,  reply 00 58 08 DD
	% Read Fuses	command 50 08 00 00,  reply 00 50 08 F9
</pre>
<p>Thus, bytes 2 and 3 of reply will be equal to bytes 1 and 2 of command when interconnection between programming adapter and microcontroller is synchronous.</p>
<p>If the bytes are not matched it means that the microcontroller goes out of programming mode or commands/replies in communicaton loop are corrupted. Anyway, it is not a good idea to continue programming because corrupted command can be interpreted, for example, as write fuse command with unwanted fuse value. That way in this case avreal exits with the message under discussion.</p>
<p></lang_ru><lang_en><br />
Таким образом, при синхронной работе программатора и микроконтроллера байты 2 и 3 ответа будуть совпадать с байтами 1 и 2 команды.</p>
<p>Несовпадение во время передачи означает, что микроконтроллер вышел из режима программирования и перестал отвечаь на команды или то, что в петле обмена была искажена команда или ответ на неё. В любом случае не стоит продолжать работу с микроконтроллером, так как неправильно воспринятые команды могут, например, устанивить нежелательное значение fuses. Поэтому при несовпадении avreal выходит из режима программирования и заканчивает работу с указанным сообщением.<br />
</lang_ru><lang_en></p>
<p>Entering programming mode works in the same way. The difference is that the first command byte does not echoed back to programmer because microcontroller is not in porgramming mode yet. The programming enable sequence is 0xAC 0&#215;53 0&#215;00 0&#215;00. At the end of the second byte receiving the microcontroller goes to programming mode and 0&#215;53 is echoed back in the third byte of reply. If the third byte is not 0&#215;53 then a resynchronisation procedure must be made.</p>
<p><img src="http://real.kiev.ua/wp-content/uploads/2010/07/resync.png" alt="resync" title="resync" width="672" height="104" class="aligncenter size-full wp-image-436" /><br />
<!-- картинка resync --></p>
<p>If in some tries 0&#215;53 is not received in the third byte, avreal exits with <code>Can't resync</code> message. The message is number two in &#8220;afraid to ask&#8221; question list.</p>
<p>The most probable causes of synchronisation failure are &#8220;dirty&#8221; interface signals by reason of bounces in signal and ground lines and SCK frequency near the top marging for given MCU clocking frequency. Check adapter hardware, cables, routing in the first case and lower SCK frequency by <a class="linkint" href="/old/avreal/en/description#SW_O"><code>-o</code> (<code>-os</code>)</a> switch in the second one.</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/07/28/avreal-synchronisation-lost/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Велопетлі до Літок і назад</title>
		<link>http://real.kiev.ua/2010/07/05/velopetli-do-litok-i-nazad/</link>
		<comments>http://real.kiev.ua/2010/07/05/velopetli-do-litok-i-nazad/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 09:45:33 +0000</pubDate>
		<dc:creator>ReAl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Вело]]></category>

		<guid isPermaLink="false">http://real.kiev.ua/?p=401</guid>
		<description><![CDATA[Дякувати друзям, вчора я нарешті

Викотився за 75км, на таку відстань я ще не їздив.
Катався сам.

Після того, як мені якось стало «не надто гарно» в самостійному катанні позаминулого літа, я сам просто не катався. Якось спокійніше, коли поруч хтось є. Але минулого літа ті, з ким я зазвичай катався, постійно були «десь». Карпати, Крим, …, і [...]]]></description>
			<content:encoded><![CDATA[<p>Дякувати друзям, вчора я нарешті</p>
<ul>
<li>Викотився за 75км, на таку відстань я ще не їздив.</li>
<li>Катався сам.</li>
</ul>
<p>Після того, як мені якось стало «не надто гарно» в самостійному катанні позаминулого літа, я сам просто не катався. Якось спокійніше, коли поруч хтось є. Але минулого літа ті, з ким я зазвичай катався, постійно були «десь». Карпати, Крим, …, і в результаті я просто практично не сідав на велосипед. Навіть після того, як у мене з’явився велокомп з пульсоміром. Він дійсно допомагає, бо вихід пульсу за певні межі без нього помічаєш не відразу, а коли вже помічаєш наслідки, то це трохи пізнувато. Але я все одно не наважувався кататися сам.</p>
<p>Це літо якось так непогано почалося, але деякі друзі, один з яких відома в наших колах <a class="linkext" href="http://lastwheel.livejournal.com/30322.html">тектонічна велофотомодель</a>, знову завіялися в Карпати надавати гумантарну допомогу «Велокраїні» («канєшна па любві, развє трі рубля дєньгі»), інші, серед яких шанувальниця певних частин тіла велофотомоделі і помічає їх на всіх фото (принаймні на всіх, до яких я читав її коментарі <img src='http://real.kiev.ua/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) — «дуже зайняті», «просто зайняті», хворі, …<br />
Думав-думав, і поїхав сам. Поставив сигналізацію на пульс 150, пообіцяв собі середній тримати 140 і поїхав.</p>
<p><span id="more-401"></span></p>
<p>Спочатку потихеньку прогрівся до «Сонячного», потім поіхав в бік «Космосу». На газопроводі повернув наліво, з кілометр проїхав, але… пісок там відразу підняв пульс сильно за 150, то я повернувся назад на дорогу на «Космос», потім по асфальту до повороту на Рожівку і на бетонку до Пухівки.<br />
Доїхав до звичного місця на Десні, покружляв там, подивився на драгу (так, там чистять дно) і на добрячу гору відкачаного піску, повернувся на трасу. На цей момент вийшло близько 25км, завдяки постійному пульс-контролю практично не стомився.<br />
І вирішив перевірити, чи пам’ятаю дорогу до бази відпочинку «Любич» в Літках, яку мені показала минулої неділі SunD&#8217;Ra. Там покружляв між базами відпочинку, пороздивлявся. Найкрутіша, здається, Київського Метрополітену (який «весь в збитках, бо постійно тарифи нижчі за собівартість проїзду»).<br />
Поїхав назад і вже знову на бетонці до Рожівки оцінив свій стан — є шанс викотитися на 75км, але мало, мало, треба ще десь петлю зробити.<br />
Перед Рожівкою звернув наліво в бік торф’яників — через кілометра півтора піски знову довели пульсомір до жалібного попискування. Ну що робити, їду додому. Вже знову в нашому лісі, практично перед виїздом з нього вирішив таки добрати вістань, неквапом «фіналізуючи» поїздку по тій же дорозі до «Сонячного». І, «тю, зараза» © «Мафинки», вже біля заправки дивлюся, що мені не вистачить метрів сто до 75км. Довелося повернути направо і доїхати до переходу через дорогу біля зупинки маршруток за заправкою.</p>
<p>В результаті вийшло 75.2 км при середній швидкості всього 15 км/год. Іноді задумувався *) і надто розганявся, але сигналізація зупиняла. А якби не сам був, то постійно доганяв би, не втримувався в межах і здох би набагато раніше. Зобов’язання по пульсу витримані — середнє значення рівно 140, перевищення порогу 150 в сумі близько 30 хвилин (за п’ять годин вкручування, тобто 10% часу).</p>
<p>Висновки.</p>
<ul>
<li>Незважаючи на всі петлі, які доволі дивно виглядали б з космосу, на звання «Видатний діяч Броунівського Руху» я таки не тягну. Я на нього тягну, коли починаю щось на базарі шукати <img src='http://real.kiev.ua/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>Таки кожні 25-30 км мені треба відпочивати хвилин 15-20.</li>
<li>1.7 літри води на таку поїздку мені мало.</li>
<li>Треба купляти велоодяг, бо звичайні легкоатлетичні труси «з авоською» не для таких відстаней.</li>
<li>Як не дивно, але на в такому режимі на такій відстані основна проблема була не в серці, легенях чи ногах, а в спині, руках і п’ятій точці (див. попередній пункт).</li>
</ul>
<p>*) Задумувався то про те, нащо мені всі ці avreal-и з FT232R потрібні, вільний час можна і інакше використати, то про те, як його красивіше той ключик +avr зробити. Хто тут лікар? Майже одночасне існування протилежних думок в одній голові — це що?</p>
]]></content:encoded>
			<wfw:commentRss>http://real.kiev.ua/2010/07/05/velopetli-do-litok-i-nazad/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
