beautypg.com

ADLINK ACL-8454/12 User Manual

Page 56

background image

48

High-Level Programming

@ Syntax

Microsoft C/C++ (Windows, Win95 & Win-NT)

W_8454_Interrupt_on_TC(CN,Val) == W_8454_Write_Counter( CN, 0, Val )
W_8454_One_Shoot(CN,Val)

== W_8454_Write_Counter( CN, 1, Val )

W_8454_Square_Wave(CN,Val)

== W_8454_Write_Counter( CN, 2, Val )

W_8454_Rate_Generator(CN,Val) == W_8454_Write_Counter( CN, 3, Val )
W_8454_SW_Strobe(CN,Val)

== W_8454_Write_Counter( CN, 4, Val )

W_8454_HW_Strobe(CN,Val)

== W_8454_Write_Counter( CN, 5, Val )

C/C++ (DOS)

_8454_Interrupt_on_TC(CN,Val)

== _8454_Write_Counter( CN, 0, Val )

_8454_One_Shoot(CN,Val)

== _8454_Write_Counter( CN, 1, Val )

_8454_Square_Wave(CN,Val)

== _8454_Write_Counter( CN, 2, Val )

_8454_Rate_Generator(CN,Val)

== _8454_Write_Counter( CN, 3, Val )

_8454_SW_Strobe(CN,Val)

== _8454_Write_Counter( CN, 4, Val )

_8454_HW_Strobe(CN,Val)

== _8454_Write_Counter( CN, 5, Val )

@ Arguments

int CN

: Counter number, equals to 1~12

UINT Val

: The 16 bits counter value to write to the counter.

@ Return Value

No_Error

: No error

Invalid_Counter_No : CntrNo is out of range.
Invalid_Timer_Mode : Mode is out of range

@ Example

See ‘DEMO.C’ in library diskette

5.10 W_8454_INT_Enable

@Description

This function is only available in Window 95 driver and Windows
NT driver. The function is used to initialize and start up the interrupt
control. After calling this function, every time an interrupt request
signal generated, a software event is signaled. So that in your
program, your can use wait operation to wait for the event. When
the event is signaled, it means an interrupt is generated. Please
refer to the samples program 8454int.c.

Note : The W_8454_INT_Enable and W_8454_INT_Disable are a pair

of functions. That is, as the W_8454_INT_Enable is called, the
W_8454_INT_Disable has to follow up behind it. Otherwise, the
interrupt operation will not stop.