0
\$\begingroup\$

I want to configure CTMU to apply current on pin 17 (AN10), and then measure the voltage. I looked at the CTMUCON and CTMUICON registers in PIC24F16KA101(datasheet). There are no bits to determine which analog pin would source the current. Am I missing something?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The CTMU function provides the current source internally to whichever analog channel is initialized. You must initialize the ADC and analog channel before initializing the CTMU and enabling the current source, then perform the ADC conversion. Look at the current calibration routines in https://ww1.microchip.com/downloads/en/DeviceDoc/Charge%20Time%20Measurement%20Unit%20CTMU%20DS-39724b.pdf for some example code.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.