Pin 68 confusion

I need to use pin 68, which is port B27 for my quadrature encoder. But I see it is listed as being connected to an LED

arduino-due-pinout.png (2676×2400) (simba-os.readthedocs.io)

Could someone explain what is going on? Can I use the pin for an input?

Why do you need to use that pin?

PB27 is Arduino pin 13:

https://github.com/arduino/ArduinoCore-sam/blob/master/variants/arduino_due_x/variant.cpp#L145

Arduino pin 68 is PA1:

https://github.com/arduino/ArduinoCore-sam/blob/master/variants/arduino_due_x/variant.cpp#L234

Official pinout diagram and schematics are available for download here:

You confusing pins, B27 is indeed physical pin 68, but in Arduino speak its pin 13, which does indeed have an LED on it.

You could use it as an input, as long as what is driving it can produce enough current to drive the LED as well.

I have found the schematic, it looks like the pin to led line is is buffered with an opamp so the pin can be operated completely normally I think. It will just blink.

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