AVR programming language Arduino can be simulated and debugged with Proteus

Publisher:馥睿堂Latest update time:2014-02-19 Source: 电源网Keywords:AVR  Arduino  Proteus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Connect a potentiometer to the analog interface 0 of the Arduino  168 Duemilanove 2009ATMEGA168P controller, and connect an LED to the digital interface 13 of the controller. When the potentiometer slides and the voltage exceeds 2.5V, the LED lights up, otherwise it goes out. The AD conversion of the ATMEGA168P controller is a 10-bit converter. The digital value corresponding to 5V is 1024, and 2.5V should be 512. Therefore, once the microcontroller knows that the digital value after AD conversion exceeds 512, the variable ledpin of the LED of digital interface 13 is HIGH.

Here is the Arduino program:

Press the "triangle" icon and press Shift at the same time, and you can see where the HEX of the 0018 version of the Arduino programming software has gone. Look at the compilation result area in the figure above, the part I shaded, and you can see the directory where the HEX is hidden. Put the HEX file into the ATMEGA168 microcontroller of Proteus, press the run button in Proteus , and you can see that the combination of Arduino and Proteus has achieved the task requirements. You can learn it without spending a penny. It is an avr programming software highly praised by foreign robot enthusiasts.

Note the correspondence between the Arduino controller digital and analog interface numbers and the AVR microcontroller pins.

Keywords:AVR  Arduino  Proteus Reference address:AVR programming language Arduino can be simulated and debugged with Proteus

Previous article:How to ensure LTE voice quality? Three tricks to complete VoLTE testing!
Next article:Research on Low Frequency Signal Simulation of AT89S51 Single Chip Microcomputer

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号