typedef struct tagPT_DICounter
{
USHORT usEventType;
USHORT usEventEnable;
USHORT usCount;
USHORT usEnable;
USHORT usTrigEdge;
USHORT *usPreset;
USHORT usMatchEnable;
USHORT *usValue;
USHORT usOverflow;
USHORT usDirection;
} PT_DICounter, * LPT_DICounter;
PT_DICounter is no used now.
Each digital input channel of PCI-1760 is connected to a 16-bit UP event counter with a maximum frequency of 500 Hz. Each counter is enabled or disabled by software.
| Name | Direction | Description |
| usEventType | input | The type of event during hardware interrupt. |
| usEventEnable | input | The event enable/disable bit. After the event function is enabled, the device driver will fire an event when hardware interrupt occurs. |
| usCount | input | Reserved. |
| usEnable | input | The counter enable/disable bit for counter0~counter7. For example, if bit0=1, counter0 is enabled. |
| usTrigEdge | input | The trigger edge for counter. 0:rising edge 1:falling edge |
| usPreset | input | The preset start-up value of a counter when one of the counters needs to be started from a non-zero number. The preset value can be set to a number between 0 and 65535 by the user. |
| usMatchEnable | input | The match function enable/disable bit for counter0~counter7. An interrupt signal will be generated if the counter value reaches a pre-set counter match value (see the usValue below). The counter will continue to count until an overflow occurs, then it will go back to its reset value zero and continue the counting process. It is an 8-bit binary value, each bit corresponds to a counting channel. 1 means to enable the counter match, 0 means disable. For example, 0x13 (00010011) means the counter match is enabled on channel 0、1、4. |
| usValue | input | The counter match value. When the match function is enabled and the count value matches the specified value, a COUNTERMATCH event will be signaled. |
| usOverflow | input | The overflow enable/disable bit for counter0 to counter7. An
overflow will occur when the counter reaches its maximum value, 65535. It is an 8-bit binary value, each bit corresponds to a counting channel. 1 means to enable the overflow, 0 means disable. For example, 0x13 (00010011) means to enable the overflow on channel 0、1、4. |
| usDirection | input | Reserved. |