arduino NANO ver 3 A1 pin

I am trying to get a NANO v3 Mega 328 interfaced with an OLD LCD display. The program and connection is similar to a project someone did a few years ago.
While troubleshooting, I see a 32.5kHz clock on pin 20/A1 ADC1. I can't find anything that says there would be a clock on that pin regardless of what the program is doing.
Nothing is connected externally to any of the pins at this point. Powered externally, not from USB port.
Why do I have it there?

Take a look at the code, that is where the clock would originate.

There is code for the clock to a digital output pin, which doesn't seem to be working either, but that is another issue. The ADC pins are inputs for analog-digital conversions not outputs. They can't be configured for outputs that I can see.
What did I miss?

The A1 pin can be used as a digital output if you like. It is in INPUT mode by default, meaning the pin is floating. So you might just be seeing the pin flipping back and forth from electrical noise.

No, it is a definite 32.5kHz signal. Now this is a Nano, so that is not an address line. None of the info I have on a Nano says that those ADC lines can be configured as anything but an analog input for A2D. But I do find that strange. And none of the code configures that line for a clock.
I am definitely missing something.

ruggb:
No, it is a definite 32.5kHz signal.

There's no reason a floating pin couldn't be picking up a 32.5 kHz signal.

ruggb:
None of the info I have on a Nano says that those ADC lines can be configured as anything but an analog input for A2D.

This is a common misconception caused by the pin names. There is plenty of info that attempts to clarify this:

The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini’s A6 and A7 pins, which can only be used as analog inputs.

Digital I/O Pins 22 (6 of which are PWM)

Per that ref page:

The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini's A6 and A7 pins, which can only be used as analog inputs.

Since I have a NANO, would it be logical to assume you did not catch that the 3 times I stated that I have a NANO? == which can only be used as analog inputs.

The signal is a full 5V signal which stays that way when I connect it to an input. I have an artifact from it on an adjacent open wire in my 3M cable.

So, by definition, something is weird with this Nano since it has a 32K signal on an analog input only pin.

On top of that there is no programming trying to put that signal on that pin.
And there is nothing attached to the wires going to it.
And there is no signal on any other pin, let alone one near it.

Maybe I need to try my other Nano board or break out my Mega 2560, which is overkill.

Do you have/know where I can get a setup and program to test this board.

ruggb:
Since I have a NANO, would it be logical to assume you did not catch that the 3 times I stated that I have a NANO? == which can only be used as analog inputs.

You also said you're uising pin A1. Please read the documentation I provided carefully. Better yet, just run a quick experiment with your board. In much less time than you've been arguing with me, you could have just run a blink sketch and found out the truth.

ruggb:
Do you have/know where I can get a setup and program to test this board.

Here's the program:

const byte LEDpin = A1;
const unsigned int duration = 1000;

void setup() {
  pinMode(LEDpin, OUTPUT);
}

void loop() {
  digitalWrite(LEDpin, HIGH);
  delay(duration);
  digitalWrite(LEDpin, LOW);
  delay(duration);
}

The setup is an LED with a series current limiting resistor connected between pin A1 and GND. Or use a multimeter connected to those pins.

I have run a blink test long ago. Then I loaded the LCD interface. Then I loaded another test. The 32kHz signal does not appear with that program. Therefore, something in the LCD program is causing that 32kHz signal on A1 == which is not suppose to be possible.
There is nothing I can see that should cause that. The TONE command is trying to drive a data pin at 2mHz.
Which it isn't doing.
But then I haven't done anything previously with a Nano and little with my Mega2560 except load and reload Marlin. So what do I know? What I am finding though is a lot of errors in documentation for these boards from people who should not be so sloppy, like Circuits Today.

ruggb:
Per that ref page:

The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini's A6 and A7 pins, which can only be used as analog inputs.

Since I have a NANO, would it be logical to assume you did not catch that the 3 times I stated that I have a NANO? == which can only be used as analog inputs.

It seems you have unfortunately misinterpreted a poorly written sentence. It would have been clearer if it had been written like this
The exception is pins A6 and A7 on the Nano, Pro Mini and Mini which can only be used as analog inputs

From that I think you will see that pins A0 to A5 on the nano can be used as either digital or analog pins.

...R

Robin2:
It seems you have unfortunately misinterpreted a poorly written sentence.

I'll confess to being the author of that poorly written sentence. I agree that your wording is better Robin2. Would you care to submit a pull request to improve the wording? The file is here:

If you do so, I promise to merge your PR quickly.

pert:
Would you care to submit a pull request to improve the wording? The file is here:

Because it is you, and you asked nicely, I clicked the link. I then found another link called "Pull requests (12)" and then one called "New pull request" and then a pale green "Create pull request" that is not clickable.

Which, I'm afraid, brings me back to the comment I would have made to others suggesting the same thing - haven't you already got my proposed text?

...R

Robin2:
Because it is you, and you asked nicely, I clicked the link. I then found another link called "Pull requests (12)" and then one called "New pull request" and then a pale green "Create pull request" that is not clickable.

You would need to fork the repository, make the edit in your fork, then click the "Create pull request" button.
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork

Robin2:
Which, I'm afraid, brings me back to the comment I would have made to others suggesting the same thing - haven't you already got my proposed text?

