Arduino Forum

Using Arduino => Microcontrollers => Topic started by: nickgammon on Dec 21, 2011, 11:32 pm

Title: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Dec 21, 2011, 11:32 pm
I'm not sure where to post this, but here goes ...

Below is a modified photo of the Uno Rev3 board, with annotations about the extra meanings of some pins (not printed on the board):

(http://forum.arduino.cc/index.php?action=dlattach;topic=84190.0;attach=181990)

I personally find that when trying to hook up I2C or SPI, I can never remember which pin is SDA and which is SCL. Hopefully this photo will help others to quickly connect up their systems.

Earlier boards are similar except that they don't have the ICSP header for programming the USB interface chip, and the extra SDA/SCL sockets for use with I2C.

I find that the pins on the ICSP header (on the right) are useful for grabbing an extra +5/Gnd combination if I need to power other devices (or for hooking up a multimeter or logic analyzer).
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: ProfePaco on Dec 22, 2011, 09:48 am
Thanks for sharing!
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Dec 22, 2011, 10:43 pm
You are welcome.

I've put the same photo on my website, with various annotations about what the abreviations (eg. I2C, SPI) mean, and some useful stuff about maximum ratings:

http://www.gammon.com.au/uno
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: robtillaart on Dec 28, 2011, 12:08 pm
Quote
I can never remember which pin is SDA and which is SCL


SCL = Simply Connect Last (at least on an Arduino 328)

SDA = Shouldbe Dhe Ather (The other)   ;)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: liuzengqiang on Dec 31, 2011, 06:23 am
That mounting hole on the top left side was already hard to use and this time with the two additional pins it should be impossible to use now.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: KirAsh4 on Dec 31, 2011, 06:45 am
Really?  I'm using that mounting hole just fine with an R2.  I suspect the R3 will be tight and might even require some shaving of the screw/bolt head, but it should still work just fine.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: JChristensen on Dec 31, 2011, 06:49 am
Nice job Nick. Working on breadboards a lot, I have a cheat sheet (attached) which shows the DIP pin numbers, the Arduino pin numbers, and the AVR pin names.


That mounting hole on the top left side was already hard to use and this time with the two additional pins it should be impossible to use now.


True that. I wonder why they felt compelled to add redundant I2C pins. I've found the existing ones to be quite adequate...
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: mariusl on Dec 31, 2011, 04:31 pm
Thanks for the cheat sheet Jack. I do a lot of stand alone development (not using the Arduino board) and I always have to look up the pins. This will help a lot.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: westfw on Jan 04, 2012, 02:54 am
Quote
why they felt compelled to add redundant I2C pins.

multiple cpu compatibility.   It won't always be the case that the I2C shares pins with the ADC, and it would be nice to have shields that continue to work.

It's the same issue as SPI on the existing Uno vs MEGA.  The original ethernet shield assumed that the SPI pins were D13..11, and it didn't work with the MEGA at all, without stringing jumpers all over...
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: JChristensen on Jan 04, 2012, 05:40 am

multiple cpu compatibility.


Makes sense. Thanks.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: skyjumper on Jan 15, 2012, 11:32 pm
Dumb question... Did they change the USB interface chip and, why does its firmware need to be upgraded?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Jan 15, 2012, 11:55 pm
The older Uno had an Atmega8U2-MU USB interface. The Rev 3 Uno has an Atmega16U2-MU chip.

I presume the ability to upgrade the firmware is to allow for if it turns out to have some sort of bug, or maybe just for future expansion.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: cyclegadget on Jan 16, 2012, 07:39 am
Here is a small part of the info from this link: http://www.ladyada.net/library/arduino/unofaq.html


  The USB controller chip has moved from an atmega8u2 (8K flash) to an atmega16u2 (16K flash). This does not mean that you have more flash or RAM for your sketches this upgrade is for the USB interface chip only. In theory this will mean that it will be easier to have low level USB interfaces such as MIDI/Joystick/Keyboard available. However these are only theoretical at this time, there is no example code or firmware which will actually do this.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Jan 16, 2012, 08:10 am
Nick,  you didn't mention the extra pins on the power header. I think one has no connection the other is +5v also, tho not labelled that on the card.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Jan 16, 2012, 09:24 pm
True, not on the photo. I mention the IOREF pin on the page I linked to.

http://www.gammon.com.au/uno
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: WizenedEE on Jan 30, 2012, 08:05 am

I find that the pins on the ICSP header (on the right) are useful for grabbing an extra +5/Gnd combination if I need to power other devices (or for hooking up a multimeter or logic analyzer).


I generally use the giant USB socket for a gnd to connect my multimeter to.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: opal_1970 on Feb 05, 2012, 10:11 pm
Hey thanks alot for sharing, this is really useful.

(cool, and I am the 1970th person to view this)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: pictux on Feb 16, 2012, 03:38 pm
Have you already share this in the playground?
It's very useful!
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: sellonoid on Mar 06, 2012, 08:22 pm
Please pardon the somewhat off topic post....


I just bought an R3 Uno and it has the DIP processor.

Are the surface mount versions out yet, and are there any advantages to the surface mount types?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Mar 06, 2012, 09:14 pm
Surface mount was used on Unos when DIPs where in short supply for a while.
Same die within each package.
Surface mount does allow access to two analog-input only pins, but they are not connected to any header pins on the Uno.
So really just a disadvantage when you smoke the chip by accident and need to replace it.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Mar 06, 2012, 09:30 pm
I like the removable ones. After all, if you test new sketches every day (as I do) then you will wear it out eventually. Rather than buying a new board for $30 I can replace the processor for $5. Similarly if I do something silly and burn out an output pin.

