Shield pin usage list

Thanks liudr, I started it but Jon's done the hard work.

Looking at the ethernet shield schematics we have

A0 -> WP - write protect
A1 -> DETECT - probably used to detect if the card is inserted
D2 -> SS
D10 -> PD2
D11 -> MOSI
D12 -> SD_CS/MISO
D13 -> SCK

Whether that matches the site I don't know (too late to check now) but it looks like the Arduino site is wrong. There's two revisions of this board, maybe the text refers to the earlier version.


Rob

Graynomad,

I re-read the latest schematic. J1 in the schematic is pins D8-13, J3 is pins 0-7. SS is marked on J1-3, which is pin 10. This is for the ethernet controller. PD2-, an interrupt, is marked at J3-3, which is pin 2 (hopefully the jumper is not connected). SD-CS is marked at J3-5, which is pin 4.

Could you re-check? I'm trying to design a shield compatible with the ethernet shield, which I don't have.

Hi liudr,

Just ckecked the schematics (arduino-ethernet-shield-05-schematic.pdf), I get is this

J1-3 -> SS -> D2

J2-1 -> WP -> A0
J2-2 -> DETECT -> A1

J3-3 -> PD2 -> D10
J3-5 -> SD_CS -> D12

ISP-1 (J3-5) -> MISO -> D12
ISP-3 (J3-6) -> SCK -> D13
ISP-4 (J3-4) -> MOSI -> D11

I don't see them using D4 (I assume by pin 4 you mean digital 4)

What I don't understand is the two highlighted signals. They get MISO from the ISP header, but on the Arduino that's connected directly to J3-5 which they also use for SD_CS. Qué ???

So although these signals do different things on the shield they are connected together on the Arduino.

MISO and SD_CS are electrically the same, so how can the SD card's data output also be it's chip select? :-/

Have I missinterpreted something here?


Rob (confused)

EDIT: Just checked this against shieldlist.org, and it matches.

Have I misinterpreted something here?

For starters:

J3-3 is Arduino digital pin 2 (not 10)
J3-5 is Arduino digital pin 4 (not 12), and is used as the SD Chip select.

From the schematics, it doesn't look like pin 2 is connected to the W5100 interrupt pin, but I don't have a new Shield to inspect. Just look to see whether there is a solder bridge across the contacts of the "INT" component. The Arduino Ethernet library does not use an interrupt from the Wiznet chip, so it doesn't have to be connected here.

The pins used as ICSP connections for MISO, MOSI, and SCK for a Duemilanove or UNO are different than those for a Mega1280 or Mega2560.

If the Shield is plugged onto a board with an ATMega328 (or 168) here are the connections:

MOSI is Arduino digital pin 11
MISO is Arduino digital pin 12
SCK  is Arduino digital pin 13

If the Shield is plugged onto one of the Mega boards they go like this:

MOSI is Arduino digital pin 51
MISO is Arduino digital pin 50
SCK  is Arduino digital pin 52

For the new Ethernet shield, Arduino digital pin 10 is used as Ethernet Chip select, no matter which board it is plugged into. For a '168 or '328 chip, this pin (the SS pin) is also set (by the Ethernet library) to the output mode to initialize the hardware SPI interface circuit in the SPI master mode.

