
SMART I/O User’s Manual | Chapter 5 Analog Modules  | |||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
5.4.8.3 SMADC1GetVRaw
Syntax
error_code SMADC1GetVRaw(u_int8 PortNr, u_int8 Channel, int16 *pValue);
Description
This function fetches the conversion result of a selected channel without performing a gain or offset correction. The result is always a signed integer value.
Input
u_int8 PortNr u_int8 Channel
int16 *pValue
Output
error_code
Example
Number of the ADC input channel to access 
Pointer to the location where the conversion result will be stored
SUCCESS  | if module was not initialised  | 
E_SEEK  | |
if the module is unknown  | 
or standard 
RetVal = SMADC1GetVRaw(0, 2, 0x07FF);
  | 
  | Value  | 
  | ||
Unipola  | r  | 
  | 
  | Bipolar  | 
  | 
Positive   | $0FFF  | Positive   | $07FF  | ||
+1LSB  | $0001  | +1LSB  | $0001  | ||
0  | 
  | 
  | $0000  | $FFFF  | |
  | 
  | 
  | 
  | Negative   | $F800  | 
  | 
  | 
  | 
  | 
Page  | 5 - 96  | ©1996 PEP Modular Computers GmbH | October 01, 1996  | 
  | 
  | 
  |