ADLINK PCM-9112+ User Manual

Page 79

Advertising
background image

C/C++ Library

71

@ Example

main()
{
int

errCode;

Int baseAddr, irqNo;

_9112_Initial( CARD_1, &baseAddr, &irqNo);

/* Assume NoError when Initialize PCI-9112 */


_9112_AD_Timer(CARD_1,10 , 10 );

/* set AD sampling rate to 2MHz/(10*10) */

..

_9112_AD_Timer(CARD_1, 0 , 0 );

/* stop the pacer trigger */

}

5.26 _9112_TIMER_Start

@ Description

Timer #0 on the PCI-9112 is available for programming by the user. This
function is used to program Timer #0. This timer can be used as a
frequency generator if internal clocks are used. It can also be used as
an event counter if an external clock is used. The entire 8253 mode is
available. Please refer to section 5.4 "Timer/Counter operation” for more
details.

@ Syntax

Visual C++ (Windows-95)

int W_9112_TIMER_Start (int card_number, int timer_mode,

unsigned int c0)

Visual Basic (Windows-95)

W_9112_TIMER_Start(ByVal card_number As Long, timer_mode

As Long, c0 As Long) As Long

C/C++ ( DOS)

int _9112_TIMER_Start(int card_number, int timer_mode,

unsigned int c0 )

@ Argument

card_number:

the card number of PCI-9112

timer_mode:

the 8253 timer mode, the possible values

are:

TIMER_MODE0, TIMER_MODE1,

TIMER_MODE2, TIMER_MODE3,

TIMER_MODE4,

TIMER_MODE5.

c0: the counter value of timer

@ Return Code

ERR_NoError, ERR_BoardNoInit
ERR_InvalidTimerMode, ERR_InvalidTimerValue

Advertising