Skip to content

Counters

kaiateic edited this page Apr 27, 2016 · 3 revisions

Syntax

COUNTER <0|1> <ENABLE|DISABLE|CLEAR>
READ #COUNTER <0|1>, <variable>

Description

Counters count rising pulses, tested to 30 kHz.

There are two counters available for BotSpine, COUNTER 0 and COUNTER 1. They are set up to two fixed pins. Counter#0 is set up to P0(6) and Counter#1 is set up to P1(2).

Counters start counting as soon as enabling the counters and stop counting once they are disabled. CLEAR resets the values of counts to zero and re-starts the count. Counts value can be read in variables.

Clone this wiki locally