How do you program an ADC?

Steps for Configuring ADC

  1. Configure the GPIO pin for ADC function using PINSEL register.
  2. Enable the CLock to ADC module.
  3. Deselect all the channels and Power on the internal ADC module by setting ADCR.
  4. Select the Particular channel for A/D conversion by setting the corresponding bits in ADCR.SEL.
  5. Set the ADCR.

What is ADC in LPC2148?

Introduction. Analog to Digital Converter(ADC) is used to convert analog signal into digital form. LPC2148 has two inbuilt 10-bit ADC i.e. ADC0 & ADC1. ADC0 has 6 channels &ADC1 has 8 channels. Hence, we can connect 6 distinct types of input analog signals to ADC0 and 8 distinct types of input analog signals to ADC1.

What is the use of global data register in ADC?

A/D Global Data Register: This register contains ADC’s DONE bit and the result of the most recent A/D conversion. A/D Status Register: This register contains DONE and OVERRUN flag for all the A/D Channels, as well as the A/D interrupt flag.

What is the resolution of ADC in LPC2148?

10 bit resolution ADC
LPC2148 has the 10 bit resolution ADC. We can use the below formulae to calculate the digital value that will be read by the MCU based on the Resolution of the ADC and Operating voltage.

How do you calculate voltage from ADC?

ADC has a resolution of one part in 4,096, where 212 = 4,096. Thus, a 12-bit ADC with a maximum input of 10 VDC can resolve the measurement into 10 VDC/4096 = 0.00244 VDC = 2.44 mV. Similarly, for the same 0 to 10 VDC range, a 16-bit ADC resolution is 10/216 = 10/65,536 = 0.153 mV.

How does ADC convert analog to digital?

ADCs follow a sequence when converting analog signals to digital. They first sample the signal, then quantify it to determine the resolution of the signal, and finally set binary values and send it to the system to read the digital signal. Two important aspects of the ADC are its sampling rate and resolution.

What is Burst mode in ADC?

In Burst mode, the ADC samples a configurable number of samples as fast as possible after a single trigger. The conversion results are accumulated into a single ADC result. A maximum of 1024 samples can be accumulated on a single ADC conversion trigger.

What pin is used for ADC operational?

LPC2148 has an inbuilt 10-bit Successive Approximation ADC which is multiplexed among 6/8 input pins of ADC0/ADC1. The ADC reference voltage is measured across GND to VREF, meaning it can do the conversion within this range.

What is the convergence time of ADC in LPC2148?

LPC2148 ADC Block LPC2148 has an inbuilt 10-bit Successive Approximation ADC which is multiplexed among 6/8 input pins of ADC0/ADC1. The ADC reference voltage is measured across GND to VREF, meaning it can do the conversion within this range.

What is the output of ADC?

An ADC carries out two processes, sampling and quantization. The ADC represents an analog signal, which has infinite resolution, as a digital code that has finite resolution. The ADC produces 2N digital values where N represents the number of binary output bits.

How do you convert ADC to voltage?

The ADC output is the ratio between the analog-signal voltage and the reference voltage. Any noise on the analog reference causes a change in the converted digital value. For example, with an analog reference of 3.3 V (VAREF = VDDA) and a 1 V signal input, the converted result is (1/3.3) × 4095 = 4D9h.