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 window not updating when pins change (Read 6366 times)
David Wood
Newbies
*
Offline


Posts: 7
Joined: Jun 2nd, 2014
Digital Pins window not updating when pins change
Jan 22nd, 2015 at 1:26am
Print Post  
I wrote a simple sketch and uploaded it to an UNO using Visual Studio 2013 with the registered version of Visual Micro installed.  The sketch looks like this:

void setup()
{
     pinMode(7, OUTPUT);
     pinMode(8, OUTPUT);
     pinMode(9, OUTPUT);
     pinMode(10, OUTPUT);
     pinMode(11, OUTPUT);
     pinMode(12, OUTPUT);

}

void loop()
{
     digitalWrite(7, HIGH);
     digitalWrite(7, LOW);
     digitalWrite(8, HIGH);
     digitalWrite(8, LOW);
     digitalWrite(9, HIGH);
     digitalWrite(9, LOW);
     digitalWrite(10, HIGH);
     digitalWrite(10, LOW);
           
}

There is a breakpoint on each digitalWrite statement.  I have the Digital Pins window open, when I step between each breakpoint I do not see any change to the pins (not turning red to green or vice-versa).  The stepping works but no pin changes are reflected.   Am I doing something wrong?  Thank you in advance for your help and a great product!

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digital Pins window not updating when pins change
Reply #1 - Jan 22nd, 2015 at 3:13am
Print Post  
Hi David,

Thanks for the message.

If you are using the automatic digital report then it is updated at the start of the loop(). Your code has set the pins HIGH and then LOW again before it reaches the end of the loop()

An alternative is to switch off the digital report project property and use one of the break-point 'when hit' special {variables}. I think the one you need is:-
 
{@ReportDigital}

Using the special variable names in the code to force a refresh allows you to use breakpoints in more intelligent locations than simply one at the start of the loop.

I recommend switching off the project property because the digital reports are quite large and some pc's struggle with the volumn of data during debug. If you are using breakpoints that pause then this might not be an issue and both systems can be used together. 

By the way you can also use std expressions in watch statements which can be useful to monitor just one or two pins. Example of a "when hit" that watches pins 13 and 3 + get a digi report

{digitalRead(13)}{digitalRead(3)}{@ReportDigital}

If you use then when hit message to watch variables then remember to un-tick continue execution if you still want the breakpoint to break.

Another way to use the when hit is to make useful messages. In this example an output message is printed but the digiReport is displayed in the digital pins viewer.

Code
Select All
The lights are : {digitalRead(13)}, Button pressed: {digitalRead(3)}{@ReportDigital} 

« Last Edit: Jan 22nd, 2015 at 5:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
David Wood
Newbies
*
Offline


Posts: 7
Joined: Jun 2nd, 2014
Re: Digital Pins window not updating when pins change
Reply #2 - Jan 22nd, 2015 at 5:30pm
Print Post  
Thank you very much Tim!

I now understand how to use the Digital Pins window.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digital Pins window not updating when pins change
Reply #3 - Jan 22nd, 2015 at 5:43pm
Print Post  
Great thanks for the update, we will try to improve the docs

Don't forget that VS stores break-point info in the solution and not with the project. I find that quite annoying. We must save your solution when closing and for "peace of mind" after making significant changes to break-point settings.
« Last Edit: Jan 22nd, 2015 at 5:44pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
SnipeHunter
Newbies
*
Offline


Posts: 2
Joined: Jan 26th, 2015
Re: Digital Pins window not updating when pins change
Reply #4 - Jan 27th, 2015 at 1:13am
Print Post  
Hi Tim,

I tried implementing the Digital Pins Visualization by setting breakpoints and using "When Hit" as you suggested with {@ReportDigital} but all I am getting is an empty window (no green or red boxes).

Attached you can find a screenshot of the simple recipe I used to test it (the testing was done on the UNO board).  

Is the Digital Pins Visualization working on the UNO board?  If yes, do you have any suggestions on what may be the cause for this issue?

Thanks,
Snipe
« Last Edit: Jan 27th, 2015 at 1:51am by SnipeHunter »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Digital Pins window not updating when pins change
Reply #5 - Jan 29th, 2015 at 12:50pm
Print Post  
Hi,

The version of Visual Micro in the Atmel Gallery from 10th dec 2014 has a bug. 

Please upgrade to the latest release via visualmicro.com and always worth keeping an eye on the Release History. This was fixed 20th dec and we hope to push a new gallery version shortly.

Thanks
  
Back to top
WWW  
IP Logged
 
SnipeHunter
Newbies
*
Offline


Posts: 2
Joined: Jan 26th, 2015
Re: Digital Pins window not updating when pins change
Reply #6 - Jan 30th, 2015 at 12:41am
Print Post  
Thanks Tim! It is working now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint