The comparator voltage reference is a 16-tap resistor ladder network that provides a selectable reference voltage. A block diagram of the module is shown in Figure 8.2, “Block diagram of the Voltage Reference Module”.
The comparator voltage reference module is only available in Four Inputs Multiplexed to Two Comparators mode (MODE = 6). It provides the VIN+ reference voltage for both comparators.
Comparator voltage reference module is configured with Byte 3: VREF of GPIO_SET_CMP_CFG command.
The comparator voltage reference provides two ranges of output voltage (CVREF) values. Each range has 16 distinct levels. The range can be chosen with Bit 4: RANGE in Byte 3: VREF. The primary difference between the ranges is the size of the steps selected with Bits 3-0: MULTIPLIER. That is why one range offers finer resolution but shorter interval of possible values (RANGE = 0).
With Bits 3-0: MULTIPLIER you can select the output voltage (CVREF) of voltage reference module.
Use the following equations to calculate the output voltage:
- If RANGE = 1:
CVREF = (CVRSRC /24) x MULTIPLIER;
MULTIPLIER = 24* (CVREF/ CVRSRC).
This range offers not so fine resolution but wider interval of possible values.
- If RANGE = 0:
CVREF = (CVRSRC /4) + ((CVRSRC /32) x MULTIPLIER);
MULTIPLIER = 32*( CVREF / CVRSRC) – 8.
This range offers finer resolution but shorter interval of possible values.
The CVRSRC is selected with Bit 5: EXT_SOURCE. It can be either external or internal.
If EXT_SOURCE = 1, the voltage reference module uses C.5 (VREF+) and C.6 (VREF-) pins as voltage source:
CVRSRC = VREF+- VREF-
If EXT_SOURCE = 0, the voltage reference module uses
USB-I/Oadapter positive (VDD) and negative (VSS) supply as voltage source:
CVRSRC = VDD – VSS
The output of comparator voltage reference module ( VREF) is connected to VIN+ of both comparators. You can output the voltage reference onto C.5
I/O pin. Use Bit 6: OUTPUT in Byte 3: VREF of GPIO_SET_CMP_CFG command to enable such output. You can use C.5 pin to check the reference voltage with oscilloscope. Due to the limited current drive capability, a buffer must be used on the voltage reference output for external connections to VREF.
If you switch on the CVREF output to C.5 pin, you cannot use it as: