If using giant sized beans, soak in water overnight.
Sort and rinse the beans.
Place the beans into a saucepan with enough water to cover the beans by an inch or two.
Place the pan of beans over high heat and cook just until boiling.
Remove the beans from the heat and cover with a lid and allow the beans to sit for at least one hour.
Drain the beans and rinse again.
Place the beans back into the pan and cover with water.
Place the beans back on the stove and bring to a boil. When the beans begin to boil, reduce the heat to a simmer.
Add the remaining ingredients, except ham and sliced onion if using, and stir well to combine.
Allow the beans to simmer for 1½ to 2 hours or until the beans are tender, stirring minimally and adding water as necessary.
If using ham, allow the beans to cook at least an hour before adding the ham.
Add the other half of the thinly sliced onion with about 30-40 minutes left to cook. Because the chopped onion has disintegrated at this point, it's nice to have some onion texture in the gravy.
When beans are tender, remove from heat and serve with fried or toasted bread or over rice for a complete meal.