When you are ready to go you can buy one of the surface-mounted "tiny" versions that will be physically smaller and do the same things.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: marcello.romani on Mar 06, 2012, 09:36 pm
Thanks Nick, that photo is useful. A very good page on your site, too.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Nishant_Sood on Mar 14, 2012, 05:06 am
JP 2 is for?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Mar 14, 2012, 05:21 am
I wondered that when I was doing the picture. See this:

http://arduino.cc/forum/index.php?topic=83829.0
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: BillO on Mar 27, 2012, 02:42 am
Thanks for the pictorial doc.

BTW, what is the scoop on why they the second access to A4 and A5 (SCL & SDA).  Why would they be needed twice?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Mar 27, 2012, 03:00 am
On the Mega SDA and SCL are in different spots. I am guessing they wanted to make it so shields could be compatible with both the Mega and the Uno if they use I2C.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Mar 27, 2012, 03:18 am
paraphrasing Blazing Saddles:
"You said I2C twice."
"I like I2C."
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: bperrybap on Mar 27, 2012, 09:23 pm
I actually prefer what Seeeduino and iTeeduino did for i2c on their boards by providing a separate 4 pin header.
That way everything you need is there with a simple 4 pin connector/cable and you can still
use it even when a shield is being used.

--- bill
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nigeljohnson73 on Apr 12, 2012, 05:11 pm

Below is a modified photo of the Uno Rev3 board, with annotations about the extra meanings of some pins (not printed on the board):
Earlier boards are similar except that they don't have the ICSP header for programming the USB interface chip, and the extra SDA/SCL sockets for use with I2C.


Are the I2C pins on the D8-D13 header the same as the ones on A4 and A5? If so, are these in the same place as on a Mega because the A4 and A5 pins moved to D20 and D21 on the Mega and that's a pain for building a shield.

Thanks
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Apr 13, 2012, 03:03 am
"Are the I2C pins on the D8-D13 header the same as the ones on A4 and A5?"
On Uno, Yes.

"are these in the same place as on a Mega because the A4 and A5 pins moved to D20 and D21"
No.
Mega has seperate functions pins for I2C, are not on A4/A5.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: SarahC on May 01, 2012, 12:17 am
Just a heads up peeps!

Some of the AVRISP ribbon cables - to 6 pin plugs have the little triangle denoting pin 1, pointing to pin 5 instead!

I noticed the colors of the wires were accurate, so I made sure the black cable was in the opposite corner to the white dot. =)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on May 01, 2012, 12:40 am
Yes, my USBtinyISP cable is crimped the opposite way around to the AVRISP one. But I just put the red wire on pin 1. Can be a trap if you are used to the cable snaking a certain way across the board. :)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Docedison on May 04, 2012, 12:51 am
#2 screws (2/56) screws will work on that hole... (all holes)
But just barely.
My question is... Why are the pins on the digital side of the board
Not on a common (0.1"/2.54 mm) grid?. The spacing on the Digital
side of the board between connectors is 'off' grid by .05"

Fine Job, Nick. Saves a lot of difficulty for those of us who are
hard of 'seeing'.

Doc.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: BillO on May 08, 2012, 04:12 pm
That is the great un-answered question.  My guess is, it was a mistake on the first board that just kept rolling forward.  The only other alternative is that they wanted you to buy accessories from them, but given the origins of this error and the mind-set of the Arduino team initially, I tend to discount this explanation.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on May 08, 2012, 10:40 pm
It does have the advantage, intentionally or not, that  you can't (easily) rotate a shield around 180 degrees and insert it the wrong way around.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Claghorn on Jun 01, 2012, 03:37 pm
I just got an AVRISP mkII and looking at the description of it's cable, I get the impression that the nearly invisible arrow head mark on the end of the cable (same side of the connector as the red wire) should be plugged into the ICSP header on the R3 to match the nearly invisible white dot on the silkscreen. (Correct me if I'm wrong before I blow something up :-).
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: mariusl on Jun 01, 2012, 05:19 pm
Correct.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Jun 01, 2012, 11:17 pm
There's an arrow? (looks carefully).

I just make sure the red wire lines up with the dot on the silkscreen.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Claghorn on Jun 02, 2012, 04:51 am

There's an arrow? (looks carefully).


Only in the right light: It is a small triangle that isn't as glossy as the rest of the connector :-).
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: poriet on Jun 26, 2012, 12:53 am
Hello Nick,
Only just today come across your website which looks pretty good.

BTW, I'm a newbie and many of the replies are heavily jargon-laden and thus tricky to follow. This may have been covered already, but.......
The SCK and SCL have 2 lots of connectors. I got a copy of an Arduino Uno from 'Sainsmart' in an offer I couldnt refuse.
On this board the SCL and SCK outputs on the digital side of the board have been omitted.

Perhaps you can sort out a confusing issue for me. A new ATMEGA328 needs to have the bootloader loaded before it will accept sketches. I dont understand why. A blank PIC chip can be programmed with a Hex file. Is this because the sketch is being loaded into the chip via the TX and RX pins and not through the ISCP header  ( MOSI/MISO)?

Bruce
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Jun 26, 2012, 01:21 am
"On this board the SCL and SCK outputs on the digital side of the board have been omitted."
Sounds like an older Rev board.
SCL/SDA are accessed thru th A4/A5 pins.

Question 2 -Yes.  Blank chip gets bootloader installed via SPI pins SCK, MOSI, MISO; bootloader then runs and accepts data via serial port and loads it into memory.
HEX file can also be downloaded via SPI pins; sketch then runs immediately without bootloader checking to see if a sketch download attempt was started.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Jun 26, 2012, 01:29 am

