Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Digital Pins Debug Window (Read 3058 times)
Scotty
Newbies
*
Offline


Posts: 8
Joined: Oct 7th, 2015
Digital Pins Debug Window
Dec 26th, 2015 at 3:22am
Print Post  
Hi there,

I have just updated to the latest version of Visual Micro 1512.23.1 in VS2015.  I created a new Ardunio project in VS2015 and entered the following code int he ino file:



int ledPin = 13;                 // LED connected to digital pin 13

void setup()
{
     pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()
{
     digitalWrite(ledPin, HIGH);   // sets the LED on
     delay(1000);                  // waits for a second
     digitalWrite(ledPin, LOW);    // sets the LED off
     delay(1000);                  // waits for a second
}



In the project properties I have the following items set to true:
- Report Analogs
- Report Digitals
- Report Free Memory

When I debug and upload the debug windows show as expected, and the Digital Pins window shows with the following values:
Red: 0,1,10,13,14,15
Green: 2,3,4,5,6,7,8,9,11,12

But nothing changes.  I would expect to see pin 13 change from red to green as the pin is set to High and Low in the above code.

Why is it that this does not happen?

Regards,

Scott
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digital Pins Debug Window
Reply #1 - Dec 26th, 2015 at 4:03am
Print Post  
Hi,

The auto report runs once each time the loop() is reached. Your example would work if you used a global to determine the state so that each iteration of the loop switch on or off but not both

It's also valid to change pins at any time so there is additional breakpoint WhenHit/expression syntax that you can use to force a refresh of the pins:-

{@ReportDigital}

Other settings are documented here:-
http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-With-Breakpoints-Whe...

If you have not defined a pinMode for a pin then it will be classed as floating by the arduino and it will give different readings at different times. 13 defaults to output.

  
Back to top
IP Logged
 
Scotty
Newbies
*
Offline


Posts: 8
Joined: Oct 7th, 2015
Re: Digital Pins Debug Window
Reply #2 - Dec 26th, 2015 at 4:59am
Print Post  
Tim,

Outstanding service mate to get a response to close to Christmas!!

{@ReportDigital} worked a treat thanks mate.

Regards,

Scott
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint