Hello!
I have a couple indicator LED’s I want to drive with the Artemis. I was reading through the design page on Sparkfun again, and it has this segment on the pin drive strength:
Pin Drive Strength
One of the more unique features of the Artemis is its ability to have selectable drive strength on all GPIO. 2, 4, 8, or 12mA can be selected as the max current on a given pin.
Does this mean the Artemis can drive an LED up to 12mA without a resistor? Maybe I’m really off-base here, but I get this idea because I am also using a BQ40Z80 battery fuel gauge chip, which can drive 6 LED’s at user specified current levels, with no resistors.
I’ll probably end up using a transistor to supply 5V to the LED’s anyway, since I can’t quite drive a blue LED with the artemis (Vf = 3.3v for this particular blue LED). Nonetheless, I am curious still. Can the Artemis drive LED’s without a resistor?
You should be able to blink LEDs on and off with a resistor if the 3.3V is too high for the LED itself. I would suggest running LEDs with 150 ohms as a rule of thumb.
I’m sorry, I mean the forward voltage drop for the LED is equal to the Artemis pin HIGH voltage (3.3v), so the LED may not light up at all because the 3.3v is too low.
I do have some of questions pertaining to designing my own board with the Artemis, particularly in making sure the FT231x chip is setup to work correctly with the Artemis… Is it ok to ask such questions in this forum?
My apologies, I was speaking to general LEDs. If your LED is 3.3V it can drive it if the forward current is within range as well. Your questions are welcomed, so no worries.
Confirming that I’ve done a couple of different custom boards with various colours of LEDs (white, blue, green, red) and no resistors. This works fine, and the default IDE drive strength is 2mA, which works pretty well. Ie.
pinMode(Ind1Pin, OUTPUT); //Defaults to 2mA drive strength
A finicky thing to consider is that 2mA is the lowest drive strength setting, which may actually be more than you want. It’s a shame there is no 0.5mA or 1mA setting. LED excessively bright, battery capacity reduced, etc. I had some green LEDs that were a bit overpowered and more white than green.
Aaah! That you Stephenf, this frees up a lot of space on my small layout for my indicator LED’s 
Do you have a reference off the top of your head for how to set the current? If not no worries, I’ll look into it when I get the board assembled.
I tried downloading the SDK but I can’t seem to download anything from this page, https://www.ambiqmicro.com/mcu/
Yep, I thought the same about freeing up space (not to mention easier hand assembly). I dunno about the SDK, but in Arduino IDE, you set the drive strength using pinMode, which is overloaded to accept HAL thingies:
pinMode(blinkPin, g_AM_HAL_GPIO_OUTPUT_4);
That will set your pin as an OUTPUT, with drive strength 4mA. Various other pin mode options are defined in Arduino_Apollo3/cores/arduino/am_sdk_ap3/mcu/apollo3/hal/am_hal_gpio.c
This is amazing, thank you for the help! If all goes well, I’ll post my project on this forum in a few weeks