Software Triggers And Polling Techniques - ICP DAS USA PCI-1002L User Manual

Pci-1002 series card 12-bit, 110 ks/s or 44 ks/s multi-function board version
Hide thumbs Also See for PCI-1002L:
Table of Contents

Advertisement

PCI-1002 Series Card
12-bit, 110 kS/s or 44 kS/s Multi-function Board

7.4.3 Software Triggers and Polling Techniques

The easiest way to control is by following these steps:
1. Send 00h to AD mode control register (Software Trigger + Polling Transfer)
2. Send channel number to multiplexer control register.
3. Send the gain control code value to gain control register.
4. Send any value to software trigger control register to generate a software trigger signal.
5. Scan the READY bit until READY bit =1
6. Read the 12-bit AD data.
7. Convert this 12-bit binary data to the floating point value.
For example:
/* -------------------------------------------------------------- */
/* DEMO 3: AdPolling
/* Compiler: Borland C++ 3.1, Mode Large
/* Output Code: HEX code
/* -------------------------------------------------------------- */
#include "P1002.H"
WORD wBaseAddr,wIrq;
//-------------------------------------------------------
WORD P1002_Delay(WORD wDownCount)
{
WORD h,l;
int count;
wDownCount &= 0x7fff;
if (wDownCount<1) wDownCount=1;
/* Clock in=4M --> count 4000 = 1 ms, count 1 = 0.25 us */
l=wDownCount&0xff;
wDownCount=wDownCount / 256;
h=wDownCount&0xff;
outp(wBaseAddr+3*4,0xB0);
outp(wBaseAddr+2*4,l);
outp(wBaseAddr+2*4,h);
*/
*/
*/
/* mode_0, counter_2 */
/* counter_2 low byte first */
/* counter_2 high byte ,0x07D0=2000 */
User Manual, Ver. 3.0, Jun. 2018, PMH-015-30, Page: 59

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pci-1002hPci-1002luPex-1002hPci-1002huPex-1002l

Table of Contents