Tutorial.AnalogInputPins History

Hide minor edits - Show changes to markup

June 08, 2010, at 12:33 PM by Equipo Traduccion -
Changed lines 27-28 from:

Ten en cuenta que si, por descuido, activamos una resistencia pullup, mientras usamos algunos sensores, los valores obtenidos por analogRead() se verán afectados.La mayoría de los usuarios usarán las resistencias pullup cuando usen un pin analógico como digital.

to:

Ten en cuenta que si, por descuido, activamos una resistencia pullup, mientras usamos algunos sensores, los valores obtenidos por analogRead() se verán afectados. La mayoría de los usuarios usarán las resistencias pullup cuando usen un pin analógico como digital.

Changed lines 31-35 from:

El comando analogRead no funcionará adecuadamente si el pin analógico se estableció como salida,así que si es tu caso, vuelve a aestablecerlo como entrada antes de usar analogRead. De igual manera si el pin , siendo de salida,se estableció a HIGH, la resistencia pullup permanecera activa, cuando volvamos a establecerla como entrada.

The Atmega datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system. It may be desirable, after manipulating analog pins (in digital mode), to add a short delay before using analogRead() to read other analog pins.

to:

El comando analogRead no funcionará adecuadamente si el pin analógico se estableció como salida,así que si es tu caso, vuelve a aestablecerlo como entrada antes de usar analogRead. De igual manera si el pin , siendo de salida,se estableció a HIGH, la resistencia pullup permanecera activa, aunque volvamos a establecerla como entrada.

La hoja de datos de ATmega nos previene acerca de la conmutación (de analógico a digital) de los pines analógicos en las proximidades de una lectura (analogRead) en otros pines analógicos. Esto puede producir ruidos y fluctuaciones en el sistema analógico. Puede ser útil, después de manipular pines analógicos (en modo digital), añadir una pequeña parada (delay) antes de usar analogRead() en otros pines analógicos.

June 08, 2010, at 12:27 PM by Equipo Traduccion -
Changed lines 25-32 from:

Mientras el pin es una entrada input.

Be aware however that turning on a pullup will affect the value reported by analogRead() when using some sensors if done inadvertently. Most users will want to use the pullup resistors only when using an analog pin in its digital mode.

Details and Caveats

The analogRead command will not work correctly if a pin has been previously set to an output, so if this is the case, set it back to an input before using analogRead. Similarly if the pin has been set to HIGH as an output, the pullup resistor will be set, when switched back to an input.

to:

Mientras el pin es una entrada (input).

Ten en cuenta que si, por descuido, activamos una resistencia pullup, mientras usamos algunos sensores, los valores obtenidos por analogRead() se verán afectados.La mayoría de los usuarios usarán las resistencias pullup cuando usen un pin analógico como digital.

Detalles y Observaciones

El comando analogRead no funcionará adecuadamente si el pin analógico se estableció como salida,así que si es tu caso, vuelve a aestablecerlo como entrada antes de usar analogRead. De igual manera si el pin , siendo de salida,se estableció a HIGH, la resistencia pullup permanecera activa, cuando volvamos a establecerla como entrada.

June 08, 2010, at 11:48 AM by Equipo Traduccion -
Changed lines 18-21 from:

Pullup resistors

The analog pins also have pullup resistors, which work identically to pullup resistors on the digital pins. They are enabled by issuing a command such as

to:

Resistencias Pullup

Los pines analógicos también tienen resistencias pullup, las cuales funcionan igual que en los pines digitales. Se activan cuando usamos instrucciones como la siguiente

Changed lines 23-26 from:

digitalWrite(14, HIGH); // set pullup on analog pin 0 @]

while the pin is an input.

to:

digitalWrite(14, HIGH); // activa la resistencia pullup en el pin analógico 0 @]

Mientras el pin es una entrada input.

June 06, 2010, at 10:47 AM by Equipo Traduccion -
Changed lines 6-13 from:

El controlador Atmega que usa Arduino lleva incluido un conversor analógico-digital (A/D) de 6 canales. Tiene una resolución de 10 bits, retornando enteros desde 0 a 1023. Mientras que el uso principal de usuarios de Arduino es para la lectura de sensores analógicos, 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 Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega chips. The analog pins can be used identically to the digital pins, so for example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:

to:

El controlador Atmega que usa Arduino lleva incluido un conversor analógico-digital (A/D) de 6 canales. Tiene una resolución de 10 bits, retornando enteros desde 0 a 1023. Mientras que el uso principal de estos pines por los usuarios de Arduino es para la lectura de sensores analógicos, estos pines tienen tambien toda la funcionalidad de los pines de entrada-salida de propósito general (GPIO) (al igual que los pines 0 - 13).

Consecuentemente, si un usuario necesita más pines de propósito general de entrada-salida, y no se está usando ningún pin analógico, estos pines pueden usarse como GPIO.

Mapeo de Pins

