Mcp3xxx.ReadDifferential(Int32, Int32) Method

Definition

Reads a value from the device using differential inputs

C#
public virtual int ReadDifferential (int valueChannel, int referenceChannel);

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 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). This subtraction is performed in software which may mean that errors are introduced with rapidly changing signals.

Applies to

Product Versions
.NET IoT Libraries 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0