Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: javafiend on June 23, 2008, 09:35:59 AM

Title: ADC pin numbering
Post by: javafiend on June 23, 2008, 09:35:59 AM
I'm slightly confused on the pin numbering for the ADC pins.

When referencing PC0-PC5, how does the number system start?  At 0 or 1?

Example:

does PC0 = 0 or 1
        PC1 = 1 or 2
        PC2 = 2 or 3
and so on.


Edit::
Added visual aid
Title: Re: ADC pin numbering
Post by: bens on June 23, 2008, 01:09:32 PM
I can guess what microcontroller you're talking about from the diagram (ATmega168 or maybe an ATmega8?), but note that it helps if you mention this crucial information explicitly.  The datasheet for your microcontroller has all of this information, so you might want to consider reading through the ADC portion.

PC0 = ADC channel 0
...
PC5 = ADC channel 5
ADC6 = ADC channel 6
ADC7 = ADC channel 7
Title: Re: ADC pin numbering
Post by: javafiend on June 23, 2008, 02:54:43 PM
Yeah, it was the ATmega8/168 picture from the $50 robot tutorial.  And you're right, I should have included that information.

Thanks for the answer, too.  It definitely clears things up.