Sharing pin for ADC and ACMP

Showing results for 
Search instead for 
Did you mean: 

Sharing pin for ADC and ACMP

Contributor I

Using an MC9S08PA8VTG.  ACMP input and ADC input share pin 16.  Codewarrior balks at assigning both peripherals to the same pin.  I see nothing in the data sheet that says I can't and the application is pin limited  so I don't want to route the same signal to two pins.  I want the ACMP to monitor my incoming power so I can save my data if power is going down.  Customer also wants to measure the incoming power.  So:

1. Does the hardware allow these two functions to share a pin and operate simultaneously?

2. If yes, is there a way to make Codewarrior enable both?

Thanks for any assistance.

0 Kudos
1 Reply

NXP Employee
NXP Employee

Hi Eric,

No, the ADC and ACMP cannot be used simultaneously. You can switch from ACMP to ADC and back. You need to set the pin as ACMP make the measurement, turn off the ACMP module and the set the ADC, make the measurement and then turn off the ADC module.

Since Processor Expert will not let you use both components with the same pin you need to first configure one of the components, generate the code and copy the source files to another folder inside your project, after that disable the component and configure the second one.

Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos