I want to use ACMP2 on a 48 pin DZ60. My input signal (to be compared) is put on pin 10 (ACMP2-)
I have programmed ACMP2 :
ACMP2SC = 0xD0; /* Enabled, bandgap, int enabled, no out, falling edge of out */
I also use PTA1 as an analog measurement.
When PTA1 is greater than ~1.5 V all works fine.
When PTA1 is close to 0, I have unexpected ACMP2 interrupts, and the value read on ACMP2 output
(ACMP2SC & 0x08) is also corrupted.
For instance, I've removed all comparator features in my software and use PTF5 as digital input and my
system works fine without erroneous read data on PTF5.
My system is powered under 5V, xtal 4 MHz, bus clock 18 MHz and analog reference = 5 V
My question is :
Is there any influence of PTA (1 in my case) on ACMP2 ?
How could I avoid that ?
With best regards from France