Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
VM debug causes program to stop writing data to TFT display. (Read 4818 times)
HansBear
Newbies
*
Offline



Posts: 8
Australia
VM debug causes program to stop writing data to TFT display.
Jun 17th, 2015 at 10:20am
 
Hi all
Have a problem with Visual Micro debug with VS 2013 community edition.  I'm testing a ITEAD 2.8 LCD display using the UTFT library and an Arduino Mega 2560.  The code works great providing I don't compile with debug on.  When debug is on it appears (using debug) that the program is running but there is no output to the display.  The display doesn't use a serial port so that shouldn't be the problem.  Anyone with suggestions?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10630
United Kingdom
Re: VM debug causes program to stop writing data to TFT display.
Reply #1 - Jun 17th, 2015 at 1:45pm
 
Hi,

If you are sure that using the serial port is not the problem then it must be the use of the delay() timer.

Visual micro prevents the Arduino from flooding the pc with serial messages when novice users place a breakpoint in a fast loop without condition.

You can switch the project property "ThrottleEnabled= false" to prevent this behaviour.

I hope that helps
Back to top
 
WWW  
IP Logged
 
HansBear
Newbies
*
Offline



Posts: 8
Australia
Re: VM debug causes program to stop writing data to TFT display.
Reply #2 - Jun 17th, 2015 at 11:06pm
 
Certain it isn't the serial port.  Set ThrottleEnabled = false still no joy.  Ensured that there are no breakpoints in the code.  Monitored the digital and analogue pins I'm using and they seem to work fine, yet nothing displayed on the TFT.  I've used breakpoints to check various areas of the code and this works fine.  However the only time the display works is with debug turned off.
Back to top
 
 
IP Logged
 
HansBear
Newbies
*
Offline



Posts: 8
Australia
Re: VM debug causes program to stop writing data to TFT display.
Reply #3 - Jun 17th, 2015 at 11:20pm
 
My apologies, your prompt about serial port usage triggered a thought  so I did a test.  It does appear to be related to the serial port as I get the same problem when I enable it "Serial.begin(9600)" and debug off.   Will investigate further to see what the UTFT library is actually doing when it prints to the TFT display.
Back to top
 
 
IP Logged
 
HansBear
Newbies
*
Offline



Posts: 8
Australia
Re: VM debug causes program to stop writing data to TFT display.
Reply #4 - Jun 18th, 2015 at 2:34am
 
Ok have found the cause of the problem, the solution may be somewhat more difficult.  It appears that the TFT display I am using connects to D0 and D1 which are also the Rx and Tx pins for the USB serial port. When running standalone the serial port is not in use and all is well, however when in VM debug mode the serial port is in use and the display ceases to function.

So thanks for the help.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10630
United Kingdom
Re: VM debug causes program to stop writing data to TFT display.
Reply #5 - Jun 18th, 2015 at 11:01am
 
I see, you can use other digital pins with SoftwareSerial if need be
Back to top
 
WWW  
IP Logged
 
HansBear
Newbies
*
Offline



Posts: 8
Australia
Re: VM debug causes program to stop writing data to TFT display.
Reply #6 - Jun 18th, 2015 at 12:03pm
 
Looking in to that.  But now that I know I can still use the debug facility (which has already solved one problem).  Many thanks for the pointers.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print