Arduino Forum

Development => Suggestions for the Arduino Project => Topic started by: 68tjs on Dec 01, 2016, 09:41 pm

Title: False information for digital I/O and analog inputs for avr board
Post by: 68tjs on Dec 01, 2016, 09:41 pm
Stop saying that an avr arduino board has  x I / O digital and y analog inputs.

It's wrong.

At reset all I / O are in digital mode.
For example an UNO board has 19 digital I/O. Some of them (A0 to A5) has an alternate function which allow analog measurement.

Number of beginners who do not know that the inputs A0 to A5 (example for a UNO) can be used as a digital I / O is enormous.


Title: Re: False information for digital I/O and analog inputs for avr board
Post by: pert on Dec 01, 2016, 11:11 pm
From https://www.arduino.cc/en/Tutorial/AnalogInputPins (https://www.arduino.cc/en/Tutorial/AnalogInputPins)
Quote
While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).

Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO.
Pin mapping

The analog pins can be used identically to the digital pins, using the aliases A0 (for analog input 0), A1, etc. For example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:
Code: [Select]

pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);

From https://www.arduino.cc/en/Tutorial/DigitalPins (https://www.arduino.cc/en/Tutorial/DigitalPins)
Quote
it is important to note that vast majority of Arduino (Atmega) analog pins, may be configured, and used, in exactly the same manner as digital pins.
So I think they've definitely made an attempt to provide this information but maybe there could be some wording added to the product pages as well.
Title: Re: False information for digital I/O and analog inputs for avr board
Post by: 68tjs on Dec 02, 2016, 12:01 am
Main Arduino information :
Quote
MicrocontrollerATmega328P (http://www.atmel.com/Images/doc8161.pdf)
Operating Voltage5V
Input Voltage (recommended)7-12V
Input Voltage (limit)6-20V
Digital I/O Pins14 (of which 6 provide PWM output)
PWM Digital I/O Pins6
Analog Input Pins6
DC Current per I/O Pin20 mA
DC Current for 3.3V Pin50 mA
Flash Memory32 KB (ATmega328P)
 of which 0.5 KB used by bootloader
SRAM2 KB (ATmega328P)
EEPROM1 KB (ATmega328P)
Clock Speed16 MHz
LED_BUILTIN13
Length68.6 mm
Width53.4 mm
Weight25 g

A summary should not be false.

My remarks are addressed to Arduino managers.
I do not think that simple forum members can change anything.
Title: Re: False information for digital I/O and analog inputs for avr board
Post by: pert on Dec 02, 2016, 12:10 am
My remarks are addressed to Arduino managers.
...who don't read the forum.

I do not think that simple forum members can change anything.
Actually I have gotten quite a few changes made to the documentation and product pages of this website, usually surprisingly quickly too. You need to submit the change request as an issue on the Arduino IDE GitHub repository at https://github.com/arduino/Arduino/issues (https://github.com/arduino/Arduino/issues).

First do a search of the current issues to make sure that you don't make a duplicate. In the "Filters" box remove the text "is:open" so that you will also get results for closed issues.

Provide a thorough explanation of the suggested changes and the URLs where those changes should be made. I find the best results if I provide a full text I'm suggesting to be changed rather than just a summary of what needs to be done, this makes it easy for the developer to just copy and paste your text in and you will be more likely to get the desired results.

The person who usually does this sort of thing, agdl is very easy to work with.