Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Other >> Arduino for Visual Studio 2010 >> VM debug causes program to stop writing data to TFT display.
https://www.visualmicro.com/forums/YaBB.pl?num=1434532835

Message started by HansBear on Jun 17th, 2015 at 10:20am

Title: VM debug causes program to stop writing data to TFT display.
Post by HansBear on 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?

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by Visual Micro on 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

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by HansBear on 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.

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by HansBear on 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.

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by HansBear on 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.

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by Visual Micro on Jun 18th, 2015 at 11:01am
I see, you can use other digital pins with SoftwareSerial if need be

Title: Re: VM debug causes program to stop writing data to TFT display.
Post by HansBear on 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.

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.