- This topic has 2 replies, 2 voices, and was last updated 9 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › reading adc from atmega8
Hi to all,
I am reading adc values using atmega8 controller, the problem is it is always reading 1023 if im changing valus through pot. the code is lik below
#include <avr/io.h>
please anyone tell me the solution
Hello friend
As i come to know there is problem in your "uint16_t ReadADC(uint8_t ch)" function
" while(ADCSRA & (1<<ADSC));" this statement is wrong. As adsc is to start conversion.
You need to write-