element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino digital IO pins numbering
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 5 answers
  • Subscribers 392 subscribers
  • Views 772 views
  • Users 0 members are here
Related

Arduino digital IO pins numbering

roineust
roineust over 9 years ago

Hello!

There is something about Arduino boards that i'm having trouble to understand.

 

Here is a description of the Arduino Uno:

https://www.arduino.cc/en/Main/ArduinoBoardUno

 

Here is a description of the Arduino Micro:

https://www.arduino.cc/en/Main/ArduinoBoardMicro

 

Under the Uno's technical specs table, it declares 14 digital IO pins and under the Micro's technical specs table it declares 20 digital IO pins.

 

Doesn't it mean that while the Uno has pinholes 0-13, under the Micro there should be pin-holes 0-19 ??

But yet, also under the Micro there are only pinholes 0-13..

 

This is confusing...can anyone please explain this to me?

 

Thanks!

  • Sign in to reply
  • Cancel

Top Replies

  • Robert Peter Oakes
    Robert Peter Oakes over 9 years ago +1 suggested
    These 2 boards use a different chip, as such they have different pinouts. the UNO has a 28 pin Plastic Dual Inline Package (PDIP) which is an ATMEGA328 and the Micro has a 44 pin chip (Quad Flatpack no…
  • beacon_dave
    beacon_dave over 9 years ago in reply to roineust +1 suggested
    This will probably be going to the other extreme but if need be you can get more info on the Atmel ATmega328 device here: ATmega328P The complete datasheet is around 600 pages however so expect to be skipping…
  • beacon_dave
    beacon_dave over 9 years ago in reply to roineust +1 suggested
    What sort of size are you actually hoping for ? Are you using PWM on your L293D enable line for motor speed control as the Uno / ATmega328 only has 6 PWM outputs whereas the Leonardo / ATmega32u4 has 7…
  • beacon_dave
    0 beacon_dave over 9 years ago

    Some of the pins are multi-functional.

     

    On the UNO you have the digital pins 0-13 however the analogue input pins 0-5 can also be configured for digital IO.

     

    On the Micro you have the digital pins 0-13 and analogue input pins 0-5, however in addition digital pins 4,6,8,9,10, & 12 can also be configured as analogue inputs.

     

    Perhaps think of it as 20 Digital IO pins of which 6 (UNO) or 12 (Micro) can be configured as analogue inputs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago

    These 2 boards use a different chip, as such they have different pinouts. the UNO has a 28 pin Plastic Dual Inline Package (PDIP) which is an ATMEGA328 and the Micro has a 44 pin chip (Quad Flatpack no leads (QFN) which is the ATmega32U4

     

    the two chips also have different internal functionality, the ATmega32U4 having quite a bit more than the 328

     

    the Wiring based  IDE hides most of these details from you but does allow access to the common functionality through the commands like digitalWrite, digitalRead, AnalogRead etc.

    ATmega328

    image

     

    ATmega32U4

    image

    hope this answers your question

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • roineust
    0 roineust over 9 years ago in reply to beacon_dave

    Not that you are to be blamed in any way Dave, of course you are only trying to help and thanks for that, but to me it sounds like not being clear enough on the part of Arduino, when selling to beginners level in prototyping like i am, to say a board has 20 IOD and not 14 IOD, while they actually mean it has 12 analog instead of 6...i could have use the Uno or Pro-mini which i already have and not buy a new Micro, if i had known that actually they have 20 IOD, just like the Micro has.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 9 years ago in reply to roineust

    This will probably be going to the other extreme but if need be you can get more info on the Atmel ATmega328 device here:

    ATmega328P

     

    The complete datasheet is around 600 pages however so expect to be skipping over a few pages until you get more familiar. However it goes into a lot more detail about  the IO port configuration options.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • roineust
    0 roineust over 9 years ago in reply to Robert Peter Oakes

    Peter - your explanation is at a high level and too much for me to understand, can you please try to help me if possible, by answering the following question:

     

    i have on a robot i'm building, the following components:

     

    1. 2 X L293D chips, which turn 4 motors and require 9 outputs (the 9th is the enable pin on all sides of both L293D, which i made common to all 4 motors).

    2. 6 X servos which require 6 outputs.

    3. 1 X relay which turns another type of motor, which requires 1 output.

    4. 1 X bluetooth dongle, which requires RX and TX.

     

    This is all working well on an Arduino Mega - but now i need to put it all together in a much smaller box - so anything even close to the size of a Mega won't do.

     

    The question is: What would me the smallest Arduino board, which can handle the connections described above?

     

     

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 9 years ago in reply to roineust

    What sort of size are you actually hoping for ?

     

    Are you using PWM on your L293D enable line for motor speed control as the Uno / ATmega328 only has 6 PWM outputs whereas the Leonardo / ATmega32u4 has 7 which could be crucial in your project.

     

    You could perhaps consider just using an Atmel microcontroller on its own to get the size down.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 9 years ago in reply to beacon_dave

    If you don't require the 7th PWM output for the L293D then you may be interested in the Adafruit Pro Trinket

    https://www.adafruit.com/product/2000

    It's like a miniature version of the UNO. You lose D2 & D7 but you gain A6 & A7.

     

    Size comparison between UNO, Pro Trinket and Trinket

    https://cdn-shop.adafruit.com/970x728/2000-10.jpg

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • roineust
    0 roineust over 9 years ago in reply to beacon_dave

    Interesting boards..actually i got a bunch of Arduino pro-mini, which might even comply to the project needs, if i will also use the analog IO. But since the pro-mini are more sensitive and tend to fry more easily, i'm trying the Arduino Micro.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube