PS8 Comparators

For the original PS8 using a PIC16F648
the unfiltered current voltage connects to RA0/AN0
the fitered voltage connects to RA3/AN3

Initial setup

The C1 comparator is initially configured for measuring the current using mode 2.
Both comparators have the positive input connected to vref module,
negative inputs are routed via CIS which is set to 1 for RA3 to C1.
C1 output is inverted so a 1 indicates RA3 > vref.
vref not configured yet

Setup for current test

Comparators set as in initial.
vref is enabled, low range, value 3 which gives 600mv to comparators.
This equates to 1200ma when using 0.5 ohm sense resistor.

Setup for transponding

Comparators are set to mode 4, independant comparators.
C1 positive input connected to RA3, negative to RA0.
Output is inverted so a 1 indicates RA0 > Ra3, ie unfiltered > filtered.