Sure, and of course in the time I've written these replies I could have made the edit and submitted the pull request several times over. The problem is that Arduino has a (quite sensible) rule that nobody can merge their own pull request. So if I submit a pull request, I need to wait for someone else with write permissions in the repository to review and merge the PR. The last pull request I submitted to that repository has been waiting 4.5 months for someone to find the time to merge it.

On the other hand, if you submit the pull request, then I'm allowed to merge it, so the change will be made in a matter of hours rather than months.

pert:
The problem is that Arduino has a (quite sensible) rule that nobody can merge their own pull request. So if I submit a pull request, I need to wait for someone else with write permissions in the repository to review and merge the PR. The last pull request I submitted to that repository has been waiting 4.5 months for someone to find the time to merge it.

On the other hand, if you submit the pull request, then I'm allowed to merge it, so the change will be made in a matter of hours rather than months.

I understand the technical issue you have described.

However I have complained several times over the years that it should not be necessary to go to github to inform the Arduino folks about changes that are needed - and that remains my philosophy. It's the equivalent of having to cross the street to Asda to make a complaint about a product from Sainsburys.

As well as which the process is ridiculously cumbersome.

I need to think more about this - I will sleep on it. IMHO the proper solution is for the Arduino folk to read and take note of this Forum - eat the food from their own kitchen.

...R

Thanks for the clarification.
Now that I understand the concept, I must figure out:
pinmode() for these pins.

On reset, they default to analog inputs
to change to digital I/O one would use
pinmode(pin#, input, [option]input-pullup)
or
pinmode(pin#, output)

but there is no way of going back to analog other than loading a different program and using the default, right? Once it is set in a program, I can't see why one would need to go back.

As a neo reading this, it would be totally clear if it were;

"The analog input pins A0-A5 can be configured with pinmode() as digital I/O pins. For the Arduino Nano, Pro Mini, and Mini’s A6 and A7 pins can only be used as analog inputs."

This should also be changed in the pinmode() description.

I have attempt to make a pull request for each. Please note this is the 3rd time I have tried in 4 years, so maybe it is done right.

thanks

ruggb:
On reset, they default to analog inputs

Not quite. They just default to inputs - same as if you did pinMode(A0, INPUT);

You can read the pin with digitalRead() on one occasion and analogRead() on the next occasion, changing whenever you want.

If you are using pinMode(A0, INPUT_PULLUP); for digital readings it would probably be a good idea to change it to pinMode(A0, INPUT); before calling analogRead(A0); (I can't recall if a call to analogRead() automatically changes the pinMode, or even if it can ignore it).

There is probably nothing to prevent you using analogRead() on a pin set as OUTPUT but if you get mixed up with your connections you could cause a short circuit and damage the pin.

...R

Robin2:
IMHO the proper solution is for the Arduino folk to read and take note of this Forum - eat the food from their own kitchen.

Well, Arduino does agree enough about that to have hired a member of the community (me) last year to spend a couple hours each day to do just that. I have certainly taken note of your suggestion. I am somewhat limited in my area of operations, since Arduino is organized into teams and I'm only a member of the hardware/firmware team. It's somewhat of a quirk that I ended up being one of the maintainers of the language reference content, since documentation is in the domain of the content team.

There is, of course, no obligation for you to submit a pull request. I only suggested it as a way for us to cut the "red tape" to get this change made quickly, as well as ensuring you get full attribution for the use of your suggestion. I also had the ulterior motive of thinking that pull request might act as a "gateway drug" to get you hooked into putting some of your excellent documentation skills into further improving the Language Reference content.

ruggb:
This should also be changed in the pinmode() description.

Good point!

ruggb:
I have attempt to make a pull request for each. Please note this is the 3rd time I have tried in 4 years, so maybe it is done right.

Unfortunately, no pull request has been received. I don't believe any of them have, since I was following the repository that repository from the start, even when I was only a volunteer.

There is a tutorial about how to modify content and submit a pull request to the Language Reference repository here:

pert:
I also had the ulterior motive of thinking that pull request might act as a "gateway drug" to get you hooked into putting some of your excellent documentation skills into further improving the Language Reference content.

I've looked at the Arduino Editing Tutorial and now it seems that I have to join Github to suggest changes. Jeez. Is it possible to make things more complicated?

...R

@pert, I've taken some time to consider my response to your request. I am heavily influenced by this comment you made in Reply #12

The last pull request I submitted to that repository has been waiting 4.5 months for someone to find the time to merge it.

If I take the trouble to edit the text on Github I know I can send you a PM and you can incorporate the change. But if you don't have an equivalent arrangement with your other Arduino colleagues then it seems to me there is an organisational problem that needs to be fixed.

I don't see it as my role to work around that problem, no matter how much goodwill I feel towards you personally.

I suspect my attitude would be different if the members of the Arduino team were regular participants in the Forum, at least in the Website and Forum section and were keeping us informed of what they are doing to the Forum and taking notice of comments that users make. I have no objection to the Arduino team using github if it is convenient for them (frankly, it is none of my business how they conduct their internal affairs). But I don't think they should expect their customers to use it just for the convenience of the Arduino team.

...R