Positron Compiler Documentation

PulseOut

Source: Positron16 Compiler User Manual, PDF page 198

Syntax

PulseOut Pin, Period, { Initial State }

Overview

Generate a pulse on Pin of specified Period. The pulse is generated by toggling the pin twice, thus the initial state of the pin determines the polarity of the pulse. Or alternatively, the initial state may be set by using High-Low or 1-0 after the Period. Pin is automatically made an output.

Parameters

Pin is a Port.Pin constant that specifies the I/O pin to use. Period can be a constant of user defined variable. See notes. State is an optional constant (0 or 1) or name High - Low that specifies the state of the outgoing pulse.

Example

' Send a high pulse 1ms long to PORTB.5
'
  Device = 24HJ128GP502
                                     ' Select the device to compile for
  Declare Xtal = 16
  Low PORTB.5
  PulseOut PORTB.5, 100, High
                                     ' Send a high pulse 1ms long to PORTB.5

See also : Counter , PulseIn, RCin.