Pulse – Remote Processing CAMBASIC User Manual
Page 135
Comm ands - 102
PULSE
Tasking Statement
SYNTAX:
PULSE n,a ddress, bit,tim e,p olarity
PURPOSE:
To config ure a digita l output line as a tim ed, or pulsed o utput.
REMARK S:
You may configure up to eight digital I/O lines as independent pulse output. The lines may be on
any digital I/O port. T his command allows you to pulse a line for a period of time while executing
other BASIC comma nds.
n is a pulse reference number and has a range from 0 to 7. This number is used for CL EAR P ULSE
and PULSE functions to reference this pulse timer.
The address is the I/O address of an 8– bit port. The r ange is 0 to 65535 (&FFF F).
The bit parameter is the particular bit of the port. T he value ranges from 0 to 7.
The time p a r am e te r is th e ti m e i n s e co n ds th a t t he s pe c if ie d bi t i s a c ti ve . Y o u m a y sp e ci fy a ti m e
from 0. 005 to 327. 67 seconds.
The polarity parameter deter mines whether the specified bit is active high or low. When polarity is
“1” , the bit goes high during the active time. If the polarity is “0” it goes low during the active
time.
For more information see the Multitasking Chapter.
RELATED:
CLE AR PU LSE, PUL SE function
EXAMPLE:
PULSE 5,0,2,2.55,1
Pulse number 5 is configured to output bit 2 at address 0 so the bit will go high for 2.55 seconds and
then return low. This sequence will execute only once.
ERROR:
< Data > 255> - for address
< Data negative> – for n,addr ess,bit,w ait,active
< Time > 327.67 sec> - for t
< Data > 65,535> – for address
< Data out o f range> – if bit or bit > 7