If the Shield is plugged into one of the Mega boards, Arduino digital pin 53 is the SS pin that the Ethernet library sets to the output mode to initialize the hardware SPI interface on the ATmega chip, but is not used on the Ethernet shield (so it can be used for whatever output functionality you would like; just don't make it an input).

Regards,

Dave

Footnolte:
The old Arduino Ethernet Shield used pins 10, 11, 12, and 13 as the SPI port signals (from the digital pin connector, not from the ICSP connector) and, therefore was not compatible with a Mega board without modifications that would bend pins or cut traces to these pins and connect jumpers from the Mega connector way at the end of the board to the signal points on the Shield. It could be done (I did it), but the new way, using the ICSP connector, is (obviously) cleaner. Chalk one up for the Arduino Hardware Design team.

MOSI is Arduino digital pin 11
MISO is Arduino digital pin 12
SCK is Arduino digital pin 13

Agreed, same as my post, but

J3-3 is Arduino digital pin 2 (not 10)
J3-5 is Arduino digital pin 4 (not 12), and is used as the SD Chip select.

Are we looking at the same schematic? I'm using

The Arduino and the shield schematics have J1 and J3 swapped on the page.


Rob

Well...I don't have a way to open the Eagle board file just now, so I can't see how the headers line up with a Duemilanove or a UNO or a Mega board, but regardless of the component designations on the various schematics, here's the deal**:**

There are two eight-pin headers on that Shield schematic.

Position 6 of J1 is clearly marked "PIN13" and position 7 is marked "GND" and position 8 is marked "AREF." Therefore, I infer that position 3 of J3 is "PIN2" and not "PIN10." Similarly, position 5 of J3 must be "PIN4" and not "PIN12."

In other words, J1 on the Shield plugs into J3 on the Duemilanove and J3 on the Shield plugs into J1 on the Duemilanove. (The same designations appear on the old Ethernet shield schematic, and I do have a couple of those, and I can verify that that's the way it is.)

Regards,

Dave

Deary me you're right, J1 = J3 and J3 = J1.

I latched onto the designations assuming that they would be a defined standard not left up to the whim of every PCB designer. I know you normally designate components in a logical progression across/down a PCB but with a standard all important components should be called the same thing by everyone and Arduino is arguably a standard.

You live and learn eh? Sorry for the confusion.


Rob

Alright! Then it's arduino digital pin 4 then. Thank to both of you! I will attach a button to arduino digital pin 2 since it's unlikely used.

Would it be a problem that the 'Shield Image' form accepts a link to an image as well? Saves me (us) a download and upload of the image.

That's possible, it just means that I would have to download and upload it instead. None of the fields on that form are required though so for shields where people don't include an image I just look for one myself. In fact in some cases the images uploaded by submitters are very poor quality so I go and find a better one myself anyway.

Thanks for the suggestion!

Jon

The official Ethernet shield came up as an early problem for me when adding to @GrayNomad's list, because it's been available in several versions. The latest one is (I think) version 5, and the record in the DB is mostly a reference to v4 (including the photo) but the pinouts are for v5.

I'm intending to duplicate the record and have separate entries for v4 and v5.

Jon
Super-cheap prototyping shields: ProtoShield Basic for Arduino | Freetronics

The official Ethernet shield came up as an early problem for me when adding to @GrayNomad's list, because it's been available in several versions. The latest one is (I think) version 5, and the record in the DB is mostly a reference to v4 (including the photo) but the pinouts are for v5.

I'm intending to duplicate the record and have separate entries for v4 and v5.

Maybe have one page for the latest version but then have links off that for previous versions. Saves filling the site up with lots of versions of shields.

Mowcius

Thanks for the great list, now it's far easier to create my Xmas wish list :slight_smile:

An idea came into my mind when reading this discussion. Could shield manufacturers place a mark which pins the shield uses? e.g. a square or a circle around the pinnumbers or just inverse print the number on the shield itself, or don't print the numbers used as these pins are not available? As I have no experience in designing boards I do not know what's possible or easy to do. Are there reasons not to mark the pins? e.g. some pins are optional and others aren't? Different markings?

Just thinking out loud,
Rob

Rob, sounds like an easy thing to do. Maybe some companies would take it on board. I would put a box around them or some kind of other indication like you said.

Mowcius

Hi Mowcius,
Could it be standardized in some way? e.g. in the shield development guidelines? Does such a doc exist? only saw http://arduino.cc/en/Main/ArduinoShields

Rob

Could it be standardized in some way? e.g. in the shield development guidelines?

Possibly but nobody would ever read it. People always do what they like.

It's a good idea though. I will pass it round...

Mowcius

Good idea Rob, that's something I've been telling people for a long time! There's been some discussion of shield design standards in places like this:

One of my personal irks (and one of the reasons for http://shieldlist.org) is not being able to figure out what pins are used on a shield simply by looking at it. I mentioned it in the video review I did mid last year for the WiShield v1, and asynclabs subsequently fixed it in v2. The original video is embedded here:

http://shieldlist.org/asynclabs/wishield-v1

I'm doing a talk about "Arduino Shield Design Considerations" at the Arduino Miniconf in Brisbane, Australia next January, too:

http://lca2011.linux.org.au/wiki/Miniconfs/ArduinoMiniconf

Jon
Arduino-compatible "TwentyTen" with built-in prototyping area: TwentyTen (100% Arduino Compatible) | Freetronics

On a similar note, that's why I came unstuck looking at the Etthernet shield schematic the other day, P1 and P3 where "swapped" between the shield schematics and the Arduino but I assumed that there was a standard and "P1" was the same on all schematics.

Usually you name components in order on a board so they are easy to find but for important, common, and static components like these headers I think they should have standard names. If not P1 etc then "Power", "Analogue" etc. This is often done on the PCB as mentioned, but they they should have standard names on the schematics.

This is a good argument for the Apple model whereby a single entity defines what will be done and there's little room for interpretation. That's not the model we want here I guess but some standardisation should be striven for.


Rob

Hi Jon,
Thanx for these sites, lot of good info. these sites should be mentioned on http://arduino.cc/en/Main/ArduinoShields but I have no rights :frowning:
Furthermore you might put a link "Shield Design Considerations" on the homepage of http://shieldlist.org/ and teach the world :slight_smile:

Rob

One of my personal irks (and one of the reasons for http://shieldlist.org) is not being able to figure out what pins are used on a shield simply by looking at it. I mentioned it in the video review I did mid last year for the WiShield v1, ....

;D I used pet peeve in my write up here last week

If you have ever seen Jon Oxer, author of the book Practical Arduino, discuss a shield, as he does in this video review of AsyncLabs WiShield for Arduino, you would probably easily observe that one of his pet peeves is designs that dont let you know shield pin assignments when using the shield.

Because I couldn't catch the term you used, what was the term at
4:42 was it bug bears?Video 4:42

One of my concerns has been I would like to add more to the list but just can't tell what pins are used on some boards I have found, that aren't in the database, but I just I dont know how to enter them.

My concern was if I entered them with the wrong pins(as in guesses) it might stop someone who would know would then not enter the right info, so I just chose not to enter them.

Would you still like the info entered?

Om nom nom free stuffs :slight_smile:

Do I get something for each shield I submit or just the one? :smiley:

Would it be tricky to add the ICSP header onto your pin usage diagram? Quite a number of shields use it now (especially to become mega compatible).

What about Mega shields, you accepting those too?

Mowcius