■ FIGURE 1. Parser report.
■ FIGURE 2. Android command app.
The command takes four tokens. The second token is
the pin number to use. The third token is the counter to
use; this can be "A" or "B." The last token is the frequency
in Hz. The above command would cause the LED on P26
to blink at a 10 Hz rate until we stop it by
setting the frequency to 0.
Remember that counters work
independently and in parallel to the
normal pin output bits, so setting a pin to LOW or OFF
will not stop an active counter attached to it.
Here's the code that processes the FREQOUT
outa[msb..lsb] := state
dira[msb..lsb] := true
FREQOUT 26 A 10
pub pin_freq | pin, ctrx, hz