A-Pin can drive LED

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

A-Pin can drive LED

#1 Post by Tetrachromat »

I just discovered that the 'Hardware id list' Wiki table for the Arduino_MEGA_2560 states that the pins A0 through A15 can't be used for 'LED'.

I currently use some A-pins for driving LED without problems. So where is the restriction?

Does this rule only apply to the use of the 'hw_led_add()' function, which allows brightness control?

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: A-Pin can drive LED

#2 Post by Sling »

Hi Paul,

In that table when it refers to led it means the led specific function which as you point out includes the dimming via PWM. If you are using digital output (output in the table) to drive your led’s you are fine. In fact it is recommended to use digital output for driving led’s if dimming is not required. You can connect anything that will work with a simple digital on/off using digital output.

Perhaps the wiki needs a little more clarity on this also.

Tony

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: A-Pin can drive LED

#3 Post by Corjan »

Hi,

It is because internally it uses bit banging to drive the LED's.
For performance reasons, I didn't support all pins.

Corjan

Post Reply