Edit

Share via


Mcp33xx.ReadDifferential(Int32, Int32) Method

Definition

Reads a 13 bit signed value from the device using differential inputs

public override int ReadDifferential (int valueChannel, int referenceChannel);
override this.ReadDifferential : int * int -> int
Public Overrides Function ReadDifferential (valueChannel As Integer, referenceChannel As Integer) As Integer

Parameters

valueChannel
Int32

Channel which represents the signal driving the value in a positive direction (valid values: 0 to channelcount - 1).

referenceChannel
Int32

Channel which represents the signal driving the value in a negative direction (valid values: 0 to channelcount - 1).

Returns

A 13 bit signed value corresponding to relative voltage level on specified device channels

Remarks

The value that is read respresents the difference between the voltage on the value channel and the voltage on the reference channel (valueChannel Reading - referenceChannel Reading). If the valueChannel and the referenceChannel are part of the same channel pairing then the ADC converter will internally subtract the two values. If not then the subtraction is performed in software which may mean that errors are introduced with rapidly changing signals.

Applies to