ADC on LPC1114F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC on LPC1114F

387 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohsin on Fri Nov 19 10:01:56 MST 2010
Hi All,

         I am using LPC1114F in my project. I was looking at the ADC module and have few questions.

1) Whatis the difference between ADINTEN 7:0 and ADGINTEN within AD0INTEN register. I realy can't find any difference between them. Can anyone explain if I am missing anything?

2) Also the example code for burst mode is not very clear. The [COLOR=Red]ADCIntDone[/COLOR] is not being set after all the conversions are complete.

#if BURST_MODE
    channel_flag |= (regVal & 0xFF);
    if ( (channel_flag & 0xFF) == 0xFF )
    {
      /* All the bits in have been set, it indicates all the ADC
      channels have been converted. */
      LPC_ADC->CR &= 0xF8FFFFFF;    /* stop ADC now */
    }
#endif
    [COLOR=Red]ADCIntDone = 1;[/COLOR]      [COLOR=Red]Should this not be inside the above "if" statement?[/COLOR]

3) Also will the following statement stop the ADC ?
      LPC_ADC->CR &= 0xF8FFFFFF;    /* stop ADC now */

     Regards,
    Mohsin
0 Kudos
4 Replies

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by phuc_vn on Thu Jul 14 09:31:32 MST 2011

Quote: mohsin
Hi All,

         I am using LPC1114F in my project. I was looking at the ADC module and have few questions.

1) Whatis the difference between ADINTEN 7:0 and ADGINTEN within AD0INTEN register. I realy can't find any difference between them. Can anyone explain if I am missing anything?

2) Also the example code for burst mode is not very clear. The [COLOR=Red]ADCIntDone[/COLOR] is not being set after all the conversions are complete.

#if BURST_MODE
    channel_flag |= (regVal & 0xFF);
    if ( (channel_flag & 0xFF) == 0xFF )
    {
      /* All the bits in have been set, it indicates all the ADC
      channels have been converted. */
      LPC_ADC->CR &= 0xF8FFFFFF;    /* stop ADC now */
    }
#endif
    [COLOR=Red]ADCIntDone = 1;[/COLOR]      [COLOR=Red]Should this not be inside the above "if" statement?[/COLOR]

3) Also will the following statement stop the ADC ?
      LPC_ADC->CR &= 0xF8FFFFFF;    /* stop ADC now */

     Regards,
    Mohsin


I have same problem with you? if you can solve it, please tell me!! thanks.
Why don't NXP support team help us? Is your sample code correct?
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohsin on Thu Nov 25 09:39:45 MST 2010
Thanks for your reply. If you look at my first post, it contains the code from the example code which is [COLOR=Red]not correct[/COLOR] for the burst mode.

1) I need to use burst mode, but I want to do conversion only once in 5ms.

2) Also what would happen if the overrun error occurs. The data still will be valid. Is this right ?

     Regards
     Mohsin
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Thu Nov 25 08:10:30 MST 2010
Hello Mohsin,

on the LPCXpresso website there is an example of ADC conversion. In this software the Burst Mode can be selected. 

See Import Example Project(s) ...
0 Kudos

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohsin on Mon Nov 22 12:26:44 MST 2010
Hi All,
Can anyone please provide me an example for ADC using LPC1114 in burst mode ?

Thanks,
Mohsin
0 Kudos