Name:
pulsout
Syntax:

PULSOUT pin,time

Pin - is a variable/constant which specifies the i/o pin to use.

Time - is a variable/constant which specifies the period (0-65535) in 10us units (at 4MHz resonator).

Description:

Output a timed pulse by inverting a pin for some time.

The pulsout command generates a pulse of length time. If the output is initially low, the pulse will be high, and vice versa. This command automatically configures the pin as an output, but for reliable operation you should always ensure this pin is an output before using the command (using high, low or output).

Effect of Increased Clock Speed:

4MHz 10us unit
8MHz 5us unit
16MHz 2.5us unit
32MHz 1.25us unit
64MHz 0.625us unit
Applies To:
All
See Also:
Related Create:
Share:
Print:

Output a pulse

Generate 1.5ms pulses on output B.1 with a 20ms interval between each pulse

Code Example:
main:	pulsout B.1,150	; send a 1.50ms pulse out of pin B.1
	pause 20	; pause 20 ms
	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.