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

Post Reply
Posts: 139
Joined: Mon Sep 21, 2009 10:17 am
Location: Leicester

Delay error during compile.

Post by daveb0360 »

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
(7.92 KiB) Downloaded 479 times

User avatar
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK

Re: Delay error during compile.

Post by Enamul »

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.
University of Nottingham

Post Reply