PS02 Comparators

For the new PS02 using PIC16F18xxx
Both comparators are used, one for each output pair.
The reference voltage is supplied by the DAC, and is available only on the positive inputs.
This means the filtered voltage gets routed to the negative inputs, and the unfiltered has to
be routed to the positive, a slight change from the original.
The additional inputs from LM339 occupancy detectors are routed to RA4-7.

Initial setup

The comparators are initially configured for measuring the current as follows:
Both comparators have the positive input connected to DAC (CxPCH = 5)
negative inputs are connected to respective filtered inputs (C1NCH = 0, C2NCH = 1).
outputs are inverted so a 1 indicates Vf > DAC.
DAC configured for 600mv.
This equates to 1200ma when using 0.5 ohm sense resistor.

Setup for current test

Comparators and DAC set as in initial.

Setup for transponding

Comparators positive inputs are connected to respective unfiltered inputs (CxPCH = 0).
Negative inputs remain connected to respective filtered inputs (C1NCH=0, C2NCH = 1).
Outputs are not inverted so a 1 indicates Vu > Vf, ie unfiltered > filtered.

DAC Setup for occupancy detection

Applies only to Product ID 4 (PS02): During the preamble and BOD sequence
the DAC is used to supply the reference to the LM339.
The helper processor supplies the LM339 reference in all other products.
All other times, and at all times in other products, the DAC is used for overcurrent detection.