FRQA, FRQB
Register: Counter A and Counter B frequency registers.
((PUB ┆ PRI))
FRQA
((PUB ┆ PRI))
FRQB
Returns: Current value of Counter A or Counter B Frequency Register, if used as a source variable.
Explanation
FRQA and FRQB are two of six registers (CTRA, CTRB, FRQA, FRQB, PHSA, and PHSB) that affect the behavior of a cog's Counter Modules. Each cog has two identical counter modules (A and B) that can perform many repetitive tasks. The FRQA register contains the value that is accumulated into the PHSA register. The FRQB register contains the value that is accumulated into the PHSB register. See CTRA, CTRB for more information.
Using FRQA and FRQB
FRQA and FRQB can be read/written just like any other register or pre-defined variable. For example:
FRQA := $00001AFF
The above code sets FRQA to $00001AFF. Depending on the CTRMODE field of the CTRA register, this value in FRQA may be added into the PHSA register at a frequency determined by the System Clock and the primary and/or secondary I/O pins. See CTRA, CTRB for more information.
Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.