Computing stuff tied to the physical world

Pins, damned pins, and JeeNodes

In AVR, Hardware, Software on Nov 10, 2011 at 00:01

(to rephrase Mark Twain …)

There is confusion in the ATmega / Arduino / JeeNode world, as brought to my attention again in the forum.

It all depends on your perspective, really:

  • if you want to connect to pins on the ATmega chip, then you’re after “pin 6”, “pin 17”, and “pin 26”
  • if you want to understand the ATmega data sheet, then you’re after names like “PD4”, “MOSI”, and “PC3”
  • if you want to follow Arduino sketches, then you want “digital 4”, “digital 12 11″, and “analog 3”
  • if you want to plug into JeeNode ports, then you’d prefer “DIO1”, “MOSI on SPI/ISP”, and “AIO4”

They are all the same thing.

Well, sort of. If you’re looking at an SMD chip, the pin numbers change, and if you’re using an Arduino Mega board, some names differ as well. They might also be different if you were to look at older versions of the JeeNode. In short: it’s messy because people come from different perspectives, and it’s unavoidable. There is no relation between “pin 4”, “PD4”, “digital 4”, and “DIO4” – other than that they all mention the digit 4 …

For that same reason, diagrams are not always obvious. For example, this one is nicely informative:

Arduino To Atmega8 Pins

But it doesn’t help one bit when hooking up a JeeNode.

Likewise, this one doesn’t really help if you’re after the pins on the ATmega328 chip or Arduino pin #’s:

Screen Shot 2011 11 08 at 13 02 04

Then there’s this overview, but it’s incomplete – only the DIO and AIO pins are mapped to the rest, in a table:

JN colors

This one from TankSlappa uses the DIP chip as starting point (and creates new abbreviations for DIO1, etc, alas):

Affectation GPIO JeeNode

Each of these diagrams conveys useful information. But none of them seem to be sufficient on their own.

Can we do better? I’ll be happy to take suggestions and make a new – c o n v e n i e n t – one-pager.

  1. Hi JC,

    The last one is one I created a while back. I didn’t know the DIO/AIO naming scheme at the time so took to calling them JP (JeePort). Hence JP1D = JeePort 1 Digital.

    I’ve correct this mistake now, and an omitted RFM12B sck label. I’ve also added a touch of colour coding.

    You’re more than welcome to the original document, it’s a .odt (open document) format, so readable in all nice open friendly word processors. So probably anything except Microsoft Office! I use LibreOffice and OpenOffice.

    • Ah yes, sorry for not crediting you (fixed now).

      Oddly enough, I can’t seem to read “.odt” files other than as text, which loses the graphics and striping. But it’s not hard to reconstruct, no worries.

    • There is an option in Libre and OpenOffice to export as pdf as well which generally does a good job of preserving the formatting.

  2. @TanksSlappa: I can open your odt in MS Office 2007, altough at first it tells me the document has an incorrect format. Only the picture of the Atmega is not shown…

    @JC: @work we used to use a nice assignment page with headers & colors (the same colors you use for the JeeNode layout) added to the Atmega layout. The headers show besides the assignment, also the usage (as TankSlappa also already did partially).

  3. @TankSlappa : you odt file is fine. it should be ‘perfect’ if you had enough space to write “digital 14” instead of “D14” ;-) (changing page format to landscape and then the cell is enough large to write “digital”) :-) Thanks again for this scheme !

  4. If you open the document is openoffice and save it in msoffice format everything is ok when opening in msoffice. (Just a tip if you rename a .odt file to a .zip files you can see everything in that file)

  5. I think where you mention “if you want to follow Arduino sketches, then you want “digital 4″, “digital 12″, and “analog 3” digital 12 should be digital 11 ??

Comments are closed.