Lab Program 12 - Analog To Digital Converter
Lab Program 12 - Analog To Digital Converter
• The ADC characterized by resolution. The resolution of ADC indicates the number of digital values.
• So for 10-bit ADC resolution is 10-bit and maximum value will be 1023.
• This means our digital value or discrete level lies between 0 to 1023.
• There is one more term important to understand while dealing with ADC and it is step size.
• Step size is the minimum change in input voltage which can be resolved by ADC. The concept of step size is closely associated
ADC operating frequency is 4.5 MHz (max.), operating frequency decides the conversion time.
Supports power down mode.
Burst conversion mode for single or multiple inputs.
• There are several registers associated with ADC feature but we will mainly discussing about
• ADC Control Register (ADCR) & ADC Global Data Register (ADGDR).
We use ADO.4 to give the analog input and AD0.4 is connected to Pin P0.25.
POT variable resistor is connected to the P0.25
Dr. Harish Kumar B T, Dept of CSE, BIT, Bangalore
ADC Registers
• The two registers Used:
1. ADCR (A/D Control Register) and
2. ADGDR (A/D Global Data register)
void lcd_init()
{
temp2=0x30; // To Make Line-1 and 5*7 matrix operate in Byte mode
lcd_com();
delay(800);
temp1 = 0x28; // To Make Line-2 and 5*7 matrix operate in Nibble mode
lcd_com();
delay(800);
ptr1 = arr;
temp1 = 0xC0; //Display starting address of second line 4 th pos
lcd_com();
delay(800);
while(*ptr1!='\0')
{
temp1 = *ptr1;
lcd_data();
ptr1 ++;
}