I wanted to start a bit µC development with the Atmel Studio 6.2, and therefore my first step was to compile a small program for simply switching a pin from HIGH to LOW and back all the time. I took the source code from here: http://jaxcoder.com/Projects.aspx?id=788781549. Everything compiles well, but when I run it and want to watch the IO-ports in the simulator (IO-view), the PORTD does not change (but it should). So, am I using the wrong view to take a look at the IO-ports, or am I doing something else wrong?
\$\begingroup\$
\$\endgroup\$
1
-
\$\begingroup\$ Are you trying to monitor the IO-view while the program is running? I believe the IO-view only updates in pause mode, the program needs to be stopped by a break point, for example. \$\endgroup\$– rioraxeCommented Feb 22, 2015 at 20:58
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
1
The _delay_ms method in debug mode takes a LONG time to run and you may not be waiting long enough for it to complete if you have compiled in debug mode. As the OP has said you also need to be at a break point or single stepping through the code to see the change. Since it's such a simple program just attach an LED and run it.
-
\$\begingroup\$ The problem is that I have no dev board here, my first step should be to test the program in a simulator, and afterwards run it live. \$\endgroup\$ Commented Feb 24, 2015 at 12:47