1
\$\begingroup\$

How is a pin designed to be analog or digital on a Arduino/Raspberry Pi board? I don't mean what is the difference between analog or digital, or what functions do I need to use to write an analog/digital signal. I mean on one of these boards, certain pins are called "analog" pins and unlike digital pins, the analog pins can detect more values than just "ON" and "OFF." How is this feature implemented on the circuit board (i.e. the hardware)? Does the chip on the board have something to do with it? Where can I learn more about this?

\$\endgroup\$
1
3
\$\begingroup\$

Those analog pins has an ADC embedded in them. Generally, a single pin is connected to a lot of Peripherals, the GPIO (General Purpose Input Output) peripheral is responsible to give a digital output or digital read. Most of the pin has GPIO MUXED in them.Other example of peripherals are PWM, CAP etc. For Analog read, we have ADC peripheral. The number of ADC peripheral are limited in number, but single ADC has multiple channels, which means the ADC can only convert one channel at a time.

You can learn about them from their respective Datasheets and Technical References.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ To clarify it's not really embedded in the pin although the actual pad is probably one that supports GPIO driving and analog pass through. The ADC is a separate analog block on the die inside the package. There is then internal routing that muxes different features, say a gpio or ADC to that output pin. Same thing happens when say one pin is connected to some other internal hardware function. \$\endgroup\$ – Some Hardware Guy Oct 30 '17 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.