A new ATMEGA328 needs to have the bootloader loaded before it will accept sketches. I dont understand why. A blank PIC chip can be programmed with a Hex file.


It's the same as PIC really. See this page:

http://www.picaxe.com/What-Is-PICAXE

From that:

Quote
If you purchase 'blank' PIC chips they will not work in the PICAXE system, as they do not contain the PICAXE firmware. Therefore always buy pre-programmed 'PICAXE chips'.


So the PICAXE also needs a bootloader before it accepts sketches, via the serial port. In both cases you can use the ICSP to upload things (including the bootloader). In both cases, once you have the bootloader you can upload further sketches via the serial port.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: poriet on Jun 26, 2012, 10:44 am
OK Thanks guys: the fog is starting to clear a little. Onwards and upwards!
Bruce
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: bperrybap on Jun 26, 2012, 10:59 pm

From that:

Quote
If you purchase 'blank' PIC chips they will not work in the PICAXE system, as they do not contain the PICAXE firmware. Therefore always buy pre-programmed 'PICAXE chips'.


So the PICAXE also needs a bootloader before it accepts sketches, via the serial port. In both cases you can use the ICSP to upload things (including the bootloader). In both cases, once you have the bootloader you can upload further sketches via the serial port.


PICAXE is quite a bit different from Arduino.
PICAXE really provides a language and uses an interpreter for tokenized code. You cannot extend the language.
You can only do the commands provided in the language.

Arduino is not really a language but a framework. Since it uses C/C++ it is infinitely extensible.

Where you can run into issues on PICAXE is that it you cannot extend the language so if you want
to support some new device that is not supported by the language, you have implement it by using
the interpreted language constructs which will not be nearly as fast as the machine code you can get
when using C/C++

On the positive side, PICAXE includes some excellent debugging tools - which is something that the Arduino does not have.


-- bill
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: mixania on Sep 09, 2012, 05:44 pm
Hey guys, I'm just curious and I want to answer some questions:

1.What is SCL and SDA pins for? Are these some how helpful when integrating into a project?

2.What is Interrupt pins 1 and 0 for?

3.And how to use the TX and RX pins?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Sep 09, 2012, 05:57 pm
1. Used for I2C communications. SCL is the clock, SDA is the data line. Master generates clock and outputs data, master generates clock and slave responds with data. An example of a I2C device is the DS1307 real time clock
http://www.dipmicro.com/store/DS1307N
2. Interrupts used to capture signal that needs to be responded to quickly.
3. Tx & Rx used for serial communications where the receiver creates its own timing to determine when the data bit being transmitted is to be sampled, gnerally 16 samples per bit.
Usage:
Serial.begin(9600); // used in void Setup() to start the serial library

Transmit side:
Serial.print("hey there"); // sends out a message

On receive side, fill an array with incoming data - Very basic usage, really needs expanding to be useful
Code: [Select]

if (Serial.available()>0){ // data coming in?
dataArray[x] = Serial.read();
x=x+1;
}
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: westfw on Sep 10, 2012, 02:06 am
Quote
1.What is SCL and SDA pins for? Are these some how helpful when integrating into a project?

The SCL and SDA pins are for I2C (aka IIC, TWI) communications, which permits multiple peripherals to be connected to the AVR using only two pins.  It's sort of a mini-network; each external I2C peripheral has an address.  It's "medium speed" (400kbps), widely used by things like A2D converters, external EEPROM memories, "IO expanders" and similar.
The reason that these pins were added to the Arduino connector area is that they aren't always on the same pins of different microcontrollers.  For example, SDA shares PC4 on the Atmega328 used on Uno (normally one of the analog pins), and PD1 on the mega32u4 used on Leonardo.  By having separate connector positions on the board, you can (theoretically) connect i2c peripherals in the same place on different boards, and have "low-effort" compatibility using an appropriate library.

Title: Re: Arduino Uno Rev3 pinouts photo
Post by: bperrybap on Sep 10, 2012, 02:29 am
Given the amount of peripheral devices that use a 4 pin connector for I2C it sure would have been
nice if the board had a set of 4 holes for a header/connector for the I2C pins
that included power like the Seeeduino boards.
That also allows it to be used with other non i2C shields.

--- bill
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Sikter on Sep 21, 2012, 08:43 pm
Where are "jumper" pins on this card. I tested the card and it works fine using USB as supply.

Now I want to connect it to external power supply and ...

