LPC845 ADC sample rate.

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

LPC845 ADC sample rate.

732 Views
emb01_jtronix
Contributor II

I am using LPC845 and for reference purpose I am running The lpc_adc_basic example and I want to know how to change sampling rate in given example.

Thank you.

Tags (1)
0 Kudos
1 Reply

727 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you have seen that the lpc_adc_basic example uses software triggering mode. As you know that the ADC module of LPC845 supports hardware ADC triggering mode, the following screenshot is the ADC triggering sources, so you can use SCT or CTimer module to generate periodic signal to trigger ADC by hardware, the period is totally dependent on the Timer, but the period of the timer must be less than ADC conversion time.

If you want to control the ADC sampling rate, you just need to set up the Timer period. For your case, if you do not need precise sampling rate, you can use Timer to generate constant time interrupt, in the ISR, you can use software trigger mode.

This is a simple code to set up the ADC hardware triggering mode, hope it can help you

 

Hope it can help you

xiangjun_rong_0-1625640789452.png

 

0 Kudos