Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Arduino UNO simulation development environment set up and run simulation     - Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)

- Httpclient4.4 of principle (Http execution context) (Programming)

- How to configure FirewallD in RHEL / CentOS 7 and Fedora in (Linux)

- Memcached installation, configuration and monitoring (Server)

- Implement binary search algorithm in C language (Programming)

- Using Android Studio integrated development environment to build Android (Linux)

- PostgreSQL-XL installation and deployment (Database)

- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)

- Cool Android realization SVG animation (Programming)

- shell script error dirname: invalid option - b (Database)

- Analysis of memory mapping process in Linux x86-64 mode (Linux)

- Easy to install CentOS 6.6 desktop environment (Linux)

- How to use jgit to manage Git submodule (Linux)

- Analyzing Linux server architecture is 32-bit / 64-bit (Server)

- Linux system crash (no such file or directory) How to rescue database (Linux)

- Ubuntu system cp: omitting directory problem (Linux)

- How to Install Telegram instant messaging software on Ubuntu (Linux)

- Hyper-V virtual hard disk how to copy files to and attached to the virtual machine (Linux)

- Help you make Git Bisect (Linux)

- 10 really interesting Linux command (Linux)

  Arduino UNO simulation development environment set up and run simulation
  Add Date : 2017-01-08      
  A. Proteus Simulation Platform Introduction

Proteus is EDA software tools published by the British Labcenter electronics company (the software distributor in China for the Guangzhou Electronic Technology Co., Ltd. Weathervane). Not only does it have other EDA software tool simulation capabilities, but also simulation microcontroller and peripheral devices. It is the best simulation tool microcontroller and peripheral devices. Has been especially favored electronic SCM lovers, teachers teaching in the SCM, SCM is committed to development and application of science and technology workers. As previously EWB simulation software only digital and analog circuits, can not be simulated CPU and procedures.

There are currently online Proteus 7.8 SP2,7.10 SP0,8.0 several versions, these versions are more stable JM. These versions of the component model format is compatible, DSN file simulation principle is the same. Version 8.0 is the DSN schematics, software editing environment and compiler integrated into a project file, to become a like a "fool cameras" the same thing, but for beginners Proteus's more convenient, because has been integrated within the program editor and downloadable different compilers.

7.xx version, DSN simulation schematic editor and compiler of the three are independent. The 8.0 version is integrated. Version 8.0 in a multi-CPU simulation is not easy to set up; integrated software after a bit large, it is better 7.xx version concise.

B. Development Trilogy


Users choose their own favorite editor (such as Notepad ++, Utraedit, Source Insight, vim, slickedit, notepad, etc.), use this to write source.

C / C ++ compiler

Executable models target users according to CPU choose your favorite C / C ++ compiler (such as Winavr, CodeSourcery, Keil, IAR, WinARM, Watcom, etc.), in general the compiler can generate standard .hex, and .elf format file. Arduino IDE is actually used Winavr of gcc. With this the first step to write the source code and compiled into .hex .elf files.

Hardware simulation Figure

Proteus under the element in the Model simulation libraries, users use these elements simulation, design their own hardware simulation schematic, also known .dsn file. In Proteus environment, using their own design .dsn file, load the second step generate .hex or .elf file in the CPU, you can run the simulation. .elf internal file contains debug information, you can single-step, set breakpoints debugger.

C. Arduino UNO hardware simulation schematic

The circuit simulation (under HW catalog Arduino UNO.dsn files) can emulate Arduino Diecimila, or Arduino UNO board. The former uses as the FT232 chip serial communication module, are used after ATMEGA16U2 microprocessor instead FT232, which are implemented on a USB asynchronous serial communication function. In our simulation, using the Proteus Serial port physical interface model COMPIM, COMPIM can replace the function of serial communication, which implements the physical connection with the actual PC, RS232 serial interface, so that the virtual world and the real simulation the world is connected.

Adds two serial communication virtual terminal VT1 and VT2, for debugging serial communication receive data or send data to use. The other for Arduino Diecimila or UNO circuit simulation, detailed labeling of the pin names, and achieve the same circuit board. With Proteus simulation tools can double-click to open the Arduino Arduino UNO.dsn circuit simulation.

D. Arduino development software download and set up

1. Download and install Arduino integrated development environment (Arduino IDE)

