Hello, I am trying to configure a adc channel in ebtresos, but i dont know the process, I have created a port pin in port module and configured it as adc 0 channel 9, and in adc module, i added a channel with channel 9. please help me and give detail steps how can i configure a pin as adc, here are few snapshorts of my configuration, please also let me know if i am missing something.
Here i am using gpio 01 of mwct2016s micro controller that is linked with adc0 channel 9 so i have configured these
Hi sanjay645,
Basically your steps are correct.
First you need to add Adc Channel in Adc module, for example i choose P0_ChanNum0
Then let's find which pin will support this ADC channel. For example, i choose pin D1.
From D1 pin, we know the value of MSCR register (for MSCR value please refer to RM of chip). When you put the correct value of it, you can choose the Portpin Mode that be supported by the Pin. Then you choose P0 mode for this pin.
Please help me to try this.
Thank you,
Nam.