UNO and Nano Analog Pin's digital Pin numbers

I know I have seen the asked and answered before and I am sorry for asking again, but the searches I have tried have not returned the answer.

What are then numbers for the analog pins when you refer to them as digital pins on the UNO and NANO modules?

Are there any analog pins that cannot be referred to as digital pins on either module?

Can the analog pins that can be used as digital pins also be used for one wire communication (used to communicate with DS18B20 modules)?

What are then numbers for the analog pins when you refer to them as digital pins on the UNO and NANO modules?

Just use A0, A1, A2 etc

If you really want to know the numbers (why ?) then try printing A0, A1, A2 etc On a Uno and Nano they are 14, 15, 16 etc

Are there any analog pins that cannot be referred to as digital pins on either module?

The Nano pins A6 and A7 are analogue [input] only and cannot be used as digital pins

Can the analog pins that can be used as digital pins also be used for one wire communication (used to communicate with DS18B20 modules)?

Yes, but see above for A6 and A7 on a Nano

Thank you UKHeliBob. That answers all the questions and solves all the problems but one. Where are the other two digital pins on the NANO?

Digital pins 0-13 is 14 pins and A0 to A5 are 6 pins for a total of 20. The spec lists the NANO as having 22 Digital pins. Where are the other two pins?

A6, A7 are the two extra pins. They are only available for analog input.

CrossRoads:
The crystal pins, not readily accessible on a Nano board.
Need a 328P that brings out all pins and runs on internal oscillator to access them.

Interesting. I would expect the specs for the boards to reflect the capability of the board not the processor. On that note I checked the UNO specs. The digital pin count there seems off too, in comparison to the NANO board. NANO lists 22, but only 20 are available. UNO lists 14 but 20 are available on the headers. the UNO uses the 328P and could be listed as 22, but since they are not on the headers I could see it specifying 20 instead.

Well that was a waste of $20 bucks. Guess back to plan B and use a external I2C I/O. A lot of space for 2 more pins. But it is what it is.

Please note the change I made to my answer: Nano has 2 extra analog input pins. They could be used to read digital inputs, comparing the reading to a low <= 0.9V or >= 3V for example.

Uno has 20 digital IO. A0 to A5 (D14 to D19) are marked on the board and can also do analogRead.
It does not have A6, A7, as the 328P DIP does not bring those pins out.

The 328P does support two extra IO pins if a crystal is not connected, not too many boards do not have a crystal or resonator connected tho. This requires different fuse settings also. (PB6, PB7)

There just seems to be combination of errors and inconsistancy in what pins are counted in the tech specs on the Arduino.cc website for the boards. UNO lists 14 (digital only) and the NANO lists 22 (digital and analog). I would expect the listing to be of the board (either 14 or 20) as that is what Arduino is selling, not of the Atmel chip (22 digital pins) as access to those is not available on the headers.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.