Pages: [1]   Go Down
Author Topic: Arduino I2C pin mapping for R3  (Read 1224 times)
0 Members and 1 Guest are viewing this topic.
Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have a question regarding the pin mappings for the I2C pins.  I have the adafruit datalogger shield right here http://www.adafruit.com/products/243

It looks like the I2C bus lines are being pulled from the A4 and A5 pins on the arduino.  My question is, can I use this with the leonardo or the UNO R3?

are the I2C pins exclusively on the SDA and SCL pins for the R3 layout, or can I still pull the I2C pins from the A4 and A5?

Thanks!
Logged

Accelerate to 88 miles per hour.

Dallas, Texas
Offline Offline
God Member
*****
Karma: 31
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, the 32U4 places the I2C pins on different physical pins.  Unless the shield can have those pins switched, it will not work with the Leonardo.

Of couse you could implement the I2C via bit bashing, and if you did that you could use any pins you wanted.
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How about the UNO R3? 

that does the same thing right?
Logged

Accelerate to 88 miles per hour.

Germany
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3044
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How about the UNO R3? 

that does the same thing right?

Yes. Works fine for me.
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 31
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No that shield will work on the UNO, or earlier 328 based Arduino's.  It doesn't work on the Leonardo or Megas (not without modification)
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So its jsut the 32U4 that is the issue. thank you!
Logged

Accelerate to 88 miles per hour.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So its jsut the 32U4 that is the issue. thank you!

No, it's what model main processor chip is being used that determines where the I2C pins are mapped to. The mega2560 and 1280 chips use different I2C pins then the 328p chip (and also the 32U4). The Arduino team has made a change to the shield pin layout on their newest boards (starting with the Leonardo board) to help solve this problem for future main boards and future shield boards by placing two new shield pins adjacent to the Aref pin so that the two I2C signals will be at a fixed location no matter what model main processor chip the board uses. That will not help present controller boards (except for the Leonardo) or present shield modules, but does give a 'fix' going forward.

Lefty
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, thanks for all the help!
My brother has already purchased the UNO R2 so I can't really help him. haha.
Logged

Accelerate to 88 miles per hour.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The mega2560 and 1280 chips use different I2C pins then the 328p chip (and also the 32U4). The Arduino team has made a change to the shield pin layout on their newest boards (starting with the Leonardo board) to help solve this problem for future main boards and future shield boards by placing two new shield pins adjacent to the Aref pin so that the two I2C signals will be at a fixed location no matter what model main processor chip the board uses.

This change didn't start with the Leonardo.  The "R3" versions of the Mega and Uno started with  I2C pins next to AREF.  These pins are physically connected to the same pins as A4 and A5 on the Uno.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The mega2560 and 1280 chips use different I2C pins then the 328p chip (and also the 32U4). The Arduino team has made a change to the shield pin layout on their newest boards (starting with the Leonardo board) to help solve this problem for future main boards and future shield boards by placing two new shield pins adjacent to the Aref pin so that the two I2C signals will be at a fixed location no matter what model main processor chip the board uses.

This change didn't start with the Leonardo.  The "R3" versions of the Mega and Uno started with  I2C pins next to AREF.  These pins are physically connected to the same pins as A4 and A5 on the Uno.

I stand corrected, newest Uno  and mega Rev boards support new added shield I2C pins.

Lefty
Logged

Pages: [1]   Go Up
Jump to: