Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20824

BASCOM-AVR : Strange behavior ADC7 ATMega328P : NEWTOPIC

$
0
0
When testing the AD channels on a NANO board ATMega328p I am receiving strange values from the AD channel #7 at pin 22 just between the 5V pin and the AD #6. Trying with a potentiometer I receive values ranging from about 18 up to 940 and not from 0 to 1023 as expected extreme sides. It seems also noisy. All other channels works fine with the same code. '=================================== Config Adc = Single , Prescaler = Auto , Reference = Avcc Dim W As Word Dim Z As String * 10 Do W = Getadc(7) 'select the ADC channel on getadc(#) Z = Str(w) Z = Format(z , "0000") Z = "AD7=" + Z Print Z Loop '=================================== There are any special configuration to have this channel working properly ? [b:f90d752281][color=red:f90d752281](BASCOM-AVR version : 2.0.8.1 )[/b:f90d752281][/color:f90d752281]

Viewing all articles
Browse latest Browse all 20824

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>