Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Arduino UNO simulation development environment set up and run simulation     - Nginx configuration support f4v video format player (Server)

- Java call by value and by reference (Programming)

- awk Programming Model (Programming)

- Apache Spark1.1.0 deployment and development environment to build (Server)

- Java polymorphism and exception handling (Programming)

- CentOS6 MongoDB connection solution can not break 1000 (Database)

- Nonstandard IMP-00010 error processing one case (Database)

- Difference Redhat5 and 6 YUM source configuration (Linux)

- Linux common network tools: hping Advanced Host Scan (Linux)

- Use the dd command to the hard disk I / O performance test (Linux)

- Unix / Linux commonly used to clean up disk space command (Linux)

- Vim (Linux)

- Partition and file system under Linux (Linux)

- Redis-- persistence articles (Database)

- Linux System Getting Started Learning: the curl set custom HTTP header (Linux)

- VMware clone Linux find eth0 (Linux)

- Use Tails 1.4 Linux system to protect the privacy and anonymity (Linux)

- Grub2 Boots the openSUSE installation image (Linux)

- Ubuntu Learning Advanced article - to teach you to further enhance system security (Linux)

- The YUM package management under Linux (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.
- JDK tools jstat (Linux)
- CentOS 6.6 install rsync server (Server)
- Installation and management of Linux applications (Linux)
- Linux LVM Logical Volume Management to resize partitions (Linux)
- Hard disk encryption to protect data security (Linux)
- Update GAMIT10.6 command (Linux)
- Oracle table compression Technology Introduction (Database)
- Linux shell string interception and stitching (Linux)
- Oracle archive log full cause abnormal slow database performance (Database)
- Linux terminal program running in the background (Linux)
- Linux linux system security (Linux)
- Mysql binlog resolve the garbage problem decryption (Database)
- Nginx version of helloworld (Server)
- Necessity in Java packages (Programming)
- MySQL + Heartbeat + DRBD deployment architecture (Server)
- Ubuntu prompt / lack of boot space solutions (Linux)
- Linux Nginx installation and configuration instructions (Server)
- Generated characters using Java Videos (Programming)
- Installation and use the telnet command under CentOS 6.x (Linux)
- Linux administrator should command: sed and awk (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.