<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3669065</guid>
        <pubDate>Mon, 09 May 2016 16:53:08 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3669065</link>
        <description><![CDATA[VLeshka: Воскрешу тему&#33;<br>
<br>
При построении проекта, в окне build выводит отчёт типа:<br>
<br>
<strong class='tag-b'>   7 274 bytes of CODE  memory <br>
   240 bytes of DATA  memory (+  23 absolute ) <br>
   763 bytes of CONST memory (+ 136 absolute ) </strong><br>
<br>
Хочу узнать, что значит <strong class='tag-b'>(+  23 absolute )</strong>.<br>
<br>
Справочник IAR не знает, что это такое. Интернет тоже (если есть где-либо - поправьте&#33;).<br>
<br>
Решил копать через отчёты IAR. Настройкой в Linker -&gt; Generate linker listing создал segment map в формате html.<br>
Далее, в этом файле так же сухо приводится absolute в сокращении &quot;abs&quot; в таблице Module summary.<br>
<br>
Зацепился за &quot;Module summary&quot; -&gt; Перерыл официальные доки IAR, много всяких в инете скачал, НО: везде приводится одна и та же фраза &quot;Module summary which lists the contribution (in bytes) from each module&quot;. Ни слова про absolute.<br>
<br>
ТАК ЧТО ЖЕ ТАКОЕ ABSOLUTE???]]></description>
        <author>VLeshka</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3296357</guid>
        <pubDate>Wed, 03 Apr 2013 10:07:25 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3296357</link>
        <description><![CDATA[VLeshka: <strong class='tag-b'>trainer</strong> переустановка помогла бы, особенно с установкой прав админа для меня.:) <br>
Вобщем, на одном и том же комьпютере, &quot;до меня&quot;, под логином администратора всё было нормально. Под моим логином, гостя, как мной и описано. В итоге просто &quot;перебазировался&quot; с приборами на свой компьютер с моими администраторскими правами.]]></description>
        <author>VLeshka</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3293073</guid>
        <pubDate>Tue, 26 Mar 2013 11:28:53 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3293073</link>
        <description><![CDATA[trainer: Аааа... Ну тогда переустанови Windows. Точно поможет.<br><br>runtime у вас, очевидно, разного размера.<br>IAR, если я правильно помню, в map-файлах умеет выдавать размеры откомпилированных функций и объектов. Можно сравнить.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292940</guid>
        <pubDate>Tue, 26 Mar 2013 05:52:55 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292940</link>
        <description><![CDATA[VLeshka: <strong class='tag-b'>trainer</strong> только предположение, что это влияет. Другой теории, куда надо идти, нет.]]></description>
        <author>VLeshka</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292934</guid>
        <pubDate>Tue, 26 Mar 2013 05:29:34 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292934</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=3292912'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>VLeshka &#064; <time class="tag-quote__quoted-time" datetime="2013-03-26T04:03:30+00:00">26.03.13, 04:03</time></span><div class='quote '>Также обратил внимание, что у меня нет прав на запись в каталоге программы IAR, в каталоге Program Files.</div></div>А зачем тебе нужны права туда?  :blink:]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292912</guid>
        <pubDate>Tue, 26 Mar 2013 04:03:30 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3292912</link>
        <description><![CDATA[VLeshka: <strong class='tag-b'>trainer</strong> версии сравнили - у меня поновей, по мнению напарника это не должно влиять. Также обратил внимание, что у меня нет прав на запись в каталоге программы IAR, в каталоге Program Files. Пытаюсь получить права администратора - у нас на работе это не просто сделать. :)]]></description>
        <author>VLeshka</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3291709</guid>
        <pubDate>Sat, 23 Mar 2013 10:58:48 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3291709</link>
        <description><![CDATA[trainer: Если в настройках проекта все идентично - разница может быть из-за разных версий компиляторов и/или библиотек]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3291466</guid>
        <pubDate>Fri, 22 Mar 2013 12:06:40 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3291466</link>
        <description><![CDATA[VLeshka: Всю ветку прочитал.<br>Есть проект, написан в IAR.<br>Напарник передаёт мне исходный код, у него компиляция выдаёт hex-файл размером в 96кб, а у меня копия такого же проекта выдаёт hex-файл размером в 146кб.<br>Проверили настройки в Project - Options:<br>- Debugger - Driver: ST-Link (для него делаем).<br>- С/С++ compiler - Optimizations - Level: High.<br>- Linker - Config - Linker Configuration File: Задали Override default (задана копия файла как и у напарника).<br><br>Засада в том, что мой hex-файл размером в 146кб никак не подходит для прошивки прибора (прошивальщики что в IAR, что фирменный STM32 не могут прошить им, ругаясь на слишком большой размер - это факт). А hex-файл размером в 96кб, получаемый при компиляции у напарника, прекрасно подходит (но его надо отлаживать далее при приборе).<br><br>Вобщем, надо выяснить причину, почему IAR выдаёт hex-файл повышенного размера.<br>HELP. :help:]]></description>
        <author>VLeshka</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3236139</guid>
        <pubDate>Mon, 12 Nov 2012 09:37:27 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3236139</link>
        <description><![CDATA[ir0407: Гы... :D Ёкереный бабай... Точно&#33; Вот что значит сила привычки. Спасибо большое.]]></description>
        <author>ir0407</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3236050</guid>
        <pubDate>Mon, 12 Nov 2012 06:27:00 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3236050</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=3235903'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ir0407 &#064; <time class="tag-quote__quoted-time" datetime="2012-11-11T17:36:20+00:00">11.11.12, 17:36</time></span><div class='quote '>При компиляции идет ругань на указанную строчку в виде текста &quot;expected expression&quot;.</div></div>Естественно будет ругань. Убери символ = из макроопределений. Иначе у тебя после развертывания макросов получается ( = 14745600UL / (16 * = 57600) - 1)]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3235903</guid>
        <pubDate>Sun, 11 Nov 2012 17:36:20 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=3235903</link>
        <description><![CDATA[ir0407: О, как&#33; :D  Не густо же тут вопросов однако... И мой был последним аж два года назад. Ну что ж, попробуем продолжить, т.к. я так и не поборол тогда IAR-овский компилятор, вернулся к своему любимому асму. Потом времени не было этим заниматься, потом желания... И вот теперь и время появилось и желание, но воз пока и ныне там же. <br>
<br>
Вопрос состоит в следующем. В качестве учебного эксперимента решил переписать под IAR свой асмовый модуль под USART. И снова сразу же наткнулся на какие-то сишные грабли при передаче парметра в функцию. Делаю вот так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#define SYS_CLK = 14745600UL</div><div class="code_line">#define USART_BAUD = 57600</div><div class="code_line">#define BAUD_CONST (SYS_CLK / (16 * USART_BAUD) - 1)</div><div class="code_line">&nbsp;</div><div class="code_line">void InitUSART(unsigned int BaudConst);</div><div class="code_line">&nbsp;</div><div class="code_line">void main(void)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;InitUSART(BAUD_CONST); &nbsp;//&#60;-- Компилятор ругается на эту строку</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">void InitUSART(unsigned int BaudConst);</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;UBRRH = (unsigned char)BaudConst &#62;&#62; 8;</div><div class="code_line">&nbsp;&nbsp;UBRRL = (unsigned char)BaudConst;</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
При компиляции идет ругань на указанную строчку в виде текста &quot;expected expression&quot;. При этом если в параметр функции подставить конкретное число все компилируется нормально, а вот с макроподстановкой <strong class='tag-b'>BAUD_CONST</strong> не хочет. Подскажите плиз где я тут на грабли наступаю. Уже весь мануал по языку триста раз скурил, но по той скудной инфе что там есть никак не могу раздуплиться по работе с макросами. В чем мой косяк?]]></description>
        <author>ir0407</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590684</guid>
        <pubDate>Mon, 10 May 2010 18:00:41 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590684</link>
        <description><![CDATA[ЫукпШ: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2590666'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ir0407 &#064; <time class="tag-quote__quoted-time" datetime="2010-05-10T17:32:25+00:00">10.05.10, 17:32</time></span><div class='quote '>Да, ничего не включается, но все равно в дампе присутствует небольшой код инициализации библиотеки. А мне бы хотелось посмотреть где это находится, как сделано и если нужно изменить под свои нужды.</div></div><br>
Не знаю, не замечал. :huh: <br>
<br>
 Может речь идёт о стартапе ?<br>
 Его исходники обычно имеются.<br>
 Поищи файл cstartup (.s90 ?).<br>
<br>
 Что касается стандартных процедур, то линкер IAR имеет<br>
 &quot;удобную&quot; логику работы, а именно:<br>
 если некая процедура обнаружена в юзерной программе, в библиотеке<br>
 она не разыскивается. Это значит, можно переопределить<br>
 любую стандартную процедуру. Например, если реализовать<br>
 собственную putchar тогда стандартный printf будет пользовать<br>
 именно её. В результате можно выводить данные куда захочешь.]]></description>
        <author>ЫукпШ</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590666</guid>
        <pubDate>Mon, 10 May 2010 17:32:25 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590666</link>
        <description><![CDATA[ir0407: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2590352'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ЫукпШ &#064; <time class="tag-quote__quoted-time" datetime="2010-05-10T10:32:27+00:00">10.05.10, 10:32</time></span><div class='quote '>Но, насколько я помню, если библиотека указана, но ничего из неё<br>
не используется, то в исполнимые коды ничего из такой библиотеки<br>
не включается.</div></div><br>
Да, ничего не включается, но все равно в дампе присутствует небольшой код инициализации библиотеки. А мне бы хотелось посмотреть где это находится, как сделано и если нужно изменить под свои нужды.<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2590352'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ЫукпШ &#064; <time class="tag-quote__quoted-time" datetime="2010-05-10T10:32:27+00:00">10.05.10, 10:32</time></span><div class='quote '>Использование С/C++ - компилятора как раз и даёт возможность<br>
не обращать на эти самые тонкости никакого внимания.</div></div><br>
Теперь это я уже понял. Просто надо хорошо знать и умело применять опции компилятора и линкера.<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2590352'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ЫукпШ &#064; <time class="tag-quote__quoted-time" datetime="2010-05-10T10:32:27+00:00">10.05.10, 10:32</time></span><div class='quote '>Не помню, чтобы мне это понадобилось за последние xxx лет.</div></div><br>
Столько не живут.  :jokingly:]]></description>
        <author>ir0407</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590352</guid>
        <pubDate>Mon, 10 May 2010 10:32:27 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590352</link>
        <description><![CDATA[ЫукпШ: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2589789'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ir0407 &#064; <time class="tag-quote__quoted-time" datetime="2010-05-09T13:07:02+00:00">09.05.10, 13:07</time></span><div class='quote '>IAR не генерит код(кроме области векторов) если в опциях не подключена никакая библиотека. А мне надо заставить компилятор генерить код без подключения библиотек. Исходников стандартных библиотек в моем IAR нет, только скомпилированные.</div></div><br>
Исходники библиотек обычно имеются у версий компилятора &quot;professional&quot;.<br>
<br>
 Но, насколько я помню, если библиотека указана, но ничего из неё<br>
 не используется, то в исполнимые коды ничего из такой библиотеки<br>
 не включается. И это не только у IAR. <br>
<br>
 Что касается тонкостей адресации. <br>
 Использование С/C++ - компилятора как раз и даёт возможность<br>
 не обращать на эти самые тонкости никакого внимания.<br>
 Не помню, чтобы мне это понадобилось за последние xxx лет.]]></description>
        <author>ЫукпШ</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590213</guid>
        <pubDate>Mon, 10 May 2010 07:18:37 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590213</link>
        <description><![CDATA[trainer: А там вроде бы на русском языке написано &quot;Память программ&quot;, &quot;при переходах&quot;]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590177</guid>
        <pubDate>Mon, 10 May 2010 05:14:17 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2590177</link>
        <description><![CDATA[MeG: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2589962'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>trainer &#064; <time class="tag-quote__quoted-time" datetime="2010-05-09T17:52:59+00:00">09.05.10, 17:52</time></span><div class='quote '>Не на байт, а на слово. Память программ при переходах адресуется пословно, младший бит адреса не указывается в коде команды и подразумевается равным 0. Ну или, если смотреть с другой стороны - адрес является порядковым номером 16-битного слова. Особенность архитектуры AVR. </div></div><br>
вы уж уточняйте о каком адресе идет речь, а то у авр-а много адресных пространств и для каждой свои правила организации и свои инструкции для доступа.<br>
Собственно речь идет об указателе инструкций]]></description>
        <author>MeG</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589995</guid>
        <pubDate>Sun, 09 May 2010 18:26:17 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589995</link>
        <description><![CDATA[trainer: Вот уж не помню.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589969</guid>
        <pubDate>Sun, 09 May 2010 17:59:49 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589969</link>
        <description><![CDATA[ir0407: Спасибо. :) А в каком документе на сайте Atmel-a можно найти эту инфу об особенностях архитектуры. А то я что-то никак не могу ничего такого найти. Инфы столько, что глаза разбегаются.]]></description>
        <author>ir0407</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589962</guid>
        <pubDate>Sun, 09 May 2010 17:52:59 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589962</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=2589789'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>ir0407 &#064; <time class="tag-quote__quoted-time" datetime="2010-05-09T13:07:02+00:00">09.05.10, 13:07</time></span><div class='quote '>Смотрю в даташит по ATtiny45. Вижу следующее:<br>
Как видно - везде выравнивание вроде как на байт.</div></div>Не на байт, а на слово. Память программ при переходах адресуется пословно, младший бит адреса не указывается в коде команды и подразумевается равным 0. Ну или, если смотреть с другой стороны - адрес является порядковым номером 16-битного слова. Особенность архитектуры AVR.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589789</guid>
        <pubDate>Sun, 09 May 2010 13:07:02 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2589789</link>
        <description><![CDATA[ir0407: Всем привет&#33; Вот, на старости лет лет решил освоить программирование микроконтроллеров... :) <br>
Попробовал себя в AvrStudio на асме - вроде все нормально. Решил освоить и С. Полазив по интернету остановил свой выбор на IAR. Методом научного тыка вроде разобрался с настройками. Но в один прекрасный момент вылезла такая проблема.<br>
<br>
Суть в следующем:<br>
Изголяюсь с камнем ATtiny45, а конкретно с его USI под TWI. Все вроде бы нормально, все получается, а вот когда я захотел прикрутить к TWI прерывания вылезла непонятка. В симуляторе начали вылазить ошибки о выходе куда-то за пределы кода. Подозрение пало на инициализацию векторов. IAR вектора инициализирует двухбайтовыми командами. Смотрю в даташит по ATtiny45. Вижу следующее:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">9.1 Interrupt Vectors in ATtiny25/45/85</div><div class="code_line">The interrupt vectors of ATtiny25/45/85 are described in Table 9-1below.</div><div class="code_line">&nbsp;</div><div class="code_line">Table 9-1. Reset and Interrupt Vectors</div><div class="code_line">=========================================================================</div><div class="code_line">Vector No. &nbsp;Program Address &nbsp; Source &nbsp; &nbsp; &nbsp; &nbsp; Interrupt Definition</div><div class="code_line">=========================================================================</div><div class="code_line">1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RESET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;External Pin, Power-on Reset,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Brown-out Reset, Watchdog Reset</div><div class="code_line">2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0001 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INT0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; External Interrupt Request 0</div><div class="code_line">3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0002 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PCINT0 &nbsp; &nbsp; &nbsp; &nbsp; Pin Change Interrupt Request 0</div><div class="code_line">4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0003 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER1_COMPA &nbsp; Timer/Counter1 Compare Match A</div><div class="code_line">5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0004 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER1_OVF &nbsp; &nbsp; Timer/Counter1 Overflow</div><div class="code_line">6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0005 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER0_OVF &nbsp; &nbsp; Timer/Counter0 Overflow</div><div class="code_line">7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0006 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EE_RDY EEPROM &nbsp;Ready</div><div class="code_line">8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0007 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ANA_COMP &nbsp; &nbsp; &nbsp; Analog Comparator</div><div class="code_line">9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0008 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ADC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ADC Conversion Complete</div><div class="code_line">10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x0009 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER1_COMPB &nbsp; Timer/Counter1 Compare Match B</div><div class="code_line">11 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x000A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER0_COMPA &nbsp; Timer/Counter0 Compare Match A</div><div class="code_line">12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x000B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIMER0_COMPB &nbsp; Timer/Counter0 Compare Match B</div><div class="code_line">13 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x000C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WDT Watchdog &nbsp; Time-out</div><div class="code_line">14 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x000D &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;USI_START &nbsp; &nbsp; &nbsp;USI START</div><div class="code_line">15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0x000E &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;USI_OVF &nbsp; &nbsp; &nbsp; &nbsp;USI Overflow</div><div class="code_line">&nbsp;</div><div class="code_line">If the program never enables an interrupt source, the Interrupt Vectors are not used, and regular</div><div class="code_line">program code can be placed at these locations. The most typical and general program setup for</div><div class="code_line">the Reset and Interrupt Vector Addresses in ATtiny25/45/85 is shown in the program example</div><div class="code_line">below.</div></ol></div></div></div></div><br>
Как видно - везде выравнивание вроде как на байт. Смотрю в заголовочный файл IAR для ATtiny45 и вижу следующее:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">/* NB! vectors are specified as byte addresses */</div><div class="code_line">&nbsp;</div><div class="code_line">#define &nbsp; &nbsp;RESET_vect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(0x00) /* External Pin, Power-on Reset, Brown-out Reset,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Watchdog Reset */</div><div class="code_line">#define &nbsp; &nbsp;INT0_vect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (0x02) /* External Interrupt Request 0 */</div><div class="code_line">#define &nbsp; &nbsp;PCINT0_vect &nbsp; &nbsp; &nbsp; &nbsp; (0x04) /* Pin Change Interrupt Request 0 */</div><div class="code_line">#define &nbsp; &nbsp;TIM1_COMPA_vect &nbsp; &nbsp; (0x06) /* Timer/Counter1 Compare Match A */</div><div class="code_line">#define &nbsp; &nbsp;TIM1_OVF_vect &nbsp; &nbsp; &nbsp; (0x08) /* Timer/Counter1 Overflow */</div><div class="code_line">#define &nbsp; &nbsp;TIM0_OVF_vect &nbsp; &nbsp; &nbsp; (0x0A) /* Timer/Counter0 Overflow */</div><div class="code_line">#define &nbsp; &nbsp;EE_RDY_vect &nbsp; &nbsp; &nbsp; &nbsp; (0x0C) /* EEPROM Ready */</div><div class="code_line">#define &nbsp; &nbsp;ANA_COMP_vect &nbsp; &nbsp; &nbsp; (0x0E) /* Analog Comparator */</div><div class="code_line">#define &nbsp; &nbsp;ADC_vect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(0x10) /* ADC Conversion Complete */</div><div class="code_line">#define &nbsp; &nbsp;TIM1_COMPB_vect &nbsp; &nbsp; (0x12) /* Timer/Counter1 Compare Match B */</div><div class="code_line">#define &nbsp; &nbsp;TIM0_COMPA_vect &nbsp; &nbsp; (0x14) /* Timer/Counter0 Compare Match A */</div><div class="code_line">#define &nbsp; &nbsp;TIM0_COMPB_vect &nbsp; &nbsp; (0x16) /* Timer/Counter0 Compare Match B */</div><div class="code_line">#define &nbsp; &nbsp;WDT_vect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(0x18) /* Watchdog Time-out */</div><div class="code_line">#define &nbsp; &nbsp;USI_START_vect &nbsp; &nbsp; &nbsp;(0x1A) /* USI START */</div><div class="code_line">#define &nbsp; &nbsp;USI_OVF_vect &nbsp; &nbsp; &nbsp; &nbsp;(0x1C) /* USI Overflow */</div></ol></div></div></div></div><br>
Вижу выравнивание на слово. Начинаю тормозить... :slow: <br>
<br>
Лезу в инклуды асма AvrStudio - вижу следующее:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">; ***** INTERRUPT VECTORS ************************************************</div><div class="code_line">.equ &nbsp; &nbsp;INT0addr &nbsp; &nbsp;= 0x0001 &nbsp; &nbsp;; External Interrupt 0</div><div class="code_line">.equ &nbsp; &nbsp;PCI0addr &nbsp; &nbsp;= 0x0002 &nbsp; &nbsp;; Pin change Interrupt Request 0</div><div class="code_line">.equ &nbsp; &nbsp;OC1Aaddr &nbsp; &nbsp;= 0x0003 &nbsp; &nbsp;; Timer/Counter1 Compare Match 1A</div><div class="code_line">.equ &nbsp; &nbsp;OVF1addr &nbsp; &nbsp;= 0x0004 &nbsp; &nbsp;; Timer/Counter1 Overflow</div><div class="code_line">.equ &nbsp; &nbsp;OVF0addr &nbsp; &nbsp;= 0x0005 &nbsp; &nbsp;; Timer/Counter0 Overflow</div><div class="code_line">.equ &nbsp; &nbsp;ERDYaddr &nbsp; &nbsp;= 0x0006 &nbsp; &nbsp;; EEPROM Ready</div><div class="code_line">.equ &nbsp; &nbsp;ACIaddr &nbsp; &nbsp; &nbsp; &nbsp; = 0x0007 &nbsp; &nbsp;; Analog comparator</div><div class="code_line">.equ &nbsp; &nbsp;ADCaddr &nbsp; &nbsp; &nbsp; &nbsp; = 0x0008 &nbsp; &nbsp;; ADC Conversion ready</div><div class="code_line">.equ &nbsp; &nbsp;OC1Baddr &nbsp; &nbsp;= 0x0009 &nbsp; &nbsp;; Timer/Counter1 Compare Match B</div><div class="code_line">.equ &nbsp; &nbsp;OC0Aaddr &nbsp; &nbsp;= 0x000a &nbsp; &nbsp;; Timer/Counter0 Compare Match A</div><div class="code_line">.equ &nbsp; &nbsp;OC0Baddr &nbsp; &nbsp;= 0x000b &nbsp; &nbsp;; Timer/Counter0 Compare Match B</div><div class="code_line">.equ &nbsp; &nbsp;WDTaddr &nbsp; &nbsp; &nbsp; &nbsp; = 0x000c &nbsp; &nbsp;; Watchdog Time-out</div><div class="code_line">.equ &nbsp; &nbsp;USI_STARTaddr &nbsp; = 0x000d &nbsp; &nbsp;; USI START</div><div class="code_line">.equ &nbsp; &nbsp;USI_OVFaddr = 0x000e &nbsp; &nbsp;; USI Overflow</div></ol></div></div></div></div><br>
Потихоньку начинаю офигевать... :crazy: <br>
<br>
Решил посмотреть что видно в дизассемблере AvrStudio - увидел вот это:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">---- Test_3.asm -----------------------------------------------------------------------------------</div><div class="code_line">47: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rjmp RESET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Reset Handler</div><div class="code_line">+00000000: &nbsp; C00E &nbsp; &nbsp; &nbsp; RJMP &nbsp; &nbsp; &nbsp;PC+0x000F &nbsp; &nbsp; &nbsp;Relative jump</div><div class="code_line">48: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp EXT_INT0 ; IRQ0 Handler</div><div class="code_line">+00000001: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">49: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp PCINT0 ; PCINT0 Handler</div><div class="code_line">+00000002: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">50: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM1_COMPA ; Timer1 CompareA Handler</div><div class="code_line">+00000003: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">51: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM1_OVF ; Timer1 Overflow Handler</div><div class="code_line">+00000004: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">52: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM0_OVF ; Timer0 Overflow Handler</div><div class="code_line">+00000005: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">53: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp EE_RDY ; EEPROM Ready Handler</div><div class="code_line">+00000006: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">54: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp ANA_COMP ; Analog Comparator Handler</div><div class="code_line">+00000007: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">55: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp ADC ; ADC Conversion Handler</div><div class="code_line">+00000008: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">56: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM1_COMPB ; Timer1 CompareB Handler</div><div class="code_line">+00000009: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">57: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM0_COMPA ;</div><div class="code_line">+0000000A: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">58: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp TIM0_COMPB ;</div><div class="code_line">+0000000B: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">59: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp WDT ;</div><div class="code_line">+0000000C: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">60: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp USI_START ;</div><div class="code_line">+0000000D: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">61: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reti &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; rjmp USI_OVF ;</div><div class="code_line">+0000000E: &nbsp; 9518 &nbsp; &nbsp; &nbsp; RETI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Interrupt return</div><div class="code_line">@0000000F: RESET</div><div class="code_line">73: &nbsp; &nbsp; &nbsp; RESET: &nbsp; &nbsp;ldi r16, low(RAMEND) &nbsp; &nbsp; &nbsp; &nbsp; ; Main program start</div><div class="code_line">+0000000F: &nbsp; E50F &nbsp; &nbsp; &nbsp; &nbsp;LDI &nbsp; &nbsp; &nbsp; R16,0x5F &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Load immediate</div><div class="code_line">74: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ldi r17, high(RAMEND); Tiny45/85 also has SPH</div><div class="code_line">+00000010: &nbsp; E011 &nbsp; &nbsp; &nbsp; &nbsp;LDI &nbsp; &nbsp; &nbsp; R17,0x01 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Load immediate</div><div class="code_line">75: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out SPL, r16 &nbsp; &nbsp; &nbsp; &nbsp; ; Set Stack Pointer to top of RAM</div><div class="code_line">+00000011: &nbsp; BF0D &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; &nbsp; &nbsp; 0x3D,R16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Out to I/O location</div><div class="code_line">76: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out SPH, r17 &nbsp; &nbsp; &nbsp; &nbsp; ; Tiny45/85 als has SPH</div><div class="code_line">+00000012: &nbsp; BF1E &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; &nbsp; &nbsp; 0x3E,R17 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Out to I/O location</div></ol></div></div></div></div><br>
Каждая команда занимает слово, но адресация почему то идет как побайтная. Вот тут я приехал. :wall: <br>
<br>
Вот может кто нибудь прояснить эту ситуацию? А то у меня уже мозги кипят. :D <br>
<br>
================================================================================<br>
И еще вопрос. IAR не генерит код(кроме области векторов) если в опциях не подключена никакая библиотека. А мне надо заставить компилятор генерить код без подключения библиотек. Исходников стандартных библиотек в моем IAR нет, только скомпилированные. Можно ли как-то заставить IAR генерить код без подключения библиотек? Или может у кого-то есть эти исходники? Поделитесь плиз? Я догадываюсь, что исходники есть наверное в инсталяторе IAR, но как их вытянуть оттуда пока не знаю. Наверное нужна более дорогая лицензия.]]></description>
        <author>ir0407</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2525530</guid>
        <pubDate>Fri, 05 Mar 2010 21:49:15 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=2525530</link>
        <description><![CDATA[AVANGARD0_1338: у кого есть сама эта программа(iar ewpic)??? пишите. как тока будет она я сразу вступю в дискуссию. а пока очень очень очень нужна]]></description>
        <author>AVANGARD0_1338</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=754201</guid>
        <pubDate>Mon, 20 Jun 2005 14:47:19 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=754201</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=754046'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>shtirlizzz &#064; <time class="tag-quote__quoted-time" datetime="2005-06-20T12:48:22+00:00">20.06.05, 12:48</time></span><div class='quote '>хотя Time я ни где и не использовал вроде</div></div>А в ClassBiosSMH не используется? И вообще, о таких ошибках без полных исходников можно долго гадать.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=752652</guid>
        <pubDate>Sat, 18 Jun 2005 13:10:45 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=752652</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=752621'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>MeG &#064; <time class="tag-quote__quoted-time" datetime="2005-06-18T12:01:14+00:00">18.06.05, 12:01</time></span><div class='quote '> И гугль о Segnetics-ах ни чего сказать не смог.</div></div>Он просто неправильно написал. Signetics http://www.signetics.com/product.html]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=752621</guid>
        <pubDate>Sat, 18 Jun 2005 12:01:14 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=752621</link>
        <description><![CDATA[MeG: IAR systems, почему-то не знает об Segnetics абсолютно ни чего, наверное шифруются. И гугль о Segnetics-ах ни чего сказать не смог. Кинь ссылку на документацию или на сайт.<br>
У тебя возникли проблемы с IAR systems или с настройками компилятора? Собственно в чем проблемы, может быть ты всетаки расскажешь, <strong class='tag-b'>shtirlizzz</strong>]]></description>
        <author>MeG</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=751743</guid>
        <pubDate>Fri, 17 Jun 2005 10:33:35 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=751743</link>
        <description><![CDATA[shtirlizzz: Драсте всем кто нибудь пытался програмить контроллер Segnetics с помощью IAR systems. Начал разбираться с этим компилятором возникла куча проблемм прежде всего с настройками. Если кто сталкивался помогите. :wall:]]></description>
        <author>shtirlizzz</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=745673</guid>
        <pubDate>Fri, 10 Jun 2005 14:16:13 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=745673</link>
        <description><![CDATA[trainer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=42431&view=findpost&p=745530'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Moneyiac &#064; <time class="tag-quote__quoted-time" datetime="2005-06-10T12:44:23+00:00">10.06.05, 12:44</time></span><div class='quote '>буду писать в AVR studio, там тоже есть С (а так хотелось С++  )</div></div>Можешь откомпилировать в IAR, а отлаживать под AVR Studio. Правда будут ли под AVR Studio видны прелести C++ - не знаю.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=745530</guid>
        <pubDate>Fri, 10 Jun 2005 12:44:23 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=745530</link>
        <description><![CDATA[Moneyiac: Ладно, спасибо, <br>буду писать в AVR studio, там тоже есть С (а так хотелось С++ :&#39;( )]]></description>
        <author>Moneyiac</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=742937</guid>
        <pubDate>Wed, 08 Jun 2005 09:19:25 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=742937</link>
        <description><![CDATA[potor: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
По симуляции периферии вообще и прерываний в частности IAR EWAVR слабоват по сравнению с AVR Studio, ПМСМ. Это, похоже, единственный его недостаток. <br>
</div></div><br>
это точно, ты можешь сконвертить отладочный файл для AVR Studio и отлаживать там]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=742125</guid>
        <pubDate>Tue, 07 Jun 2005 17:32:01 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=742125</link>
        <description><![CDATA[trainer: По симуляции периферии вообще и прерываний в частности IAR EWAVR слабоват по сравнению с AVR Studio, ПМСМ. Это, похоже, единственный его недостаток.]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=741657</guid>
        <pubDate>Tue, 07 Jun 2005 12:53:01 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=741657</link>
        <description><![CDATA[MeG: В IAR-е, вроде (давно не юзал), можно файлик сделать с таймингами прерываний и по нему отлаживаться.]]></description>
        <author>MeG</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=741254</guid>
        <pubDate>Tue, 07 Jun 2005 08:07:55 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=741254</link>
        <description><![CDATA[Moneyiac: кто работал с IAR for AVR 3.20C, подскажите как там в дебагере заставить срабатывать прерывания от таймеров тогда когда им положено, а не прописывать постоянно какую-то абстрактную частоту их появления в Simulator/Interrupts]]></description>
        <author>Moneyiac</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=486156</guid>
        <pubDate>Mon, 18 Oct 2004 14:27:01 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=486156</link>
        <description><![CDATA[potor: <a class='tag-url' href='http://www.telesys.ru/wwwboards/mcontrol/index.shtml' target='_blank'>Спроси здесь</a>]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=482415</guid>
        <pubDate>Wed, 13 Oct 2004 12:11:06 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=482415</link>
        <description><![CDATA[trainer: На ассемблере(IAR EWAVR):<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">NAME KernelIntr &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__64bit_doubles&quot;, &quot;disabled&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__cpu&quot;, &quot;3&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__cpu_name&quot;, &quot;AT90Mega161&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__enhanced_core&quot;, &quot;enabled&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__has_elpm&quot;, &quot;false&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__memory_model&quot;, &quot;2&quot;</div><div class="code_line">&nbsp;&nbsp; RTMODEL &quot;__rt_version&quot;, &quot;2.30&quot;</div><div class="code_line">&nbsp;&nbsp; RSEG CSTACK:DATA:NOROOT(0)</div><div class="code_line">&nbsp;&nbsp; RSEG NEAR_Z:DATA:NOROOT(0)</div><div class="code_line">&nbsp;&nbsp; RSEG RSTACK:DATA:NOROOT(0)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; PUBLIC TaskSwitcher</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; RSEG CODE:CODE:NOROOT(1)</div><div class="code_line">TaskSwitcher:</div><div class="code_line">; что-то делаем</div><div class="code_line">&nbsp;&nbsp; reti &nbsp;</div><div class="code_line">;------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; COMMON INTVEC:CODE:ROOT(1)</div><div class="code_line">&nbsp;&nbsp; ORG &nbsp;36d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; TIMER0_OVERFLOW_VECTOR</div><div class="code_line">&nbsp;&nbsp; RJMP TaskSwitcher</div><div class="code_line">END</div></ol></div></div></div></div>На C(IAR EWAVR):<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#pragma vector=TIMER0_OVF0_vect</div><div class="code_line">__interrupt void CommonInterruptHandler(void) {</div><div class="code_line">&nbsp;&nbsp; /* что-то делаем */</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=482322</guid>
        <pubDate>Wed, 13 Oct 2004 10:59:27 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=482322</link>
        <description><![CDATA[Small^: Приведите пример обработки прерывания, например по переполнению таймера под Atmel &#33;&#33;]]></description>
        <author>Small^</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=462194</guid>
        <pubDate>Sun, 19 Sep 2004 12:10:51 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=462194</link>
        <description><![CDATA[netaimaid: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><strong class='tag-b'>Small</strong>, 19.09.04, 16:44<br>
Народ &#33; Буду признателен если кто нить надоумит как IAR подключить к <br>
AVR Studio&#33;?</div></div><br>
<br>
Попробуйте в AVR Studio загрузить *.d90 с отладочной информацией.]]></description>
        <author>netaimaid</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=462179</guid>
        <pubDate>Sun, 19 Sep 2004 11:44:20 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=462179</link>
        <description><![CDATA[Small: Народ &#33; Буду признателен если кто нить надоумит как IAR подключить к <br>AVR Studio&#33;?]]></description>
        <author>Small</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334841</guid>
        <pubDate>Fri, 09 Apr 2004 09:40:21 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334841</link>
        <description><![CDATA[potor: скорее всего у тебя выключено эхо, главное, чтобы в другом терминале, что то появилось <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-04-09T09:45:26+00:00">09.04.04, 09:45</time></strong>:</span></span><br>
зайди в свойства&#092;настройки&#092;параметры ASCII, и поставь галочку перед - отображать введенные символы на экран]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334739</guid>
        <pubDate>Fri, 09 Apr 2004 08:03:38 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334739</link>
        <description><![CDATA[bizar: Ещё я немогу печатать пока до кого ни будь не дозванюсь.??]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334495</guid>
        <pubDate>Thu, 08 Apr 2004 18:55:25 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334495</link>
        <description><![CDATA[potor: да, такой, но тебе достаточно просто 3 провода<br>2-3<br>3-2<br>5-5]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334401</guid>
        <pubDate>Thu, 08 Apr 2004 15:30:23 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334401</link>
        <description><![CDATA[bizar: Nullmodem (9-9) Cable<br>
<a class='tag-url' href='http://www.apslab.net/products/phonexpress/doc/209.html' target='_blank'>Это</a>]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334104</guid>
        <pubDate>Thu, 08 Apr 2004 09:46:18 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334104</link>
        <description><![CDATA[potor: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
Провернул всё как ты сказал<br>
жму ждать звонка, а на другом звонить<br>
ну и они не саеденяються тот бесконечно ждёт<br>
другой дозванивается.<br>
</div></div><br>
не надо ждать звонка, и звонить тоже не надо<br>
просто соедини два кома кабелем, настрой их в терминале одинаково, набири в одном окне строку символов, она должна появиться в другом, если нет, тогда либо что то с COMом, либо с кабелем, кстати ты правильно кабель распаял?]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334081</guid>
        <pubDate>Thu, 08 Apr 2004 09:23:48 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=334081</link>
        <description><![CDATA[bizar: Провернул всё как ты сказал<br>жму ждать звонка, а на другом звонить<br>ну и они не саеденяються тот бесконечно ждёт<br>другой дозванивается.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=333413</guid>
        <pubDate>Wed, 07 Apr 2004 10:22:11 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=333413</link>
        <description><![CDATA[potor: нет, просто запустить, указав вместо модема номер com порта, попробуй нульмодемным кабелем соединить два com порта между собой, запусти два гипер терминала, настроенных на одну скорость с одинаковыми параметрами, в окне одного набери несколько символов с клавы, посмотри на окно другого, и все станет понятно]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=333274</guid>
        <pubDate>Wed, 07 Apr 2004 07:49:41 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=333274</link>
        <description><![CDATA[bizar: <strong class='tag-b'>potor</strong>, в гипере нужно поставить ждать звонка и всё?]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332957</guid>
        <pubDate>Tue, 06 Apr 2004 17:42:24 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332957</link>
        <description><![CDATA[potor: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
Всё теперь осуществляем проект.<br>
Ну нужно ещё прогу написать для приёма с COM порта<br>
</div></div><br>
ненадо ничего писать, воспользуйся стандартным гипер терминалом для проверки:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332790</guid>
        <pubDate>Tue, 06 Apr 2004 14:00:23 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332790</link>
        <description><![CDATA[bizar: Всё теперь осуществляем проект.<br>
Ну нужно ещё прогу написать для приёма с COM порта.<br>
Документацию по настройки COM скачал.<br>
Короче <strong class='tag-b'>potor</strong>, бли я даже не знаю как тебя отблагодорить.<br>
 :D  :lol:  :rolleyes:  :wub:  B)  :yes: <br>
Правда вопросов у меня ещё море но сначало<br>
разберёмся с этим примером.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332677</guid>
        <pubDate>Tue, 06 Apr 2004 12:02:54 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332677</link>
        <description><![CDATA[potor: еше раз обьясняю, машинный цикл и тактовая частота разные вещи<br>считай машинным циклом время выполнения самой быстрой команды<br>у PIC16 два типа команд, одни выполняются за один машинный цикл, другие за два, есть правда команды, время выполнение которых зависит от результата<br>у PIC16 один машинный цикл = 4 такта, т е я тебе привел вычисления для кварца 8MHz]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332666</guid>
        <pubDate>Tue, 06 Apr 2004 11:48:16 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332666</link>
        <description><![CDATA[bizar: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Один цикл при твоем кварце 2MHz=2000000Hz</div></ol></div></div></div></div><br>
Мой кварц вобще-то 8Mhz<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">т е это я тебе сказал для твоего кварца </div></ol></div></div></div></div><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Что лучше использовать 2Mhz или 8Mhz </div><div class="code_line">для передачи таких небольших чисел.</div><div class="code_line">Но чтобы не было ни каких задержек тормажений?</div></ol></div></div></div></div>]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332653</guid>
        <pubDate>Tue, 06 Apr 2004 11:23:28 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332653</link>
        <description><![CDATA[potor: нет, читайте доки, они рулез:)<br>один такт-8MHz<br>машинный цикл состоит у твоего пика из четырех тактов, т е 2MHz<br>т е это я тебе сказал для твоего кварца]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332639</guid>
        <pubDate>Tue, 06 Apr 2004 10:59:04 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332639</link>
        <description><![CDATA[bizar: Ok<br>если использовать 8Mhz = (8000000)<br>Что лучше использовать 2Mhz или 8Mhz <br>для передачи таких небольших чисел.<br>Но чтобы не было ни каких задержек тормажений?]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332628</guid>
        <pubDate>Tue, 06 Apr 2004 10:43:43 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332628</link>
        <description><![CDATA[potor: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">;------------------------------------------------- этот код выполняется 1 раз-------------------------------------</div><div class="code_line">TransmitBitDelay: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;сюда попадаем по call2 цикла </div><div class="code_line">; &nbsp; &nbsp;12 {</div><div class="code_line">; &nbsp; &nbsp;13 unsigned char i,j;</div><div class="code_line">; &nbsp; &nbsp;14 for (i= 10; i!=0; i--)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVLW &nbsp; 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;W=10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 цикл &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVWF &nbsp; i &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;i=W (i=10) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 цикл </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GOTO &nbsp; &nbsp;TransmitBitDelay_0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 цикла &nbsp;</div><div class="code_line">;----------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; итого 6 циклов</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">; &nbsp; &nbsp;15 &nbsp; for (j= 10; j!=0; j--);</div><div class="code_line">;--------------------------------------------этот код выполняется i*j раз----------------------------------------</div><div class="code_line">;-------------------причем команда BTFSS &nbsp; _A_STATUS,2 &nbsp;выполняется за два цикла i раз---------------------------</div><div class="code_line">;-----------------------------------------------а за один цикл i*(j-1) раз---------------------------------------</div><div class="code_line">;-------------------команда GOTO &nbsp; &nbsp;TransmitBitDelay_1 выполняется i*(j-1) раз-----------------------------------</div><div class="code_line">TransmitBitDelay_1:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DECF &nbsp; &nbsp;j,1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; вычитаем из j 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 цикл </div><div class="code_line">TransmitBitDelay_2:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVF &nbsp; &nbsp;j,1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; (j==0)? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 цикл</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;BTFSS &nbsp; _A_STATUS,2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; если не равно &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1(2)цикла </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GOTO &nbsp; &nbsp;TransmitBitDelay_1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; идем вычитать j &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 цикла </div><div class="code_line">;-----------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; итого i*(5*j-1) циклов</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">;--------------------------------------------этот код выполняется i раз----------------------------------------</div><div class="code_line">;-------------------есть тонкость, команда BTFSС i-1 раз выполняется за 2 цикла и 1 раз за 1 цикл--------------</div><div class="code_line">; ------------------а команда &nbsp;GOTO &nbsp; &nbsp;TransmitBitDelay_4 &nbsp; выполнится всего один раз-------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DECF &nbsp; &nbsp;i,1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; а если равно вычитаем из i &nbsp;1 &nbsp; &nbsp;1 цикл</div><div class="code_line">TransmitBitDelay_0:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVF &nbsp; &nbsp;i,1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;(i==0)? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 цикл</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;BTFSC &nbsp; _A_STATUS,2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;если равно &nbsp;заканчиваем ф-ю &nbsp; &nbsp; &nbsp; 1(2)цикла </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GOTO &nbsp; &nbsp;TransmitBitDelay_4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;на завершение ф-и &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 цикла</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVLW &nbsp; 10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;если не равно W=10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 цикл &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MOVWF &nbsp; j &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;j=W (j=10) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 цикл</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GOTO &nbsp; &nbsp;TransmitBitDelay_2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;идем разбираться с j &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2 цикла </div><div class="code_line">;----------------------------------------------------------------------------------------------------------------- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;итого 8*i+1 циклов</div><div class="code_line">; &nbsp; &nbsp;16 }</div><div class="code_line">;----------------------------------и этот код 1 выполняется 1 раз-----------------------------------------------</div><div class="code_line">TransmitBitDelay_4:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;RETURN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; возврат в основную прогу &nbsp; &nbsp; &nbsp; &nbsp; 2 цикла</div><div class="code_line">;------------------------------------------------------------------------------------------------------------</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; получаем всего циклов i*(5*j + 7)+9 циклов. Один цикл при твоем кварце 2MHz=2000000Hz</div><div class="code_line">допустим нам надо работать со частотой 9600Hz, решаем уравнение</div><div class="code_line">9600=2000000/(i*(5*j+7)+9)</div><div class="code_line">мы видим, что оно имеет множество решений, но нам нужны целые, или максимально приближенные к целым, решается оно методом подбора</div><div class="code_line">P.S.проверь правильность моих вычислений, а то я мог где то ошибитьсяJ</div></ol></div></div></div></div>]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332452</guid>
        <pubDate>Tue, 06 Apr 2004 06:50:18 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332452</link>
        <description><![CDATA[potor: сейчас, разбирусь с тем, что он накомпилил, и расскажу:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332451</guid>
        <pubDate>Tue, 06 Apr 2004 06:45:32 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332451</link>
        <description><![CDATA[bizar: Ну вот всё готово.<br>Что там на счёт чисел?]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332446</guid>
        <pubDate>Tue, 06 Apr 2004 06:37:15 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332446</link>
        <description><![CDATA[potor: int занимает 2 байта, char 1 байт, контроллер восьмиразрядный, т е вся арифметика побайтовая, и если использовать тип int получается больше по коду, в твоем случае рационально использовать unsignrd char <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-04-06T06:38:22+00:00">06.04.04, 06:38</time></strong>:</span></span><br>
я тебе уже раньше писал, что int надо использовать по возможности реже]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332444</guid>
        <pubDate>Tue, 06 Apr 2004 06:32:52 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332444</link>
        <description><![CDATA[bizar: Кстати я там поменял:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">void TransmitBitDelay(void)</div><div class="code_line">{</div><div class="code_line">int i,j</div><div class="code_line">for (i= число1; i!=0; i--) </div><div class="code_line">&nbsp;&nbsp;for (j= число2; j!=0; j--);</div><div class="code_line">}</div></ol></div></div></div></div><br>
А зачем <strong class='tag-b'>unsigned char</strong>?]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332413</guid>
        <pubDate>Tue, 06 Apr 2004 05:33:08 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332413</link>
        <description><![CDATA[potor: вот это больше на правду похоже, но извини, я опять намудрил:)<br>
переделай функцию вот так, а то компилятор много избыточного кода вставляет: <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">void TransmitBitDelay(void)</div><div class="code_line">{</div><div class="code_line">for (unsigned char i= число1; i!=0; i--) // здесь точка с запятой ненужна</div><div class="code_line">&nbsp;&nbsp;for (unsigned char j= число2; j!=0; j--);</div><div class="code_line">}</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-04-06T05:41:11+00:00">06.04.04, 05:41</time></strong>:</span></span><br>
ссори вот так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">void TransmitBitDelay(void)</div><div class="code_line">{</div><div class="code_line">unsigned char i,j</div><div class="code_line">for (i= число1; i!=0; i--) // здесь точка с запятой ненужна</div><div class="code_line">&nbsp;&nbsp;for (j= число2; j!=0; j--);</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332304</guid>
        <pubDate>Mon, 05 Apr 2004 19:45:43 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=332304</link>
        <description><![CDATA[potor: ok завтра на работе посмотрю:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331817</guid>
        <pubDate>Mon, 05 Apr 2004 09:08:26 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331817</link>
        <description><![CDATA[bizar: Млин откуда там точка с запятой взялась не понимаю<br>вроде всё правельно наберал.<br>Ну ладно вот без неё.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331715</guid>
        <pubDate>Mon, 05 Apr 2004 06:33:19 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331715</link>
        <description><![CDATA[potor: слуай, ты случайно в следующем коде точку с запятой после первого for не ставил???<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">void TransmitBitDelay(void)</div><div class="code_line">{</div><div class="code_line">for (int i= число1; i!=0; i--) // здесь точка с запятой ненужна</div><div class="code_line">&nbsp;&nbsp;for (int j= число2; j!=0; j--);</div><div class="code_line">}</div></ol></div></div></div></div><br>
если не ставил, значит оптимизатор что то намудрил, уменьши уровень оптимизации и вышли еще раз:) <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-04-05T06:44:19+00:00">05.04.04, 06:44</time></strong>:</span></span><br>
или попробуй вот так записать:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">void TransmitBitDelay(void)</div><div class="code_line">{</div><div class="code_line">for (int i= число1; i!=0; i--)</div><div class="code_line">&nbsp;&nbsp;{ </div><div class="code_line">&nbsp;&nbsp;for (int j= число2; j!=0; j--);</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331323</guid>
        <pubDate>Sun, 04 Apr 2004 07:30:53 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=331323</link>
        <description><![CDATA[bizar: Я всё довно понял, времени просто не было]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=329414</guid>
        <pubDate>Thu, 01 Apr 2004 12:38:05 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=329414</link>
        <description><![CDATA[potor: повторюсь:<br>вышли сюда ассемблерный код функции TransmitBitDelay, я тебе обьясню как вычислить эти числа]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=328983</guid>
        <pubDate>Thu, 01 Apr 2004 04:44:54 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=328983</link>
        <description><![CDATA[potor: неееет, зашить и проверить неполучится, сначала надо подобрать числа, т е десятки там не пройдут:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=328264</guid>
        <pubDate>Wed, 31 Mar 2004 05:25:48 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=328264</link>
        <description><![CDATA[bizar: Ok всё скомпелил без ошибок<br>теперь зашить и проверить.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327594</guid>
        <pubDate>Tue, 30 Mar 2004 11:19:38 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327594</link>
        <description><![CDATA[potor: после #include &lt;io16f84.h&gt;<br>вставь строчку<br>#define Bit(x) 1&lt;&lt;(x)<br>дело в том что команды Bit нет, это макрос который мы определяем сами]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327590</guid>
        <pubDate>Tue, 30 Mar 2004 11:12:16 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327590</link>
        <description><![CDATA[bizar: В нём ошибка:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if(Keys &amp; Bit(2))</div></ol></div></div></div></div><br>
Сдесь выдаёт ошибку.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327444</guid>
        <pubDate>Tue, 30 Mar 2004 08:30:35 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327444</link>
        <description><![CDATA[potor: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">main () {</div><div class="code_line">&nbsp;&nbsp; TRISB = 4|8; &nbsp;/* RB2 - RB3 настраиваем на вход */</div><div class="code_line">&nbsp;&nbsp; PORTB = 0xfc; /* RB0 - RB1 настраиваем на вывод*/</div><div class="code_line">&nbsp;&nbsp; while(1) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;do {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tick(); /* НЕБОЛЬШОЙ ПРОМЕЖУТОК ВРЕМЕНИ, &quot;не будем опрашивать кнопки слишком часто&quot; */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Keys = (~PORTB) &amp; (4|8); /* состояние кнопок на RB2-RB3. Ждёт нажатия */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;} while( Keys == 0 );</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if(Keys &amp; Bit(2)) &nbsp; /* если установлен бит 0, значит нажата кнопка на RB2 */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; TransmitByte(34); /* посылаем 34 */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if(Keys &amp; Bit(3)) &nbsp; /* если установлен бит 1, значит нажата кнопка на RB3 */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; TransmitByte(35); /* посылаем 35 */</div><div class="code_line">&nbsp;&nbsp; }</div><div class="code_line">}</div></ol></div></div></div></div><br>
этот код тебе писал ранее trainer:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327433</guid>
        <pubDate>Tue, 30 Mar 2004 08:12:47 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=327433</link>
        <description><![CDATA[bizar: Ещё остались ошибки.]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=326329</guid>
        <pubDate>Sun, 28 Mar 2004 17:01:38 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=326329</link>
        <description><![CDATA[potor: на будующее, в микроконтроллерных компиляторах, ввиду их недоделанности, следует обращать внимание на первую ошибку, остальные генерятся как правило от балды:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=326297</guid>
        <pubDate>Sun, 28 Mar 2004 15:59:04 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=326297</link>
        <description><![CDATA[potor: бл...<br>
unsigned char Keys<br>
:) <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-03-28T16:01:00+00:00">28.03.04, 16:01</time></strong>:</span></span><br>
точку с запятой незабудь поставить:)]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325983</guid>
        <pubDate>Sun, 28 Mar 2004 04:01:13 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325983</link>
        <description><![CDATA[bizar: <strong class='tag-b'>potor</strong>, я этим покозал что ошибок море,<br>
и не знаю как их исправить (уже всё перепробовал).]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325867</guid>
        <pubDate>Sat, 27 Mar 2004 20:38:35 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325867</link>
        <description><![CDATA[potor: в общем в моем IARe для AVR надо в режиме дебаггера сделать View/Disassembly, либо в Project/Options в закладке компилятора list ставишь галочку Assembler mnemonics, т е ты выслал не то, нужен ассемблерный код]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325503</guid>
        <pubDate>Sat, 27 Mar 2004 05:59:06 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=325503</link>
        <description><![CDATA[bizar: Думаю нужно начать всё сначало?]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324931</guid>
        <pubDate>Fri, 26 Mar 2004 09:21:16 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324931</link>
        <description><![CDATA[potor: ПОПРОБУЙ ТАК:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
void TransmitByte(char Symbol)<br>
{<br>
 unsigned int count = 8;// счетчик передаваемых бит данных<br>
 PORTA &amp;= 0xfe; //передаем стартовый бит<br>
 do<br>
   {<br>
    TransmitBitDelay(); // задержка перед передачей следующего бита<br>
    PORTA ^= (~Symbol) &amp; 1; // выдаем очередной бит в COM<br>
    Symbol &gt;&gt;= 1; //следующий бит<br>
    count--;<br>
   } while (count &gt;0);<br>
 TransmitBitDelay(); // задержка перед передачей следующего бита<br>
 PORTA |= 1; //передаем стоповый бит <br>
} <br>
</div></div><br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
unsignet char Keys;<br>
main ()<br>
       {<br>
 TRISB = 4|8;  /* RB2 - RB3 настраиваем на вход */<br>
 PORTB = 0xfc; /* RB0 - RB1 настраиваем на вывод*/<br>
 while(1) <br>
 {<br>
  do <br>
 {<br>
         tick(); /* НЕБОЛЬШОЙ ПРОМЕЖУТОК ВРЕМЕНИ, &quot;не будем опрашивать кнопки слишком часто&quot; */<br>
         Keys = (~PORTB) &amp; (4|8); /* состояние кнопок на RB2-RB3. Ждёт нажатия */<br>
 } <br>
 Keys &gt;&gt;= 1;<br>
 while(PORTB &amp; Bit(0)); /* если установлен бит 0, значит нажата кнопка на RB2 */<br>
 while(1)<br>
  {<br>
  void TransmitByte(34) /* посылаем 34 */<br>
  }<br>
 while(PORTB &amp; Bit(1)); /* если установлен бит 1, значит нажата кнопка на RB3 */<br>
 while(1)<br>
  {<br>
  void TransmitByte(35) /* посылаем 35 */<br>
  }<br>
 }<br>
 }<br>
</div></div>]]></description>
        <author>potor</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324930</guid>
        <pubDate>Fri, 26 Mar 2004 09:20:24 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324930</link>
        <description><![CDATA[trainer: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><strong class='tag-b'>bizar</strong>, 26.03.04, 11:38<br>
  do <br>
 {<br>
         tick(); /* НЕБОЛЬШОЙ ПРОМЕЖУТОК ВРЕМЕНИ, &quot;не будем опрашивать кнопки слишком часто&quot; */<br>
         Keys = (~PORTB) &amp; (4|8); /* состояние кнопок на RB2-RB3. Ждёт нажатия */<br>
 } <br>
 Keys &gt;&gt;= 1;<br>
 while(PORTB &amp; Bit(0)); /* если установлен бит 0, значит нажата кнопка на RB2 */<br>
 </div></div>Для do нет соответствующего while. Или Keys &gt;&gt;= 1; стоит не там, где нужно]]></description>
        <author>trainer</author>
        <category>Микроконтроллеры</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324928</guid>
        <pubDate>Fri, 26 Mar 2004 09:12:01 +0000</pubDate>
        <title>Разбираемся с IAR</title>
        <link>https://forum.sources.ru/index.php?showtopic=42431&amp;view=findpost&amp;p=324928</link>
        <description><![CDATA[bizar: <strong class='tag-b'>potor</strong>, в тех местах так ошибки и остались<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Rebuilding target Debug...</div><div class="code_line">Untitled1.c</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (21) : Error[Pe268]: declaration may not appear after executable statement in block</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (43) : Error[Pe268]: declaration may not appear after executable statement in block</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (45) : Error[Pe112]: expected &quot;while&quot;</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (46) : Warning[Pe223]: function declared implicitly</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (49) : Error[Pe079]: expected a type specifier</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (50) : Error[Pe065]: expected a &quot;;&quot;</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (51) : Warning[Pe128]: loop is not reachable from preceding code</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (54) : Error[Pe079]: expected a type specifier</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (55) : Error[Pe065]: expected a &quot;;&quot;</div><div class="code_line">C:\Documents and Settings\Administrator\My Documents\IAR проект\Новая папка\Untitled1.c (57) : Warning[Pe001]: last line of file ends without a newline</div><div class="code_line">&nbsp;</div><div class="code_line">Total number of errors: 7</div><div class="code_line">Total number of warnings: 3</div></ol></div></div></div></div>]]></description>
        <author>bizar</author>
        <category>Микроконтроллеры</category>
      </item>
	
      </channel>
      </rss>
	