Los pines de Arduino correspondientes a los pines analógicos son desde el 14 al 19. Observa que esto son pines de Arduino y no corresponden con los números de los pines físicos del chip Atmega. Los pines analógicos, pueden usarse de manera idéntica que los digitales, así que por ejemplo, podrías ver un código como este para configurar un pin analógico,y establecerlo a HIGH:

June 03, 2010, at 01:24 PM by Equipo Traduccion -
Changed lines 1-7 from:

Analog Input Pins

A description of the analog input pins on an Arduino chip (Atmega8, Atmega168, Atmega328, or Atmega1280).

A/D converter

The Atmega controllers used for the Arduino contain an onboard 6 channel analog-to-digital (A/D) converter. The converter has 10 bit resolution, returning integers from 0 to 1023. 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).

to:

Pins de Entrada Analógica

Una descripción de las entradas analógicas del chip de Arduino (Atmega8, Atmega168, Atmega328, or Atmega1280).

Conversor A/D

El controlador Atmega que usa Arduino lleva incluido un conversor analógico-digital (A/D) de 6 canales. Tiene una resolución de 10 bits, retornando enteros desde 0 a 1023. Mientras que el uso principal de usuarios de Arduino es para la lectura de sensores analógicos, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).

September 23, 2009, at 05:44 PM by Paul Badger -
September 23, 2009, at 05:43 PM by Paul Badger -
Changed lines 31-32 from:

The analogRead command will not work correctly if a pin has been previously set to an output, so if this is the case, set it back to an input before using analogRead. Similarly if the pin has been set to HIGH as an output.

to:

The analogRead command will not work correctly if a pin has been previously set to an output, so if this is the case, set it back to an input before using analogRead. Similarly if the pin has been set to HIGH as an output, the pullup resistor will be set, when switched back to an input.

June 17, 2009, at 10:51 PM by Tom Igoe -
Changed lines 3-4 from:

A description of the analog input pins on an Atmega168 (Arduino chip).

to:

A description of the analog input pins on an Arduino chip (Atmega8, Atmega168, Atmega328, or Atmega1280).

Changed lines 6-7 from:

The Atmega168 contains an onboard 6 channel analog-to-digital (A/D) converter. The converter has 10 bit resolution, returning integers from 0 to 1023. 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).

to:

The Atmega controllers used for the Arduino contain an onboard 6 channel analog-to-digital (A/D) converter. The converter has 10 bit resolution, returning integers from 0 to 1023. 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).

Changed lines 12-13 from:

The Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega168 chip. The analog pins can be used identically to the digital pins, so for example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:

to:

The Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega chips. The analog pins can be used identically to the digital pins, so for example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:

Changed line 33 from:

The Atmega168 datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system.

to:

The Atmega datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system.

February 21, 2009, at 10:21 PM by David A. Mellis -
Changed lines 1-2 from:

Analog Pins

to:

Analog Input Pins

December 29, 2008, at 01:04 AM by Paul Badger -
Changed lines 12-13 from:

The Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega168 chip. The analog pins can be used identically to the digital pins, so for example, to set analog pin 0 to an output, and to set it HIGH, the code would look like this:

to:

The Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega168 chip. The analog pins can be used identically to the digital pins, so for example, the code would look like this to set analog pin 0 to an output, and to set it HIGH:

December 29, 2008, at 01:02 AM by Paul Badger -
Changed line 33 from:

The Atmega168 datasheet also cautions against switching digital pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system.

to:

The Atmega168 datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system.

February 14, 2008, at 04:13 AM by David A. Mellis -
Added lines 1-35:

Analog Pins

A description of the analog input pins on an Atmega168 (Arduino chip).

A/D converter

The Atmega168 contains an onboard 6 channel analog-to-digital (A/D) converter. The converter has 10 bit resolution, returning integers from 0 to 1023. 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 Arduino pin numbers corresponding to the analog pins are 14 through 19. Note that these are Arduino pin numbers, and do not correspond to the physical pin numbers on the Atmega168 chip. The analog pins can be used identically to the digital pins, so for example, to set analog pin 0 to an output, and to set it HIGH, the code would look like this:

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

Pullup resistors

The analog pins also have pullup resistors, which work identically to pullup resistors on the digital pins. They are enabled by issuing a command such as

digitalWrite(14, HIGH);  // set pullup on analog pin 0 

while the pin is an input.

Be aware however that turning on a pullup will affect the value reported by analogRead() when using some sensors if done inadvertently. Most users will want to use the pullup resistors only when using an analog pin in its digital mode.

Details and Caveats

The analogRead command will not work correctly if a pin has been previously set to an output, so if this is the case, set it back to an input before using analogRead. Similarly if the pin has been set to HIGH as an output.

The Atmega168 datasheet also cautions against switching digital pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system. It may be desirable, after manipulating analog pins (in digital mode), to add a short delay before using analogRead() to read other analog pins.

Share