Name:
pauseus
Syntax:

PAUSEUS microseconds

Microseconds - is a variable/constant (0-65535) which specifies how many multiples of 10 microseconds to pause (at 8MHz on X2 parts, else 4MHz).

Description:

Pause for some time.

The duration of the pause is as accurate as the resonator time-base, and presumes a 4MHz resonator (8MHz on X2 parts). The pauseus command creates a time delay (in multiples of 10 microseconds at 4MHz). As it takes a discrete amount of time to execute the command, small time delays may be inaccurate due to this 'overhead processing' time. This inaccuracy decreases as the delay gets longer.

Effect of increased clock speed

For non-X2 parts, the timebase is reduced to 5us at 8MHz and 2.5us at 16MHz.  For X2 parts, the timebase is reduced to 5uS at 16MHz and 2.5uS at 32MHz.

Applies To:
All M2, X1, X2 parts
See Also:
Related Create:
    Share:
    Print:

    Toggle an output pin

    Turn an output pin on and off with a 50ms interval

    Code Example:
    main:	high B.1	; switch on output B.1
    	pauseus 5000	; wait 50 000us = 50 milliseconds
    	low B.1		; switch off output B.1
    	pauseus 5000	; wait 50 000us = 50 milliseconds
    	goto main	; loop back to start
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.

    Comments

    • Login to leave a comment.