Pages: [1]   Go Down
Author Topic: Mega2560 pinout to "pin 10"  (Read 489 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys, and thanks for all the awesome help so far.

I'm stumped on the simplest of things - I'm trying to hook up a DS18B20 to my mega2560 and I can't figure out the pinout!  The library refers to "pin 10" - which pin is that?  I've searched and can't find anything that relates programming "pins" to physical pins on this board.

Thanks for the help!
Logged

Netherlands
Online Online
God Member
*****
Karma: 5
Posts: 614
A naughty mind is a joy forever.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

???
I'm not sure what you mean, do you have no pin numbers printed on the PCB of your Mega ?
http://arduino.cc/en/uploads/Main/ArduinoMega2650Front.jpg
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, but there's an analog 10, ADC 10, communication 10, and no digital 10 at all...  I tried all of those and it did not work.

I just did it the hard way and wrote a little routine to brute-force every pin until it found one.  The "digital" double pad on the right's pin numbers are equal to the number that you use in the code (that is to say pin 49 on the header is pin 49 in code).  Still not sure which pin equates to "pin 10" though in code.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The pin labelled '10' in the PWM section is the digital pin 10, which is probably what you're looking for. 

I think you're misreading the board: anything that's not labelled with an 'A' in front is a digital pin.  (ie, A0 is analog input 0, but 0 is digital pin 0).  The communications/PWM/Digital labels are about extra functionality of the pin: the PWM section supports analogWrite, the Communications section has the hardware USART and I2C pins, etc. 

For that matter, treat the 'A' as a +54: A0 is digital pin (54 + 0), that is, 54.
Logged

Pages: [1]   Go Up
Jump to: