ADC Test & Analog Mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ADC Test & Analog Mode

876件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Fri Nov 30 15:38:21 MST 2012
In the LPCXpresso library for the LPC1114, there is an ADC.C file.  In the initialization function there is this comment:

[B]"Unlike some other pings, for ADC test, all the pins need to [be] set to analog mode."[/B]

Would anyone know what this means?  Even in the sample program, AD4 is being used as SWDIO, since the target uC is reporting values back to the host via JTAG.

I certainly hope it doesn't mean that to use any analog line, you have to use all of them!
0 件の賞賛
返信
3 返答(返信)

856件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Sat Dec 01 11:51:11 MST 2012
Okay.  I see.  ADC_TEST actually reads all available ADC lines.  That's why all are enabled.  I read too much into the comment that "...[B][I]all[/I][/B] pins [B][I]need to be[/I][/B] set..." as though it pertained to any use whatsoever of the ADC facility.

Thanks!
0 件の賞賛
返信

856件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by graynomad on Fri Nov 30 16:40:36 MST 2012

Quote:
I certainly hope it doesn't mean that to use any analog line, you have to use all of them!


No, you have to select the analogue function in the IOCON register for the pin you want to use analogue on.

On the 1227 that means clearing bit 7.
0 件の賞賛
返信

856件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Nov 30 15:53:49 MST 2012
UM:

Quote:

The ADC function must be selected via the IOCON registers in order to get accurate voltage readings on the monitored pin. For a pin hosting an ADC input, it is not possible to have a have a digital function selected and yet get valid ADC readings. An inside circuit disconnects ADC hardware from the associated pin whenever a digital function is selected on that pin.


Of course you can switch each pin to ADC :eek:
0 件の賞賛
返信