Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Arduino UNO simulation development environment set up and run simulation     - Linux Operating System Security Study (Linux)

- xCAT deployment (Linux)

- 10 tips daily Docker (Server)

- PHP call a Python program (Programming)

- MariaDB 10 Multi-source replication (Database)

- Linux commands with browsing and downloading files (Linux)

- Spring Boot + Nginx + Tomcat + SSL configuration notes (Server)

- Selection sort, insertion sort, and Shell sort (Programming)

- Postfix mail service system principle and configuration (Linux)

- File sharing and fork function (Programming)

- How to publish projects to the Jcenter repository using Gradle in Android Studio (Programming)

- Sshuttle A VPN-based transparent proxy that uses ssh (Server)

- MySQL flip-flop (Database)

- C # and JavaScript arrays to re-summary (Programming)

- VirtualBox install Windows 8.1 has encountered an error 0x000000C4 solutions (Linux)

- Use install_updates upgrade GAMIT / GLOBK (Linux)

- Linux System Getting Started Tutorial: mounted directly in Linux LVM partition (Linux)

- Python Django direct implementation of sql statement (Programming)

- The new features of MySQL 5.7 Generated Column (index function) (Database)

- Make command tutorial (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.
- Linux environment to build next Cocos2dx-3.3.1 (Linux)
- Oracle VirtualBox Problem Solving Case (Linux)
- Chkconfig command Detailed service is added and shut down the system in two ways to start service under Linux (Linux)
- Ubuntu users to install Gnome-Pie 0.6.5 (Linux)
- Use C program in JavaScript (Programming)
- CentOS 6.5 / 6.6 modify the default SSH port number (Linux)
- Tsung first test installation (Linux)
- Let Mac OS X dedicated high-speed mobile hard disk can also be read in Linux (Linux)
- How to Install lightweight Budgie desktop on Ubuntu 14.04 (v8) (Linux)
- OS X CAOpenGLLayer how to enable OpenGL 3.2 core profile (Programming)
- Large computer network security policy Experience (Linux)
- wget command Walkthrough (Linux)
- zBackup: A versatile tool to remove duplicate backup (Linux)
- Oracle TDE transparent data encryption (Database)
- Configuring ftp server and nfs server under Linux (Server)
- Difference Docker mirror and containers (Server)
- 11 examples in Linux df command (Linux)
- Binding multiple network cards in Linux using command nmcli (Linux)
- Security implementation of disk data protection under Linux (Linux)
- Chkconfig set boot start under Linux (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.