Digital pins and grounds

RevScarecrow:
Let me start by saying I have an ardunio mega 2560. I'm really confused about why I only have what appears to be 6 grounds but 43 digital ports and 15 analog. Why do I have so many ports but only 6 grounds? Can I use digital pins as grounds without blowing my arudino up? I feel like I'm missing something really basic but I don't know what.

Humm, never heard that complaint before and I've been around here for awhile. :wink: Well a Uno board only has 3 ground pins to support its 14 digital and 6 analog pins. Not sure what your expectations would be, but connector pins are a resource on a space limited board, however there is no reason that several external wires needing to be wired to a arduino ground pin can't be wired together and then attached to a single arduino ground pin. Or as many people do, use a solderless breadboard and wire a single wire from an arduino ground pin to the 'ground bus' on the breadboard where there will be many ground attachment points you can use. There isn't an electrical reason that every digital or analog pin needs to have a dedicated ground return point, an common ground collection point that is then wired to a single arduino ground pin will work. Perhaps if you could explain what you are attempting to wire up to that you need so many ground pins?

As far as using a digital output pin set to low to provide a 'ground return point', yes that is possible, but it would carry the pin's maximum current limit and is not normally done except in some cases where you wish to start or stop current flow under software control.

Lefty