lpcware

ADC pin config question

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by avass on Tue Jan 22 02:04:08 MST 2013
I'm reading the 1115's ADs and what I found is that if I configure the pins, say PIO0_11 with zeroing out FUNC/MODE ( since HYS and OD has no effect ) :
LPC_IOCON->R_PIO0_11&= ~0x9F;
LPC_IOCON->R_PIO0_11|= 0x2; // AD0 : Analog Input Mode
I get readings in the 0-1023 range, which is expected.

On the other hand, if I set pull-up resistor enabled with
LPC_IOCON->R_PIO0_11|= 0x12;// AD0 : Analog Input Mode/Pull-up resistor enabled
I get readings in the 7-1023 range...

I thought the specs say that HYS and MODE have no effect on ADs (7.3.4).

So, how come?!!! What am I setting / not setting right?!

Thx.

Outcomes