Microcontrollers make wonderful “brains” for embedded systems, but are severely limited in the amount of current they can supply to an external device. In order to determine the amount of current a microcontroller can supply (or sink) with an output pin, open the data sheet and look for the section describing “Absolute Maximum Ratings”. There, there should be a specification described as the maximum current for a single GPIO pin (see example, Figure 1).