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

BASCOM-AVR : GETADC(9) on mega32u4 : NEWTOPIC

$
0
0
Hi, i just try to get a reading from channel #9. This is the code: Config Adc = Single , Prescaler = Auto , Reference = Internal_2.56 Start Adc ... Adc_in = Getadc(9) ... Result is always 512. Portd.6=input (ADC channel #9), PullUp = off I also failed to read from the Temp. Sensor. ... Adcsrb.5 = 1 'channel 8..15 Admux.2 = 1 Admux.1 = 1 Admux.0 = 1 '3 Bit for Temp-Sensor Adcsra.3 = 0 'No interrupt Adcsra.5 = 0 'Auto trigger off Adcsra.7 = 1 'ADC on Adcsra.6 = 1 'Start Waitus 10 Adcsra.6 = 1 'Start second conversion Waitus 10 Adc_in = Adcd 'Read result ... Any suggestions? Thanks in advance Peter [b][color=red](BASCOM-AVR version : 2.0.7.6 )[/b][/color]

Viewing all articles
Browse latest Browse all 20563

Trending Articles