Positron Compiler Documentation

PulseOut

Positron16 · Revision 1.1.3.5 · PDF page 198

PulseOut Pin, Period, { Initial State }

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.

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.

' 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.

View original PDF page 198Open page in PDFOriginal PDF page 198