I have a customer concerned about sharing a single input pin simultaneously between the ADC and Comparator input channel:
I have a quick and hopefully easy question about ADC and comparator input channels (COMP1A, etc.). Is it possible to sample the same pin at the same time as an analog comparator input and ADC input channel, or does that cause something to not work correctly or sample with additional error, false trips, etc.? For example, on the F28062 100-pin package, pin 21 is both COMP1A and ADCINA2. The analog pin mux setting is the same for either purpose, so can I use that pin for both the comparator and sample it with the ADC at the same time? We haven’t done this in the past, so I’m not sure what caveats there might be.
I suggested that because of possible leakage, the ADC sampling time may need to be slightly larger for the ADC hold capacitor. Our bigger concern however is that when charging the sample and hold capacitor, the voltage will drop on the comparator and cause a false trip. I also suggested two separate input pins with a bulk capacitor on each.
Unfortunately right now all 16 ADC inputs are spoken for, with 2 of them being for the current transformer (CT) inputs to COMP1A and COMP2A. A voltage drop to the comparator input channel wouldn’t be bad as long as there isn’t an overshoot at the end of the voltage drop period, as we are looking for increasing voltage spikes that indicate excessive input current draw. Reading the analog CT signal levels by the ADC isn’t a requirement, so worst case we just wouldn’t do that. The hardware guys want to ADC-sample the CTs also to act as a slow fuse besides doing the instantaneous trip.
I'm looking for additional guidance for allowing the comparator and ADC sampling to coexist on the same pin.
Thanks,
Stuart