Delay error during compile.

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

daveb0360
Posts: 139
Joined: Mon Sep 21, 2009 10:17 am
Location: Leicester
Has thanked: 35 times
Been thanked: 12 times
Contact:

Delay error during compile.

Postby daveb0360 » Wed Sep 12, 2012 1:24 pm

Hi,
I have completed code which seems to work but during compile to hex, I get the following error showing.
"Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units"


Is this something I need to be concerned about? (I am concerned about it at the moment although my code works)

Hope someone can help with this..am about to commit it to my customer.

Thanks
Dave
Attachments
HeaterControl_eval15 with Diag32.hex
(8.1 KiB) Downloaded 443 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Delay error during compile.

Postby Enamul » Wed Sep 12, 2012 1:30 pm

Hi Dave,
It's not an error..it just a warning.
This is because the delay implemented by built-in delay functions which has some overhead and will not be exact time for which it is made for. For example, delay_ms is not exactly 1000us..there will be some more us..
We all get this warning and don't care this unless we are working with highly sensitive timing issue related program. If so, we can compensate few microseconds in the code.
But for your case I don't think you need to worry about at all.
These users thanked the author Enamul for the post (total 2):
Benj (Wed Sep 12, 2012 1:37 pm) • daveb0360 (Wed Sep 12, 2012 2:53 pm)
Rating: 10.53%
 
Enamul
University of Nottingham
enamul4mm@gmail.com