PULSEOUT

PULSEOUT

Top  Previous  Next

Action

Generates a pulse on a pin of a PORT of specified period in 1uS units for 4 MHz.

 

 

Syntax

PULSEOUT PORT , PIN , PERIOD

 

 

Remarks

PORT

Name of the PORT. PORTB for example

PIN

Variable or constant with the pin number (0-7).

PERIOD

Number of periods the pulse will last. The periods are in uS when an XTAL of 4 MHz is used.

 

The pulse is generated by toggling the pin twice, thus the initial state of the pin determines the polarity.

The PIN must be configured as an output pin before this statement can be used.

 

 

See also

PULSEIN

 

 

Example

Dim A As Byte

Config Portb = Output                                     'PORTB all output pins

Portb = 0                                                   'all pins 0

Do

For A = 0 To 7

Pulseout Portb , A , 60000                               'generate pulse

Waitms 250                                               'wait a bit

Next

Loop                                                       'loop for ever