(http://imageshack.us/a/img849/6177/img1738l.jpg) (http://imageshack.us/photo/my-images/849/img1738l.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

What is polarity for external power supply socket?
Is GND around and + in the middle?

thanks
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Sep 22, 2012, 01:05 am
The original photo shows the polarity:

(http://gammon.com.au/images/ArduinoUno_R3_Pinouts.png)

Note the red "+" on the middle of the connector.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: retrolefty on Sep 22, 2012, 01:56 am

Where are "jumper" pins on this card. I tested the card and it works fine using USB as supply.

Now I want to connect it to external power supply and ...

(http://imageshack.us/a/img849/6177/img1738l.jpg) (http://imageshack.us/photo/my-images/849/img1738l.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

What is polarity for external power supply socket?
Is GND around and + in the middle?

thanks


There is no jumper pin required for using external power. There is an electronic voltage selector circuit on the board that detects if there is DC voltage on the external power connector (or the Vin) pin of 7.5 to 12vdc. If there is both USB power and external power available the circuit gives priority to the external voltage and switches off the USB power, however the USB communication is still available. And yes the center pin is the positive voltage and the sleeve is negative, however there is a series wired diode in the circuit that prevents board damage if one accidentally plugs in reverse polarity voltage, the board won't work as such, but there will be no damage done.

Lefty
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Sikter on Sep 22, 2012, 10:47 am
Thank you Lefty, you are Righty actually.
I didn't dare to power it externally before I was sure.
Been waiting 2 weks for it and didn't want to take any chances.
What Rev is my board?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Nishant_Sood on Sep 24, 2012, 04:11 pm
I like the hackability of the board who's pic is posted 1 post above they even thought about the crystal place there if in case one needs to clock it at a different rate rather than on whcih rate the resonator actually is.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: WinstonP on Nov 09, 2012, 05:59 am
It might be nice to be able to program the Atmega16U2-MU to be able to load sketches through it's ISP connector.
Maybe even chain to subroutines in the Atmega16U2-MU's storage memory. Maybe future RTC built onto the next UNO revision.

(sorry, my meds are causing me to ramble on....)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Quick5pnt0 on Jan 17, 2013, 09:01 pm

Thank you Lefty, you are Righty actually.
I didn't dare to power it externally before I was sure.
Been waiting 2 weks for it and didn't want to take any chances.
What Rev is my board?


Your Uno is rev2.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: czetie on Mar 14, 2013, 01:04 am
IHNTA except "thank you". This thread was my first foray into the forums (complete newbie, curious about the pins not mentioned in Getting Started...) and delighted to find that you guys are helpful, clear, and above all patient. It almost makes me want to have a real problem so I can ask a question :)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: hiduino on Mar 14, 2013, 04:03 am


What Rev is my board?



Actually, your board in the picture is a clone of the Uno R1, the R2 board have the USB 8U2 chip rotated 45 degrees.

Title: Re: Arduino Uno Rev3 pinouts photo
Post by: mcwhorpj on Mar 19, 2013, 06:26 pm
I apologize for this silly question, but I have had some difficulty figuring it out and hope you can give me help. The VCC connection on the ICSP header (on the right side of your picture) . . . can you power the arduino through this pin? If so, can you power it with an unregulated source. Or, is this pin for providing power to other components. Just looking for clarification on what I can do with VCC on this pin. Thanks!
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Mar 19, 2013, 08:49 pm
It has to be regulated 5V, it does not go through the reverse-protection diode or voltage regulator.

However you can power the board from it, which is what happens when you plug in an ICSP cable for programming purposes.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: mcwhorpj on Mar 20, 2013, 01:38 am
Thank you Nick, that is a huge help.
Paul
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Apr 16, 2013, 01:08 pm

I've put the same photo on my website, with various annotations about what the abreviations
http://www.gammon.com.au/uno


Hi Nick, on your website correct this
Quote
giving a reading between 0 (for 0V) and 1024 (for 5V) using the analogRead function


to:
Quote
between 0 and 1023  ;)


bie
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Apr 16, 2013, 01:23 pm
Done, thanks. :)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: arduinomagbit on Apr 28, 2013, 05:53 pm
there really is so many thing to learn....


I'm not sure where to post this, but here goes ...

Below is a modified photo of the Uno Rev3 board, with annotations about the extra meanings of some pins (not printed on the board):

(http://gammon.com.au/images/ArduinoUno_R3_Pinouts.png)

I personally find that when trying to hook up I2C or SPI, I can never remember which pin is SDA and which is SCL. Hopefully this photo will help others to quickly connect up their systems.

Earlier boards are similar except that they don't have the ICSP header for programming the USB interface chip, and the extra SDA/SCL sockets for use with I2C.

I find that the pins on the ICSP header (on the right) are useful for grabbing an extra +5/Gnd combination if I need to power other devices (or for hooking up a multimeter or logic analyzer).
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Cactusface on Aug 11, 2013, 08:23 pm
Hi Nick,
              To someone like me who only just took up the Arduino  and had my Uno for about 3 days, that printout is going to be very useful!!  All I have to do now is learn C? Well I'm getting there a few simple things, but lots to learn..

Regards
Mel.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: tlharv on Sep 26, 2013, 07:05 pm
Some great information here... I've been using Nick's guide at http://www.gammon.com.au/forum/?id=11637 to successfully bootload the ATMega328P-PU and get a sketch uploaded using an FTDI friend.  Thanks for making such clear instructions, Nick!

Jack, great excel-version pinout of the '328.  Is this pinout the same whether it's bootloaded at 8MHz (Lilypad) or 16MHz (using an external resonator)?

Thanks!
Tom
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Sep 26, 2013, 10:38 pm
The speed won't affect anything except ... speed. Nor will the bootloader. That is just for getting new code on the board.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: terryking228 on Nov 21, 2013, 04:31 pm
Hi Nick,

Nice work on this helpful graphic. To say nothing of all the other great info I use on your site.

May I use this image on the ArduinoInfo.Info WIKI? I'd also link back to your page...

Other, if you have time, please take a look at this beginning discussion of Timer Conflicts:
http://forum.arduino.cc/index.php?topic=199930.0

Thanks!
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Nov 21, 2013, 08:25 pm
Sure you can use it.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: cjdelphi on Jun 26, 2014, 03:41 pm

Quote
I can never remember which pin is SDA and which is SCL


SCL = Simply Connect Last (at least on an Arduino 328)

SDA = Shouldbe Dhe Ather (The other)   ;)


Lol I came up with my own rule, but yours makes morse sense...

C before D.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: SkobyMobil on Aug 12, 2014, 05:13 pm
Hi there,
http://pighixxx.com/unov3pdf.pdf
http://pighixxx.com/atmega328v3_0.pdf
http://pighixxx.com/atmega382mlfv3_0.pdf


