Need help to write program for ADC in avr studio.
using atmega8.
Need help to write program for ADC in avr studio.
using atmega8.
here is the ADC code for ATmega* in AVR studio.....
hope this helpful for u................
nagarajanj21, what the programming language it is?
nagarajanj21, have you any code in C/C++ for ADC?
just take a look at it...
I've done ADC successfully, only using this simple code.
// program_ADC
unsigned int adc_rd;
void main()
{
DDRD = 0xFF; // Set PORTD as output
DDRB = 0x03; // Set PORTB 0&1 as output
while (1) {
adc_rd = ADC_Read(2); // get ADC value from 2nd channel
PORTD = adc_rd; // display adc_rd[7..0]
PORTB = Hi(adc_rd); // display adc_rd[9..8]
}
}
its on 'mikroC pro' .