added port/pin agnostic init routine