A N 3 7 0
54
Rev. 1.0
Remaining bits are unused and can have any value. Value 0 is recommended.
biFcInterval
: (BYTE) Controls the number of interval clock cycles during which
the divider clock cycles are counted. The biFcInterval value is not the actual num-
ber of interval clock cycles used. The actual number of interval clock cycles is cal-
culated by the following equation:
Ninterval_cycles = (2 + biFcInterval[0]) * 2biFcInterval[5:1]
Example
: An argument of 17 = 0x11 yields the following:
Ninterval_cycles = (2 + 1) * 28 = 768
Outputs
:
None
vFc_StartCount
Description
: Starts the frequency counter.
Inputs
:
None
Outputs
:
None
vFc_PollDone
Description
: Polls the frequency counter busy flag and waits until the counter is done. To
be called after starting the frequency counter. Note that if something happens in hardware
(loss of the interval clock, for example), and the frequency counter stalls and does not fin-
ish counting, this function will wait for frequency counter to be done indefinitely in an
infinite loop. There is no timeout incorporated in the loop. It is up to the user to setup an
interrupt driven timer as a watchdog if the timeout is desired.
Inputs
:
None