I have also learned recently of an IC family that looks like a good option: LMN400 or LMN200 from Diodes incorporated. These devices bundle an n-channel MOSFET (to drive the gate) and PNP to do the heavy lifting.
Using one of these load switches keeps the polarity of the signal the same as my current config so I wouldn't have to rewrite any code.
One of the main reasons to use a microcontroller is that it lets you keep the hardware simple by doing the rest in software. Changing the polarity of an output pin should be a minor change, not a rewrite.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16