Dt9837 Register-Level Programming; Writing To The General Control Register 2 - Data Translation DT9837A User Manual

Dt9837 series high-performance, multifunction data acquisition modules for the usb (ver. 2.0 or ver. 1.1) bus.
Table of Contents

Advertisement

Appendix C

DT9837 Register-Level Programming

If you need to change the settings of the Open Layers Control Panel for the DT9837
programmatically, you can use the Data Acq SDK function olDiagWriteReg to write to the
following registers of the DT9837 module:
• General Control Register 2 – Write to this memory location to change the tachometer
• EEPROM – Write to this memory location to change the coupling type, current source, or
The following subsections describe writing to these memory locations in more detail.

Writing to the General Control Register 2

The following example shows how to update the bits of General Control Register 2 on the
DT9837 module using the value specified in the RegValueToWrite variable:
#define LOCAL_BUS_BASE 0x200000
#define GENERAL_CNTRL_REG2 (LOCAL_BUS_BASE | 0x4102)
olDiagWriteReg (m_hDev, GENERAL_CONTROL_REG2, RegValueToWrite,2);
General Control Register 2 (ControlReg2) Offset: 0x2
Note: The contents of the registers are reset once the application exits.
Table 35
the programmable settings in the Open Layers Control Panel, described on
Bits
Type
[7]
RW
[5]
RW
[4]
RW
136
settings.
high power mode settings.
describes the bits of General Control Register 2 on the DT9837 module that relate to
Table 35: DT9837 General Control Register 2
Name
Tach Counter 0 Start Select
Tach Counter 0 Mode Select
Tach Counter 0 Flag Select
Description
Select the starting edge for the period measurement on
Tach Counter 0:
0 – Tach Input Rising Edge
1 – Tach Input Falling Edge
Select the value read in between measured values on
Tach Counter 0:
0 – Previous measurement
1 – Zeros
Select whether or not to use the Stale Data flag:
0 – Stale Data flag not used
1 – Stale Data flag used
page
36.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dt9837Dt9837bDt9837 seriesDt9837c

Table of Contents