NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » ADC help
October 15, 2011 by sonicgadgets |
Going to start off stating that I'm NEW to this. I'm looking at the NERDKIT demo for Temp sensor, and I cannot figure out what code actually links the ADC to PIN 23 (PC0/ADC0). I guess my question is if I wanted to measure something else as well how could I point my code to the next pin (ADC1 or ADC2)? Sorry if i'm asking a stupid question but got to learn some how. -John |
---|---|
October 15, 2011 by hevans (NerdKits Staff) |
Hi John, You want to look at the ADMUX register to multiplex between the different inputs to the ADC. This forum post goes over how to sample from different analog signals. Humberto |
October 15, 2011 by sonicgadgets |
Thank you I think thats what I want. So to recap I would change: ADMUX = 1; or ADMUX = 2;
|
Please log in to post a reply.
Did you know that interrupts can cause problems if you're not careful about timing and memory access? Learn more...
|