Config count – Remote Processing CAMBASIC User Manual
Page 180

CON FIG C ommands - 7
CONFIG COUNT
Tasking Statement
SYNTAX:
CONFIG COUNT number,address,bit [,preset] [,AUTO]
PURPOSE:
To define the characteristics of a software counter.
REMARK S:
The CO NFIG COU NT statement is the initial step in setting up a software counter. Up to eight
counter s can be defin ed. A counter input may b e any digital input.
The counter number has a range of 0 to 7. The address is the address of a parallel I/O port. The bit
param eter spec ifies bit 0 throug h 7 of that por t.
The option al preset parameter is only used when you want an interrupt at a specified number of
counts. When the optional AUTO parameter is specified, the counter will automatically reset to zero
when the preset is reached.
For ad ditional information see the M ultitasking Chapters.
RELATED:
O N C O U N T , S T A RT C O U N T , S T O P C OU N T , R E S U M E C O U N T
EXAMPLE:
10 CONFIG COUNT 4,32,2,5000
This configures counter 4 at address 32, and bit 2 with a preset count of 5000.
ERROR:
<
Data negative
>
– for number, address, bit, preset
<
Data > 65,535
>
– for preset and address
<
Data out of range
>
– if number or bit > 7