Greeting and fun
Andreas
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: irishcream24 on Mar 11, 2015, 01:44 pm
This might have been answered elsewhere, but what can you do with the "ICSP for USB interface" pins?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Mar 11, 2015, 01:57 pm
flash a new firmware on the usb controller chip.
It is an Atmel mcu and you can do whit it many more that a simple usb to serial converter  ;)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: CrossRoads on Mar 11, 2015, 02:09 pm
They connect in parallel to D11-12-13, Reset, +5, Gnd.
1 or 2 shields connect to those pins to grab those signals.
I would agree with Testato, generally just used for burning bootloader onto blank parts, and direct programming with no bootloader via File:Upload Using Programmer command.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Mar 11, 2015, 02:29 pm
No CrossRoads,
he speak about the ICSP for the 8/16u2  ;)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: irishcream24 on Mar 12, 2015, 11:03 am
so am I understanding this right then, that the 6 set of pins on the right of the board does exactly the same as the 6 on the top left?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Mar 13, 2015, 09:46 am
On the board is there two mcu, so you have two icsp connector

The one on the right is connected to the 328 micro, the one on the left is connected tu 8/16u2 micro.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: stuartyh on Aug 27, 2015, 11:14 pm
While looking for pinouts for the Arduino boards I came across this site which I found to e very valuable.
It covers quite a few of the boards that I experiment with and it helped me a lot.
 here is the site for it.

http://www.pighixxx.com/test/

Do not mind the "tripple x" in the URL, it is not a porn site and the only thing it exposes are the pins for the various boards.
Hope this helps.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Sep 04, 2015, 11:16 am
Yes, he is an italian, this website is the best reference on arduino pinout
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: 2n3904 on Jan 20, 2016, 03:23 pm
i found this post on Google and just want to thank you. :)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: ruma29 on Feb 15, 2016, 06:19 am
Regardless which electronic component  is in question I do have problem to find geometrical information about component such as dimensions: L x W x H

Please look this as example which has bunch of information but not dimension:

http://www.engineersgarage.com/electronic-components/arduino-pro-mini-pinout

can someone help where to get geometrical information. is there any 3D CAD model of electronic components?

Thank you for any help.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: aljorni on Feb 17, 2016, 05:22 pm
thank you
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Chaitanya1 on Mar 25, 2016, 12:08 pm
Thanks for the cheat sheet... :)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: BIGMAC1 on Apr 24, 2016, 07:19 pm
Hi All, I have a few questions about UNO pinout.

What is (SPI) SCK?
(SPI) MISO
(SPI) MOSI
(SPI)SS
What is PC0 PC1.....PC5
What is PB0, PB1 ......PB5

Is there a website that describe UNO in detail?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: ChrisTenone on Apr 24, 2016, 08:17 pm
Hi All, I have a few questions about UNO pinout.

What is (SPI) SCK?
(SPI) MISO
(SPI) MOSI
(SPI)SS
What is PC0 PC1.....PC5
What is PB0, PB1 ......PB5

