Added Digital Port Functions.  Working but need to be cleaned up.