Sample line, return # zero crossings in 32ms
Func AX |
13h |
Param DX |
None |
Return AX |
Number of zero crossings in 32ms. period
|
Delay |
32ms
|
Sample the line and return the number of zero crossing in 32 ms. The
number returned is the number of times the analog signal changes from
negative to positive voltages as tracked by sampling the signal through
the ADC (analog to digital converter). This information can be used to
determine the average frequency on the line during the 32ms period. The
CROSS_COUNT routine only counts the crossings from negative voltage to
positive voltage so the each unit represents a full wave. The frequency
can determined by multiplying the return by 31.25 (1/.032). For example,
14 * 31.25 = 437.5 Hz, average dialtone frequency. The returned value is
low or zero if there is silence on the line. |