Go Down

Topic: Analog inputs A6 and A7 (Read 935 times) previous topic - next topic

westfw

#15
Jul 09, 2018, 04:09 am Last Edit: Jul 09, 2018, 04:10 am by westfw
Quote
Quote
(Does input_pullup work on A0..A5?  I can't tell from the datasheet...)
It does.  What I don't remember right off is if calling analogRead does anything to them.
I meant "when they are in analog mode."   ("Obviously" they work when the pins are in digital mode.)
If you don't care much about accuracy, you could reduce component and wiring costs for analog components that were effectively current sinks...

Juraj

there could be thousands checks like this one proposed.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Dr_Quark

westfw,

absolutely correct. Bad idea to use imprecise pullups to set up a real analog input. But even when I need them to be real analog for those resistor ladders, the jumps in voltage as the tank fills is on the order of 0.7 volts, so it's easy to discriminate with wide thresholds.
Dr.Quark

68tjs

Package pin A0 to A5 are connected either :
- to an I/O numerical PORT
- to an analog mux input.

Package pin A6 and A7 are connected only to an analog mux input.

pinMode apply only to numerical I/O.
pinMode(A6, inputPullup) do nothing.

When you want to program a microcontroler you have to manage electronic and you can't avoid reads his datasheet.

Notice also that nano and mini-pro are not introduced by Arduino but by Gravitech and Sparkfun.

Go Up