AnsweredAssumed Answered

How can I select the ADC input channel on LPC1769?

Question asked by Csaba Katona on Oct 25, 2016



I'm trying to find out without any luck.


I started from periph_adc project, and I was able to read the AD0.0 (P0.23) without problem (the code is in the attachment).


Then I replaced the ADC_CHANNLE with


so I can change channel from AD_CH0 to AD_CH7.

Compiling this code it was running well only when myADC_CHANNLE = AD_CH0, else stucked in a while cycle.

Then modified set _LPC_ADC_ID (I saw similar method in a lot of example ):

_LPC_ADC_ID->CR |= 0x01;

hoping I could get AD_CH1 data, but the program get into this cycle:

void HardFault_Handler(void)
{ while(1) {}


I was searching a lot for the solution, but can not find more information.


Is there anybody could help me?


Best wishes!

Original Attachment has been moved to: