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

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

Delay error during compile.

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

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 about to commit it to my customer.

HeaterControl_eval15 with Diag32.hex
(8.1 KiB) Downloaded 444 times

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

Re: Delay error during compile.

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

Hi Dave,
It's not an 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%
University of Nottingham