Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Arduino UNO simulation development environment set up and run simulation     - Windows using SSH management Ubuntu (Linux)

- shell script: LVS start simple script (Server)

- CentOS6 install Redis (Database)

- Red Hat Enterprise Linux 6.4 Configuring VNC Remote Desktop login access (Linux)

- Based LNMP + uWSGI deploy Django applications (Server)

- MariaDB phpMyAdmin installation and configuration issues to resolve under CentOS7 (Database)

- How to add two-factor authentication for Linux systems SSH (Linux)

- FileZilla install on Ubuntu 14.10 (Linux)

- How MAT Android application memory leak analysis (Programming)

- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)

- Mount NFS network file system (Linux)

- AWR Report (Database)

- Install OpenGL development environment in Fedora and Ubuntu (Linux)

- Getting Started with Linux: Nginx Web Server How to Block Specific User Agents (UA) (Server)

- bash login and welcome message: / etc / issue, / etc / motd (Linux)

- Java development specifications summary (Programming)

- Formatting Java floating-point types (Programming)

- Linux Tutorial: Open multiple tabs in the GNOME terminal in Ubuntu 15.04 (Linux)

- Zabbix using Omsa monitor hardware information of Dell server (Server)

- Linux system security (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.
- Git remote repository Explanation (Linux)
- To install the Git and Github under Ubuntu (Linux)
- Graphic Git (Linux)
- GitLab Guide installation under Ubuntu 14.04 (Server)
- Linux Getting Started tutorial: Borrow Windows fonts in Ubuntu 14.10 (Linux)
- Python function arguments * args and ** kwargs usage (Programming)
- Define and modify strings principle in Python (Programming)
- Linux common network tools: batch scanning of hosting services netcat (Linux)
- Java Prototype Pattern (Programming)
- Oracle Database Performance Optimization of memory disk (Database)
- About Samba certification process and permissions (Linux)
- To use Android RecyclerView (Programming)
- Oracle PL / SQL based cursor (Database)
- Tomcat configuration memory and remote debug port (Server)
- Configuring Eclipse Note Templates (Linux)
- How to disable UEFI to install Linux on Win8 (Linux)
- Everyone should know something about TCP (Linux)
- Sublime Text 3 best features, plug-ins and settings (Linux)
- Zombie process under Linux (Linux)
- php performance monitoring module XHProf (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.