Note that not all rates are possible with complete precision. Each rate is set by programming the counter(s) with the divisor(s) resulting from the calculation (Input Clock) / Rate. On Diamond-MM boards, Input Clock is usually 10MHz. In each case a best fit is determined. However because of the integer math used, any errors resulting from truncation of the divisor to an integer value will cause the actual rate to differ from the desired rate. If rate < 1.0 then the function returns DE_INVALID_PARM.
This function works on all boards with 82C54 counter/timer chips. Quartz-MM uses a different counter/timer chip and has separate functions for programming.
BYTE dscCounterSetRate(DSCB board, float rate);
Name | Description |
---|---|
board | The handle of the board to operate on |
rate | Desired rate for the A/D counter/timer circuit |
Error code or 0.
This page was last modified 11:59, 12 Feb 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.