Analogue inputs corrupted on Micro

I am using analogue inputs A0, A1 and A2 on a Micro and find that if I configure digital pins 18 and 19 as outputs, then the inputs to A0 and A1 are pulled strongly to ground.

The Arduino Micro pinout diagram shows pins 18 (A4) and 19 (A5) connected to 32U4 Port F2 and Port F3 - which do not exist according to the datasheet!!

Can any one please clarify this anomaly as I need to use ALL of the available digital outputs.

There are enough incorrect diagrams floating around for all kinds of boards :frowning:

Anyway, A0, A1 and A2 are pins 18, 19 and 20 as below code shows

void setup()
{
  Serial.begin(57600);
  while(!Serial);
  Serial.println(A0);
  Serial.println(A1);
  Serial.println(A2);
}

void loop()
{
}

Also see the pinout on Arduino Micro — Arduino Official Store

Note: your topic has been moved to a more suitable location on the forum.

2 Likes

Thanks for placing this in a better location, I wasn't certain where was appropriate. Thanks too for pointing out the correct pinout diagram - problem now solved!!

I see from the official pin diagram that on my diagram digital pins from 14 up to 19 ( analogue AN0 to AN5 ) are incorrectly labelled - they should be from 18 up to 23.

It's often tricky :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.