Is there a website that describe UNO in detail?
Those are the names of various pins. The ultimate reference is the Atmel datasheet for the processor. But you can get started on this (http://www.arduino.cc/en/Main/ArduinoBoardUno) page.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: devilbehra on Nov 17, 2016, 01:02 pm
Hi Nick,

though it is a very dumb question to ask but I am relatively a newbie to arduino.

I read somewhere to toggle pin 13 we can do it by toggling "PINB" by 0x20.

what does this mean? and what are the nicknames and toggling values of other pins, if any?

would really appreciate any help you can provide


thanks in advance
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Nov 17, 2016, 10:06 pm
I read somewhere to toggle pin 13 we can do it by toggling "PINB" by 0x20.

what does this mean? and what are the nicknames and toggling values of other pins, if any?
It means you write to the pin like this:

Code: [Select]
void setup()
  {
  pinMode (13, OUTPUT);
  }
void loop()
  {
  PINB = 0x20;    // toggle D13 by writing 1 to it
  delay (500);
  }



Better documenting would be to use the "bit" macro:

Code: [Select]
 PINB = bit (PINB5);   // toggle D13 by writing 1 to it


That is, the 5th bit on Port B.

The processor is designed so that writing a 1 to a PINx register toggles the value in the corresponding output port (PORTx). Any pins not written with a 1 are unchanged (not set to zero).






Quote
and what are the nicknames and toggling values of other pins, if any?
You can get them from various places, for example here:

https://www.arduino.cc/en/Hacking/PinMapping168 (https://www.arduino.cc/en/Hacking/PinMapping168)

Basically you need to look at that and see what port you want (in this case you see "digital pin 13") on the RH side. Then look across and see PB5 which is Port/Pin "B", bit 5. So pin 12 (on the board) would be PB4 and so on.

So to toggle that D12 you would write to:

Code: [Select]
PINB = bit (PINB4);   // toggle D12 by writing 1 to it


You use similar logic for all the other pins.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Nov 17, 2016, 10:17 pm
I wrote a script that generates the code for all the Atmega328 pins:

Code: [Select]
// --- PIN MODE: OUTPUT  ---

  DDRD |= bit (0); // pinMode (0, OUTPUT);
  DDRD |= bit (1); // pinMode (1, OUTPUT);
  DDRD |= bit (2); // pinMode (2, OUTPUT);
  DDRD |= bit (3); // pinMode (3, OUTPUT);
  DDRD |= bit (4); // pinMode (4, OUTPUT);
  DDRD |= bit (5); // pinMode (5, OUTPUT);
  DDRD |= bit (6); // pinMode (6, OUTPUT);
  DDRD |= bit (7); // pinMode (7, OUTPUT);
  DDRB |= bit (0); // pinMode (8, OUTPUT);
  DDRB |= bit (1); // pinMode (9, OUTPUT);
  DDRB |= bit (2); // pinMode (10, OUTPUT);
  DDRB |= bit (3); // pinMode (11, OUTPUT);
  DDRB |= bit (4); // pinMode (12, OUTPUT);
  DDRB |= bit (5); // pinMode (13, OUTPUT);
  DDRC |= bit (0); // pinMode (A0, OUTPUT);
  DDRC |= bit (1); // pinMode (A1, OUTPUT);
  DDRC |= bit (2); // pinMode (A2, OUTPUT);
  DDRC |= bit (3); // pinMode (A3, OUTPUT);
  DDRC |= bit (4); // pinMode (A4, OUTPUT);
  DDRC |= bit (5); // pinMode (A5, OUTPUT);

// --- PIN MODE: INPUT  ---

  DDRD &= ~bit (0); // pinMode (0, OUTPUT);
  DDRD &= ~bit (1); // pinMode (1, OUTPUT);
  DDRD &= ~bit (2); // pinMode (2, OUTPUT);
  DDRD &= ~bit (3); // pinMode (3, OUTPUT);
  DDRD &= ~bit (4); // pinMode (4, OUTPUT);
  DDRD &= ~bit (5); // pinMode (5, OUTPUT);
  DDRD &= ~bit (6); // pinMode (6, OUTPUT);
  DDRD &= ~bit (7); // pinMode (7, OUTPUT);
  DDRB &= ~bit (0); // pinMode (8, OUTPUT);
  DDRB &= ~bit (1); // pinMode (9, OUTPUT);
  DDRB &= ~bit (2); // pinMode (10, OUTPUT);
  DDRB &= ~bit (3); // pinMode (11, OUTPUT);
  DDRB &= ~bit (4); // pinMode (12, OUTPUT);
  DDRB &= ~bit (5); // pinMode (13, OUTPUT);
  DDRC &= ~bit (0); // pinMode (A0, OUTPUT);
  DDRC &= ~bit (1); // pinMode (A1, OUTPUT);
  DDRC &= ~bit (2); // pinMode (A2, OUTPUT);
  DDRC &= ~bit (3); // pinMode (A3, OUTPUT);
  DDRC &= ~bit (4); // pinMode (A4, OUTPUT);
  DDRC &= ~bit (5); // pinMode (A5, OUTPUT);

// --- DIGITAL WRITE: HIGH  ---

  PORTD |= bit (0); // digitalWrite (0, HIGH);
  PORTD |= bit (1); // digitalWrite (1, HIGH);
  PORTD |= bit (2); // digitalWrite (2, HIGH);
  PORTD |= bit (3); // digitalWrite (3, HIGH);
  PORTD |= bit (4); // digitalWrite (4, HIGH);
  PORTD |= bit (5); // digitalWrite (5, HIGH);
  PORTD |= bit (6); // digitalWrite (6, HIGH);
  PORTD |= bit (7); // digitalWrite (7, HIGH);
  PORTB |= bit (0); // digitalWrite (8, HIGH);
  PORTB |= bit (1); // digitalWrite (9, HIGH);
  PORTB |= bit (2); // digitalWrite (10, HIGH);
  PORTB |= bit (3); // digitalWrite (11, HIGH);
  PORTB |= bit (4); // digitalWrite (12, HIGH);
  PORTB |= bit (5); // digitalWrite (13, HIGH);
  PORTC |= bit (0); // digitalWrite (A0, HIGH);
  PORTC |= bit (1); // digitalWrite (A1, HIGH);
  PORTC |= bit (2); // digitalWrite (A2, HIGH);
  PORTC |= bit (3); // digitalWrite (A3, HIGH);
  PORTC |= bit (4); // digitalWrite (A4, HIGH);
  PORTC |= bit (5); // digitalWrite (A5, HIGH);

// --- DIGITAL WRITE: LOW  ---

  PORTD &= ~bit (0); // digitalWrite (0, LOW);
  PORTD &= ~bit (1); // digitalWrite (1, LOW);
  PORTD &= ~bit (2); // digitalWrite (2, LOW);
  PORTD &= ~bit (3); // digitalWrite (3, LOW);
  PORTD &= ~bit (4); // digitalWrite (4, LOW);
  PORTD &= ~bit (5); // digitalWrite (5, LOW);
  PORTD &= ~bit (6); // digitalWrite (6, LOW);
  PORTD &= ~bit (7); // digitalWrite (7, LOW);
  PORTB &= ~bit (0); // digitalWrite (8, LOW);
  PORTB &= ~bit (1); // digitalWrite (9, LOW);
  PORTB &= ~bit (2); // digitalWrite (10, LOW);
  PORTB &= ~bit (3); // digitalWrite (11, LOW);
  PORTB &= ~bit (4); // digitalWrite (12, LOW);
  PORTB &= ~bit (5); // digitalWrite (13, LOW);
  PORTC &= ~bit (0); // digitalWrite (A0, LOW);
  PORTC &= ~bit (1); // digitalWrite (A1, LOW);
  PORTC &= ~bit (2); // digitalWrite (A2, LOW);
  PORTC &= ~bit (3); // digitalWrite (A3, LOW);
  PORTC &= ~bit (4); // digitalWrite (A4, LOW);
  PORTC &= ~bit (5); // digitalWrite (A5, LOW);

// --- DIGITAL READ  ---

  x = (PIND & bit (0)) == 0; // digitalRead (0);
  x = (PIND & bit (1)) == 0; // digitalRead (1);
  x = (PIND & bit (2)) == 0; // digitalRead (2);
  x = (PIND & bit (3)) == 0; // digitalRead (3);
  x = (PIND & bit (4)) == 0; // digitalRead (4);
  x = (PIND & bit (5)) == 0; // digitalRead (5);
  x = (PIND & bit (6)) == 0; // digitalRead (6);
  x = (PIND & bit (7)) == 0; // digitalRead (7);
  x = (PINB & bit (0)) == 0; // digitalRead (8);
  x = (PINB & bit (1)) == 0; // digitalRead (9);
  x = (PINB & bit (2)) == 0; // digitalRead (10);
  x = (PINB & bit (3)) == 0; // digitalRead (11);
  x = (PINB & bit (4)) == 0; // digitalRead (12);
  x = (PINB & bit (5)) == 0; // digitalRead (13);
  x = (PINC & bit (0)) == 0; // digitalRead (A0);
  x = (PINC & bit (1)) == 0; // digitalRead (A1);
  x = (PINC & bit (2)) == 0; // digitalRead (A2);
  x = (PINC & bit (3)) == 0; // digitalRead (A3);
  x = (PINC & bit (4)) == 0; // digitalRead (A4);
  x = (PINC & bit (5)) == 0; // digitalRead (A5);

// --- TOGGLE PIN  ---

  PIND = bit (0); // toggle pin 0
  PIND = bit (1); // toggle pin 1
  PIND = bit (2); // toggle pin 2
  PIND = bit (3); // toggle pin 3
  PIND = bit (4); // toggle pin 4
  PIND = bit (5); // toggle pin 5
  PIND = bit (6); // toggle pin 6
  PIND = bit (7); // toggle pin 7
  PINB = bit (0); // toggle pin 8
  PINB = bit (1); // toggle pin 9
  PINB = bit (2); // toggle pin 10
  PINB = bit (3); // toggle pin 11
  PINB = bit (4); // toggle pin 12
  PINB = bit (5); // toggle pin 13
  PINC = bit (0); // toggle pin A0
  PINC = bit (1); // toggle pin A1
  PINC = bit (2); // toggle pin A2
  PINC = bit (3); // toggle pin A3
  PINC = bit (4); // toggle pin A4
  PINC = bit (5); // toggle pin A5


You can use that "cheat sheet" to find the equivalent of reading/writing/toggling each of the 20 pins, plus setting them to input or output. This is faster than digitalRead/digitalWrite, however the disadvantage is that the pin number needs to be known at compile-time.




Lua code to reproduce the above:

Code: [Select]
pins = {
  { name = "0",  port = "D", bit = 0 },
  { name = "1",  port = "D", bit = 1 },
  { name = "2",  port = "D", bit = 2 },
  { name = "3",  port = "D", bit = 3 },
  { name = "4",  port = "D", bit = 4 },
  { name = "5",  port = "D", bit = 5 },
  { name = "6",  port = "D", bit = 6 },
  { name = "7",  port = "D", bit = 7 },

  { name = "8",  port = "B", bit = 0 },
  { name = "9",  port = "B", bit = 1 },
  { name = "10", port = "B", bit = 2 },
  { name = "11", port = "B", bit = 3 },
  { name = "12", port = "B", bit = 4 },
  { name = "13", port = "B", bit = 5 },

  { name = "A0", port = "C", bit = 0 },
  { name = "A1", port = "C", bit = 1 },
  { name = "A2", port = "C", bit = 2 },
  { name = "A3", port = "C", bit = 3 },
  { name = "A4", port = "C", bit = 4 },
  { name = "A5", port = "C", bit = 5 },
} -- end of pins


print ""
print ("// --- PIN MODE: OUTPUT  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  DDR" .. pin.port .. " |= bit (" .. pin.bit .. "); // pinMode (" .. pin.name .. ", OUTPUT);")
end -- for

print ""
print ("// --- PIN MODE: INPUT  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  DDR" .. pin.port .. " &= ~bit (" .. pin.bit .. "); // pinMode (" .. pin.name .. ", OUTPUT);")
end -- for


print ""
print ("// --- DIGITAL WRITE: HIGH  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  PORT" .. pin.port .. " |= bit (" .. pin.bit .. "); // digitalWrite (" .. pin.name .. ", HIGH);")
end -- for


print ""
print ("// --- DIGITAL WRITE: LOW  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  PORT" .. pin.port .. " &= ~bit (" .. pin.bit .. "); // digitalWrite (" .. pin.name .. ", LOW);")
end -- for

print ""
print ("// --- DIGITAL READ  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  x = (PIN" .. pin.port .. " & bit (" .. pin.bit .. ")) == 0; // digitalRead (" .. pin.name .. ");")
end -- for

print ""
print ("// --- TOGGLE PIN  --- ")
print ""

for k, pin in ipairs (pins) do
  print ("  PIN" .. pin.port .. " = bit (" .. pin.bit .. "); // toggle pin " .. pin.name)
end -- for
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: devilbehra on Nov 20, 2016, 06:10 am
It means you write to the pin like this:

Code: [Select]
void setup()
  {
  pinMode (13, OUTPUT);
  }
void loop()
  {
  PINB = 0x20;    // toggle D13 by writing 1 to it
  delay (500);
  }



Better documenting would be to use the "bit" macro:

Code: [Select]
PINB = bit (PINB5);   // toggle D13 by writing 1 to it


That is, the 5th bit on Port B.

The processor is designed so that writing a 1 to a PINx register toggles the value in the corresponding output port (PORTx). Any pins not written with a 1 are unchanged (not set to zero).






You can get them from various places, for example here:

https://www.arduino.cc/en/Hacking/PinMapping168 (https://www.arduino.cc/en/Hacking/PinMapping168)

Basically you need to look at that and see what port you want (in this case you see "digital pin 13") on the RH side. Then look across and see PB5 which is Port/Pin "B", bit 5. So pin 12 (on the board) would be PB4 and so on.

So to toggle that D12 you would write to:

Code: [Select]
PINB = bit (PINB4);   // toggle D12 by writing 1 to it


You use similar logic for all the other pins.
Thank you so much for the help NICK. now  I have got a hang of it. Really appreciate the help.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: GeeksTips on Dec 11, 2016, 01:14 am
Very nice, thank you for sharing. Can i use the picture on my blog (http://www.geekstips.com) in next article?

Thanks,
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: nickgammon on Dec 11, 2016, 10:13 pm
Sure, as long as you attribute it to me. The original image (with some explanations about various pins) is at http://www.gammon.com.au/uno (http://www.gammon.com.au/uno).

Note at the bottom of that (and all my forum pages):

Quote
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: cysign on Jan 11, 2017, 05:01 pm
Would you guys use an 8u2 or an 16u2 for own PCBs?
And why?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: testato on Jan 12, 2017, 08:50 am
It have usb inside, this is the most important difference respect 328.
It have also 2,5kB of ram, instead of 2kB
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: westfw on Jan 12, 2017, 09:27 am
Quote
Would you guys use an 8u2 or an 16u2 for own PCBs?
No.  At the time Arduino switched to the 8u2, FTDI usb/serial chips were relatively expensive.  Since that time, FTDI has come out with a cheaper line of USB chips, competition has appeared in the form of Cypress, WCH, and low-priced "modules", and the AVRs have gotten more expensive.   On top of that, there are more chips with native USB (like the 32u4 used on Leonardo and Micro, or the SAMD21 on Zero)   The 8u2 change to Arduino allowed the older design to have new USB capabilities, but those usually aren't needed.  When they are needed, there are better solutions...

Title: Re: Arduino Uno Rev3 pinouts photo
Post by: GolamMostafa on Mar 03, 2017, 07:15 pm
That mounting hole on the top left side was already hard to use and this time with the two additional pins it should be impossible to use now.
That mounting hole on the top left side was already hard to use and this time with the two additional pins it should be impossible to use now.
I would like to see redundant connectors (double connectors for DPin, APin and PPin Connectors) in the future manufacture of the ArduinoUNO Kits.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: GolamMostafa on Mar 03, 2017, 08:05 pm
I am attaching a schematic diagram for ArduinoUNO board which I have made for myself, and it may be useful for others!
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: SebastianCeronV on Jun 08, 2017, 02:34 am
How can I connect high voltage to an arduino?
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: westfw on Jun 08, 2017, 03:33 am
Quote
How can I connect high voltage to an arduino?
Opto-isolators...
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: KhaibariA on Oct 18, 2017, 04:20 pm
I am about to make my graduation project. I want to know how to connect fan and also I face difficulties having the circuit diagrm for
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: anishkgt on Jan 20, 2018, 07:28 am
Here is what i've been using
(https://i2.wp.com/marcusjenkins.com/wp-content/uploads/2014/06/ARDUINO_V2.png)
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: steveC200 on Feb 07, 2018, 08:27 pm
Just beginning with direct port manipulation. My current project would benefit from reading all input registers as fast as possible, and then checking for which if any bits have changed.

Thinking it might be useful to have some look ups along the lines of the following function prototypes..

char mapPinToPort(byte pinNumber);
byte mapPinToBit(byte pinNumber);
byte mapPinAndPortToPinNumber(char port, byte pinNumber);

..hopefully the function names explain their purpose. that is to determine which port & bit a particular numbered pin is on. and also the reverse lookup.

wondering if anyone has done this yet? with conditional compilation to cover  the variants, and an agreement on "does not have such" values... it should be workable to cover all variants
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: larryd on Feb 08, 2018, 01:28 am
Just beginning with direct port manipulation. My current project would benefit from reading all input registers as fast as possible, and then checking for which if any bits have changed.

Thinking it might be useful to have some look ups along the lines of the following function prototypes..

char mapPinToPort(byte pinNumber);
byte mapPinToBit(byte pinNumber);
byte mapPinAndPortToPinNumber(char port, byte pinNumber);

..hopefully the function names explain their purpose. that is to determine which port & bit a particular numbered pin is on. and also the reverse lookup.

wondering if anyone has done this yet? with conditional compilation to cover  the variants, and an agreement on "does not have such" values... it should be workable to cover all variants
Make a macro list that reads pins for each variant.
ex:
#define TESTd2      (PIND  & B00000100) // D2 is tested UNO
. . .

byte stateD2 = TESTd2;       //Read D2 Takes about 130ns



Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Greenman on Feb 16, 2018, 09:01 am
Hi guys, like Czetie said I'm new hear and know as much about this stuff as the difference between my elbow & a!.
I acquired the  "GY-BMP280-3.3 Pressure Atmospheric Altimeter Module Sensor Tool U", pined it up to 4/5 and 5v pins got the bpm280 prog loaded up on my unoR3 opened serial monitor and off it went, fast ! but with the odd number a load of reverse question marks and the odd letter, question is, what have I done wrong, I'm using a iMac.
Help is alway very welcome guys.
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: Aliazam on Jul 07, 2018, 10:30 am
Is this microcontroller compatible with Duemilanove type?
Thanks
Title: Re: Arduino Uno Rev3 pinouts photo
Post by: _pepe_ on Jul 07, 2018, 03:53 pm
Supprimé