I am using the on-board ADC to take in a sinusoidal voltage input at 1kHz. I have run into an issue though: the sampling rate is not high enough. I see in the datasheet that the chip supports up to 2 Msamples/second; however, my ADC is not producing the accurate results that I want. I am wanting to know how to change these settings to where I can achieve the highest accuracy possible. I have tried to change the ADC clock settings in the clocks diagram tab but to no avail. I have attached the file with the ADC values (the values that should represent a sine wave) so you can see my issue.
If someone could help, I would greatly appreciate it.
Thanks in advance.
I would start with reading the ADC section of the user manual.
The sampling frequency is determined by your method of triggering a conversion.
I am using a timer in one of my applications (for the LPC54628):
adcConvSeqConfigStruct.triggerMask = ADC_TRG_CTIMER0_MAT3;
Enabling/running the timer will start the sampling.
The ADC clock determines only the ADC-internal timing, e.g. sampling and conversion times.