delay_10us Statement

The delay_10us statement causes the processer to wait a short time.

The time interval is measured in units of 10 microseconds (that is 0.00001 seconds)

The minimum delay period is 1 unit (1 * 10 microseconds), the maximum delay period is 256 units (256 * 10 microseconds = 0.00256 seconds).

syntax

delay_10us dly

where dly is the number of units to wait (NOTE dly is mod 256, so 0 is the same as 256, 257 is the same as 1 etc)

NOTE: If interrupts are enabled and interrupts occure during the execution of the delay_10us statement then the delay may become much longer than required. If accurate delays are required, then interrupts should be disabled. If interrupts are disabled then beware that some other high priority activity (which is serviced by the interrupt) may be neglected and possibly ignored completely.