Author Topic: ADC pin numbering  (Read 2263 times)

0 Members and 1 Guest are viewing this topic.

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
ADC pin numbering
« 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
« Last Edit: June 23, 2008, 12:17:44 PM by javafiend »

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: ADC pin numbering
« Reply #1 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

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: ADC pin numbering
« Reply #2 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.

 

SMF spam blocked by CleanTalk