To the official website to download and install Arduino IDE, currently the latest stable version is 1.0.6 version.



2. Select the Arduino board type and serial port

Simulation, select the first two boards are in connection with the actual Arduino board, select the corresponding plate, and select the corresponding serial port.

*** As used herein, Arduino because simulation development methods, circuit simulation, simply select the target executable file .hex .elf or equivalent document loader, so do the serial port loader.

Select the board model

3. Set the Arduino IDE personal preferences (important)

Select File-> Preferences

Set preferences find the file preferences.txt

Open the Preferences file with an editor preferences.txt

[1] Found preferences.txt file arduino tool File-> preferences, and use Notepad to open.

[2] In the last of his party preferences.txt document editing added build.path = d: \ MyHexDir, set their own directory name. For easy observation, (I am setting is build.path = d: ### ArduinoDbgDir).

[3] to close the Arduino IDE;

[4] After saving preferences.txt;

Do not change the order of the above. This allows the Arduino compile time, see d: destination file \ MyHexDir target under, and are not automatically deleted.

4. Compile

(1) Double-click the SW \ source files Blink.ino Blink directory, automatically open the Arduino IDE.

(2) Click Sketch-> Verify / Compile compiled object files, object files in the d: \ MyHexDir under (in my d: ### ArduinoDbgDir directory).

(3) Click CP.bat, and .elf will .hex file replication updates to the current .ino directory. You can edit your CP.bat file, change directories.

(4) provided in Proteus in good time or .elf .hex file location can later update or .elf .hex file is automatically considered to have been loaded to date.

V. The first Hello World program simulation run

Hello World program is on the computer screen displays "Hello, World!" Is a program in the embedded system development, LED blinking program is Hello World program, Hello World program is very simple, it is generally in the new development programmer environment first program to be run, simple but not simple.

Although very simple Hello World program, but for this simple program can run, the need for development tool chain selection, configuration development tool chain, which requires a lot of tedious work to do. Hello World program can run, you can verify your compiler and development environment, the operating environment is correct.

The first program Blink.ino as follows:
/// 0. Pin Definitions
#define LED_PIN 13 // define the LED pin is the 13th data pin (DIG13)

/// 1. Initialization
void setup () {
  pinMode (LED_PIN, OUTPUT); // initialize DIG13 output

/// 2 cycles
void loop () {
      digitalWrite (LED_PIN, HIGH); // DIG13 output high
      delay (1000); // 1 second delay
      digitalWrite (LED_PIN, LOW); // DIG13 output low
      delay (1000); // 1 second delay

(1) opened with Arduino IDE Blink.ino, compile it;
 (2) in d: \ will generate .hex file and wait for the next MyHexDir .elf directory;
 (3) Click .ino directory under CP.bat, catalog and more than two files .hex .elf;
 (4) opened with Proteus HW \ Arduino UNO.dsn, double-click Atmga 328P microprocessor, select the upper SW \ Blink \ Blink.hex file or files in the Program file Blink.elf item, if loaded Blink.elf file, You can set breakpoints or single-step debugging;
 (5) Click the bottom left corner to run the simulation in Proteus, if Fig. 1 small LED light is blinking, run your simulation environment is set up correctly.
- Java Set and List in the relationship and difference (Programming)
- CentOS7 install MySQL 5.5 (Database)
- Oracle 12C with multi-column index (Database)
- Redhat Close SELinux correct step (Linux)
- CentOS 6.5 opens the Xmanager Remote Desktop login (Linux)
- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)
- Using IPFilter bridge filter in the FreeBSD system (Linux)
- Linux script commands - terminal recorder (Linux)
- Docker startups use continuous integration deployment (Server)
- How to install the NVIDIA 358.16 driver in Ubuntu 15.10,14.04 (Linux)
- GRUB and Linux system repair (Linux)
- The first deployment of cross-platform operation Rafy record (Server)
- Servlet life cycle works (Programming)
- Linux, C programming language library file handling and preparation of Makefile (Programming)
- Thinking in Java study notes - Access modifiers (Programming)
- Java implementation linear table - represents the order of representation and chain (Programming)
- How to fix fatal error: security / pam_modules.h: No such file or directory (Linux)
- TCP protocol flaw incomplete records (Linux)
- How to create a bootable USB disk to use MultiSystem on Ubuntu (Linux)
- Java Adapter Mode (Programming)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.