AX10425.TXT Driver File Contents (AS59099V2_0.zip)

[AX10425 - 5/10 Channel Counter/Timer Module]

Function:
   ax10425Init

Description:
   Initialize the device.

   int ax10425Init(int base_addr, int function);
   base_addr: I/O base address of the device.
   function: Function ID.

Remarks:
   This function should be called once before the device performming any data
   I/O functions. The function ID could be either of the constants listing below
   or any combinition of them:
      ID_FUNC_EVCNT
      ID_FUNC_FOUT
      ID_FUNC_ALL

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function: ax10425Term

Description:
   Terminate the device driver.

   int ax10425Term(int base_addr);
   base_addr: I/O base address of the device.

Remarks:
   This function should be called once if the device will no longer performming
   any data I/O functions. Usually at the end of you data acquisition/control
   processes.

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425GetDevAtbu

Description:
   Retrieve the device attribute.

   int ax10425GetDevAtbu(LPDEVATBU lpDevAtbu);
   lpDevAtbu: Pointer to the DEVATBU struct, which stores the device attribute.

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425IRQSetting

Description:
   Setting up the interrupt service routine for digital input via interrupt.

   int ax10425IRQSetting(int base_addr, void ISR(*isr)());
   base_addr: I/O base address of the device.
   *isr: The user specified interrupt service routine.

Remarks:
   Use this function to specified the interrupt service routine. Each time
   the interrupt was generated, the *isr will be called.

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425IRQRestore

Description:
   Restore the old interrupt service routine.

   int ax10425IRQRestore(int IRQNo);
   IRQNo: IRQ number specified in the ax10425IRQSetting function.

Remarks:
   Use this function to restore the interrupt service routine. Call this
   function everytime if ax10425IRQSetting was called, and before the
   ax10425Term was called.

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425SetCntMode

Description:
   Setup up Am9513A counter mode register(CMR) of AX10425.

   int ax10425SetCntMode(int base_addr, int CntNo, WORD Mode);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   Mode: CMR of Am9513A. Please refer to Am9513A data book for detailed info.

Return Values:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425GetCntSts

Description:
   Retrieve the status of the specified counter.

   int ax10425GetCntSts(int base_addr, int CntNo, int* pStatus);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   pStatus: Pointer to storage of counter status.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425ReadCnt, ax10425ReadCntA

Description:
   read the 'current' count of the specified counter.

   int ax10425ReadCnt(int base_addr, int CntNo, WORD* pdata);
   int ax10425ReadCntA(int base_addr, int CntNo, WORD* pdata, int ReadMode);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   pdata: Pointer to storage of current count.
   ReadMode: (Advanced Function) Specify the reading of 'current' count. The
      value will be ID_MANUAL, for manual reading, or ID_AUTOREAD, for automatic
      reading.

Remarks:
   The only difference between ax10425ReadCnt() and ax10425ReadCntA() is that how
   the counter will be latched for reading. You can latch the counter manually,
   and read the counter by calling ax10425ReadCntA(), as well as calling another
   function, ax10425ReadCnt(), to latch and read the counter automatically.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425WriteCnt, ax10425WriteCntA

Description:
   Write data to the specified counter.

   int ax10425WriteCnt(int base_addr, int CntNo, WORD data);
   int ax10425WriteCntA(int base_addr, int CntNo, WORD data, int WriteMode);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   data: Data that will be loaded onto the counter's LOAD register.
   WriteMode: (Advanced Function) Specify the LOAD/ARM method of the data. The
      value will be ID_MANUAL, for manual ARM data, or ID_AUTOWRITE, for auto-
      matically ARM data.

Remarks:
   The only difference between these two functions is that how the counter will
   being ARMed. You can call ax10425WriteCntA(ID_MANUAL) to LOAD counter and then
   ARM counter by yourself. Or call ax10425WriteCnt() to LOAD and ARM counter
   automatically.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425EventCount

Description:
   Event counting function.

   int ax10425EventCount(int base_addr, int CntNo, WORD ConvNo);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   ConvNo: Specify the initial value to count down.

Remarks:
   The default counting direction is count down. You can change the counting
   direction by setting up the CMR via ax5126SetCntMode(). Refer to Am9513A data
   book for detailed information.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425Frequency

Description:
   Frequency measurement function.

   int ax10425Frequency(int base_addr, int* pCntNo, WORD delay, float* pFreq);
   base_addr: I/O base address of the device.
   pCntNo: Pointer to buffer of counter used. For example, if you use cascaded
      counters, CNT#1 and CNT2, to measure frequency. The buffer CntUse[] will
      be CntUse[0]=1, CntUse[1]=CntUse[2]=2. (pFreq=CntUse).
   delay: Specify the sampling period for frequency measurement.
   pFreq: Pointer to storage of measured frequency.

Remarks:
   There are plenty of frequency measument methods. This function shows how to
   measure frequency in software gating method, which may loss data in some
   non-realtime system, but makes the most use of all channels. It is your own
   freedom to implement any other measuring method as long as it works, with
   functions described above.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.


Function:
   ax10425WaveGen

Description:
   Generate square wave through OUT pin.

   int ax10425WaveGen(int base_addr, int CntNo, DWORD base_freq, DWORD out_freq);
   base_addr: I/O base address of the device.
   CntNo: Counter number. CNT#1,2,3,4,5....
   base_freq: Base frequency of the counter CLK source.
   out_freq: Value of the output frequency.

Return Value:
   This function will return an error code defined in the ERROR CODE LIST of
   AXDDR include file(axddr.h). Please be sure to check this returned value to
   determine whether the function call succeed or not. If there're no any error
   occured, the return value should be ERR_NOERR. Otherwise, the value will be
   the one defined in ERROR CODE LIST.




Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web3, load: 2.00