ru:examples:setup:windows
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ru:examples:setup:windows [2010/09/13 16:26] – created eduardtlmk | ru:examples:setup:windows [2020/07/20 12:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | this section contains the information necessary to install AVR development software on Windows operating system. | + | NB! Руководство по установки новой версии (ATmega2561) находится [[et: |
| - | ===== Installation ===== | + | В ниже приведенном руководстве описывается установка среды разработки AVR для операционной системы Windows, используя платформу разработки AVR Studio-t. |
| - | You need the following software which can be downloaded from manufacturers homepage or acquired from the CD supplied with the HomeLab kit. | + | ===== Установка программного обеспечения ===== |
| + | |||
| + | Перед установкой программного обеспечения необходимо добыть | ||
| **1. AVR Studio** | **1. AVR Studio** | ||
| - | AVR Studio 4 IDE (// | + | AVR Studio 4 IDE (inglise keeles |
| **2. WinAVR** | **2. WinAVR** | ||
| - | WinAVR | + | WinAVR |
| C:\WinAVR | C:\WinAVR | ||
| - | **3. HomeLab library** | + | **3. Библиотека Домашней Лаборатории** |
| - | HomeLab library is a set of functions designed for HomeLab kit and AVR controllers. By using the library the programming is much easier and effective. Latest version of the library can be downloaded from the HomeLab webpage. This library should be installed in the same folder where WinAVR | + | Библиотека Домашней Лаборатории содержит функции, |
| - | **4.. Virtual | + | **4. Драйвер виртуального |
| - | Driver enables to connect USB JTAG-ICE programmer with your PC. Driver have to be installed before connecting the programmer. Driver file name is "CDM x.xx.xx.exe", where " | + | Драйвер позволяет подключить к компьютеру программатор |
| - | {{ : | + | {{ : |
| - | According to number of virtual ports previously defined on the particular computer the windows assigns next port number for the new device. New COM port name (range number) is generated if the device is plugged in to the same computer using another | + | В зависимости от того, сколько виртуальных последовательных портов на вашем компьютере уже установлено и введено в эксплуатацию, |
| + | [[et: | ||
| - | ===== Creating new project | + | ===== Создание проекта |
| - | In order to write a program for the controller you need to create the project space. The project includes typically different files like source codes, header files, compiled program files, etc. It is strongly advised to create new folder for every project | + | Для написания AVR программы, необходимо создать новый проект, который обычно включает в себя много различных файлов: |
| - | Following steps have to be completed when creating new project with the help of wizard. | + | Для создания проекта необходимо пройти следующие этапы: |
| - | **1.** | + | **1.** |
| {{ : | {{ : | ||
| - | **2.** | + | **2.** |
| - | NB! If AVR GCC is missing on the compiler list, it is not properly installed. In that case the WinAVR | + | NB! Если при выборе компилятора отсутствует |
| {{ : | {{ : | ||
| - | **3.** | + | **3.** |
| {{ : | {{ : | ||
| - | **4.** | + | **4.** |
| {{ : | {{ : | ||
| - | **5.** | + | < |
| + | |||
| + | **5.** | ||
| {{ : | {{ : | ||
| - | **6.** | + | **6.** |
| {{ : | {{ : | ||
| - | If object | + | Если объект |
| - | ===== Setting' | + | < |
| - | After set up of the development environment it is wise to test it, for ensuring its correctness. Simplest way is to write a short program, compile it and upload to controller. | + | ===== Тестирование установки ===== |
| - | **1.** Connect the programmer with ATmega128 board. Be sure that the programmer is correctly connected to JTAG connector (cable is directed away from controller board- see next picture). Connect the controller board supply (small green LED should light up if correct power supply is connected). | + | После установки среды разработки в первый раз желательно проверить, |
| - | Insert simple C source code: | + | **1.** 1. Подключите программатор с платой ATmega128. При подключении проверьте, |
| <code c> | <code c> | ||
| Line 77: | Line 82: | ||
| int main(void) | int main(void) | ||
| { | { | ||
| - | // Pin PB7 to output | + | // Настройка вывода |
| DDRB = 0x80; | DDRB = 0x80; | ||
| - | // Endless cycle | + | // Бесконечный цикл |
| while (true) | while (true) | ||
| { | { | ||
| - | // Pin PB7 invertion | + | // Инвертирование вывода |
| PORTB ^= 0x80; | PORTB ^= 0x80; | ||
| hw_delay_ms(500); | hw_delay_ms(500); | ||
| Line 90: | Line 95: | ||
| </ | </ | ||
| - | [{{ : | + | [{{ : |
| - | Compile the project with // | + | Скомпилировать программу приказом |
| - | < | ||
| Build succeeded with 0 Warnings... | Build succeeded with 0 Warnings... | ||
| - | </ | ||
| - | **2.** | + | < |
| + | |||
| + | **2.** | ||
| {{ : | {{ : | ||
| - | If the described window does not open and // | + | Если приведенное выше окно не открывается и появляется окно |
| {{ : | {{ : | ||
| - | **3.** | + | **3.** |
| OK | OK | ||
| Line 118: | Line 123: | ||
| Leaving programming mode.. OK | Leaving programming mode.. OK | ||
| - | According to the program the on-board LED (PB7) should start flashing. If the program works you have successfully set up your programming environment and completed your first program. Congratulations! | + | Под влиянием программы на плате контроллера должен периодически загораться и гаснуть индикатор состояния |
| - | {{: | + | {{: |
| - | ===== Debugger | + | ===== Использование отладчик |
| - | [{{ : | + | [{{ : |
| - | Debugging a program means searching errors from the program. For that programs called debuggers are created, they allow to execute the program step by step and stopping it where it is needed. | + | Отладкой программы (на английском языке // |
| - | + | ||
| - | To start the program in debugging mode with the AVR Studio, firstly it should be compiled by pressing button | + | Для запуска программы с AVR Studio |
| + | ===== Использование чисел с плавающей запятой ===== | ||
| - | ===== The usage of floating-point variables ===== | + | Иногда возникает необходимость в программе AVR использовать чисел с плавающей запятой. Для их вычисления и представления функцией //printf// типа необходимо в настройках проекта сделать следующие изменения: |
| - | Some times in AVR program it is necessary to use floating-point variables. For calculating with them and presenting with // | ||
| - | **1.** | + | **1.** |
| - | **2.** | + | **2.** |
| - | **3.** | + | **3.** |
ru/examples/setup/windows.1284384391.txt.gz · Last modified: (external edit)
