-----

**/ra/0/vp** : Get/set ADC Vref+
**/ra/0/vn** : Get/set ADC Vref-

This message is only understood by a pin with analog input capability.

The analog-to-digital converter compares input voltages to the on-chip power supply and ground pins (Vdd and Vss, respectively). With USB bus power, Vdd is approximately at +5 V relative to Vss, but considerable variation exists over various connectivity options (powered vs unpowered hubs) and computer types (laptop, desktop). For a sensor that reports data from 0.0-3.3V using a voltage regulator, the 3.3V point will not be reliably yield the expected ratio 3.3/5.0 as the 5.0 reference may vary considerably. In this situation it is convenient to switch the Vref+ to the 3.3V supply, which must be connected to pin AN3 (/ra/3 on the bitwacker and /an/3 on the CUI).

The configuration of Vref+/- is per pin; you can even set the Vref+ of pin AN3 to itself, which as a point of sanity check should then read as input value 1.0.

It is also possible to switch the Vref- between the default Vss and pin AN2.

TX: [ /ra/0/vp ]
RX: [ /ra/0/vp ,s "vdd" ]

TX: [ /ra/0/vp ,s "an3" ]
RX: [ /ra/0/vp ,s "an3" ]

-----

**/ra/0/imp**: Get/set ADC impedance mode.

The default impedance mode is 'high', supporting up to 2.5k ohm impedance at 5v. The ADC uses a capacitor of approximately 25 pico farad. For analog circuits using an op-amp, the impedance may be significantly lower, which enables faster conversions. The argument 'low' informs the corresponding pin to use fast conversions.

TX: [ /ra/0/imp ]
RX: [ /ra/0/imp ,s "high" ]

TX: [ /ra/0/imp ,s "low" ]
RX: [ /ra/0/imp ,s "low" ]

-----

**/ra/0/idle**: Get/set ADC idle state.

By default an analog input pin in input state is floating at all times. Setting the idle state enables the pin to be set to ground or high when a conversion is not taking place. This has applications in certain specialized circuits. A settling time on the order of a few microseconds is provided between when the pin transitions from the idle state to the floating conversion state. Valid settings for this parameter are 0 (low), 1 (high) and -1 / NULL (floating, default).

TX: [ /ra/0/idle ]
RX: [ /ra/0/idle ,N ]

TX: [ /ra/0/idle ,i 1 ]
RX: [ /ra/0/idle ,T ]