1
\$\begingroup\$

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?

\$\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\$
    – rioraxe
    Commented Feb 22, 2015 at 20:58

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\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\$
    – arc_lupus
    Commented Feb 24, 2015 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.