Society of Robots - Robot Forum
Software => Software => Topic started by: machinegunmax on March 16, 2010, 12:48:10 PM
-
Hi, I'm fairly new to programming and I have no idea how to initialise the analogue to digital conversion process. I have connected my inputs to pins which have an a/d converter function. I am using an atmega168, I am writing the program in C. If anyone has knows any good tutorials for a/d conversion or knows anywhere which explains what things like ADCMUX, ADCSRA, or prescalers are that would be great. Any example code will be greatly appreciated.
-
There is an excellent tutorial about ADC for AVR in avrfeaks.net.
Also try google and don't forget the read the datasheet.