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 AtmelStudio6/7+Arduino 1.8.0+VM: Delays when using DallasTemp Lib (Read 2637 times)
acsg
Newbies
*
Offline


Posts: 2
Joined: Aug 25th, 2014
AtmelStudio6/7+Arduino 1.8.0+VM: Delays when using DallasTemp Lib
Jan 5th, 2017 at 9:54am
Print Post  
Using Dallastemp 3.7.7 lib:

Compiling with AS+VM+AR1.8 : long delays in Dallastemp library
Compiling same sketch directly in AR1.8: no delays
« Last Edit: Jan 5th, 2017 at 2:52pm by acsg »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AS 6.2 with Arduino 1.8.0 :Sketch works very slow when VM compiles
Reply #1 - Jan 5th, 2017 at 12:08pm
Print Post  
Hi,

Have you got he toolbar set to "Release" or "Debug"? Can you please make sure it is set to "Release" and then upload. Confirm if all works in the same way as the Arduino IDE thanks?

Thanks

The AS6.2 version of visual micro is quite old now and was produced long before arduino 1.8 which has only been released in the past week or so.

For some time there has been a version of Visual Micro for the free Visual Studio community version such as VS2017 and that is recommended. There is also a version for atmel studio 7 which is currently up to arduino 1.6.9 and will shortly be released for arduino 1.8

There is a lot of new and useful functionality in more recent Visual Micro versions. It's a free upgrade for you so I recommend it and also recommend Visual Studio 2017 with C++. 
  
Back to top
WWW  
IP Logged
 
acsg
Newbies
*
Offline


Posts: 2
Joined: Aug 25th, 2014
Re: AS 6.2 with Arduino 1.8.0 :Sketch works very slow when VM compiles
Reply #2 - Jan 5th, 2017 at 12:43pm
Print Post  
Debug or release in AS6.2 or AS7: same effect.
Compiling with AR1.8 = no delays; 
Compiling with AS+VM: 2sec delay per call in the DallasTemperature 3.7.7 library:


void DallasTemperature::blockTillConversionComplete(uint8_t bitResolution, const uint8_t* deviceAddress){
    
    int delms = millisToWaitForConversion(bitResolution);
    if (deviceAddress != NULL && checkForConversion && !parasite){
        unsigned long now = millis();
        while(!isConversionAvailable(deviceAddress) && (millis() - delms < now));
    } else {
        delay(delms);
    }    
}

As I poll my DS18B20 sensors every sec, I don't have to wait for the "temp conversion", so I disabled this part of the library and it works normal now.

But why does VM and AR do not compile same?
« Last Edit: Jan 5th, 2017 at 2:33pm by acsg »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint