problem ADC LPC1769

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

problem ADC LPC1769

456 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tmltml51 on Mon Dec 31 01:41:00 MST 2012
I am doing a project related to the ADC of the LPC1769.I use a line asc17 current sensor 100mv / A device to detect connection with lpc1769, but I have a problem read adc whenever I get the value of adc's arm, it does not read true value of asc17 thatI have to wait a while to get the true value of it
the problem is that so?
How to read the correct value?
still use asc17 way to recognize devices connected?
How can I determine the value I need to read to identify the device connected?


Attached files...
0 项奖励
回复
1 回复

445 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArtjomGromak on Mon Dec 31 08:06:48 MST 2012
I see source code and don't understand some operations:
[B]   LPC_PINCON-> PINMODE1 &= 00<<16;
   LPC_PINCON-> PINMODE1 &= 00<<18;[/B]
   LPC_SC->PCONP |=1<<12;
 
   LPC_ADC-> ADCR |=1<<21;
   [B]LPC_SC->PCLKSEL0 &=00<<24;[/B]

   LPC_ADC-> ADCR |=(25<<8);
   LPC_ADC-> ADCR |=(1<<16);

What this code must do
LPC_PINCON-> PINMODE1 &= 00<<16; 

?
Set PINMODE1 to 0 or set bits 16:17 of PINMODE1 to 0?
May be it is correctlly:
LPC_PINCON-> PINMODE1 &= ~(0x3<<16); 


?
0 项奖励
回复