• Aucun résultat trouvé

LABORATORY PERIPHERAL SYSTEM DRIVER

Dans le document at RSX-11M (Page 186-190)

I DOL DOLW I

CHAPTER 12. LABORATORY PERIPHERAL SYSTEM DRIVER

12.3.2.3 IO.SDI - This function reads data qualified by a mask word from the digital input register. The mask word contains a 1 in each bit position from which data is to be read. All other bits are zero-filled and the resulting value is returned in the second I/O status word.

The operation performed is:

RETURN VALUE=MASK.AND.INPUT REGISTER

12.3.2.4 IO.SDO - This function writes data qualified by a mask word into the digital output register. The mask word contains a 1 in each bit position that is to be written. The data word specifies the data to be written in corresponding bit positions.

The operation performed is:

NEW REGISTER=<l1ASK.AND.DATA).OR.« • NOT.MASK) • .Al.~D.OLD REGISTER)

12.3.3 Device-Specific QIO Functions (Synchronous)

Table 12-3 lists the synchronous, device-specific functions of the QIO macro that are valid for the LPS1l.

Table 12-3

Device-Specific QIO Functions for the LPS11 (Synchronous) Format

QIO$C IO.ADS, ••• ,<stadd,size,pnt, ticks,bufs,chna) QIO$C IO.HIS, ••• ,<stadd,size,pnt,

ticks,bufs) QIO$C IO.MDA, ••• ,<stadd,size pnt,

ticks,bufs,chnd) QIO$C IO.MDI, ••• ,<stadd,size,pnt,

ticks,bufs,mask) QIO$C IO.MDO, ••• ,<stadd,size,pnt,

ticks,bufs,mask)

12-4

Function

Initiate A/D sampling

Initiate histogram sampling Initi.ate D/A output

Initiate digital input sampling Initiate digital output

(

(

\

(

CHAPTER 12. LABORATORY PERIPHERAL SYSTEM DRIVER

where: stadd is the starting address of the data buffer (must be on a word boundary) •

size is the data buffer size in bytes (must be greater than zero and a multiple of four bytes).

pnt is the digital point numbers (byte 0 starting input/output point number; byte 1 - input point number to stop the function).

ticks is the number of LPSll clock ticks between samples or data transfers, as appropriate.

bufs chna

chnd

mask

is the number of data buffers to transfer.

is the A/D conversi.on specification (byte 0 - starting A/D channel number, which must be in the range 0-63.

If the gain ranging option is present the channel number Must be in the range 0-15 and bits 4 and 5 specify the gain code. Byte 1 - number of consecutive A/D channels to be sampled, which must be in the range 1-64).

is the D/A output channel specification (byte 0 starting D/A channel number, which must be in the range 0-9; byte I number of consecutive channels to output, which must be in the range 1-10).

is the mask word.

The following subsections describe the functions listed above.

12.3.3.1 IO.ADS - This function reads one or more A/D channels at precisely timed intervals, with or without auto gain-rangi.ng. If t\o,ro or more channels are specified, all are sampled at approximately the same time, once per interval. The auto gain-ranging algorithm causeR a channel to he sn.mpled at the highest gain at which saturation doe'S not occur.

Sampling may be started when the request is dequeued or when a specified digital input point is set. A digital output point may optionally be set when sampling is started. Sampling may be terminated by a prograrrt request (IO.STP or IO.KIL), by the cleRring of a digital input point, or by the collection o:f a specified numher of buf.fers of data.

All input is double-buffered with respect to the user task. Each time a half buffer of data has been collected, the user task is not,ified (via the setting of an event flag) that data is available to be processed \OThi1e the driver fills the other half of the buffer.

CHAPTER 12. LABORATORY PERIPHERAL SYSTEM DRIVER the number of sample intervals between Schmitt trigger firings.

If the counter overflows before Schmitt trigger one fires, then a zero

(

CHAPTER 12. LABORATORY PERIPHERAL SYSTEM DRIVER

Bit Meaning

0-3 Unused

4 Stop on number of buffers

5 6 7

stop on digital input point clear Set digital output point at start of operation

Start on digital input point set (a zero specification means start immediately)

12.3.3.3 IO.MDA - This function writes data into one or more external D/A converters at precisely timed in~ervals. If two or more channels are specified, all are written at approximately the same time, once per interval. Output may be started or stopped as described in section 12.3.3.1. All output is double-buffered with respect to the user task.

D/A converters 0 and 1 correspond to the X and Y registers of the LPSVC option. D/A converters 2 through 9 correspond to the LPSDA external D/A option.

The subfunction modifier bits are identical to those described in section 12.3.3.2.

12.3.3.4 IO.MDI - This function provides the capability to read data qualified by a mask word from the digital input register at precisely timed intervals. Sampling may be started and stopped as described in section 12.3.3.1. All input is double-buffered with respect to the user task.

The mask word contains a 1 in each bit position from which data is to be read. All other bits are zero.

The subfunction modifier bits are identical to those described in section 12.3.3.2.

12.3.3.5 IO.MDO - This function writes data qualified by a mask word into the digital output register at precisely timed intervals. Output may be started and stopped as described in section 12.3.3.1. All output is double-buffered with respect to the user task.

The subfunction modifier bits are identical to those described in section 12.3.3.2.

CHAPTER 12. LABORATORY PERIPHERAL SYSTEM DRIVER

Dans le document at RSX-11M (Page 186-190)