Re: Connection of two open drain outputs to control common LEDs by PIC32MZ
☄ Helpfulby flanker 2020/08/14 12:33:29
I would expect that to work, and to be 'safe'. Be aware that different IO pins have different output specs - for example the PIC32MZ2048EFG100 with which I am working at present, has some pins rated at 10mA, others at 15mA, and yet others at 20mA.
With 470R resistors - even if your LEDs are red with a Vf of (say) 1.4V, you should only be pulling about 7.5mA, so it should all be good.
My main concern would be that if the battery is flat, and the PIC is not receiving 3.3V on its Vdd pins, you may find it tries to half power up through the protection diodes on the IO pins, making power reset flaky.
If you can guarantee that the PIC will always have 3.3V on it whenever the USB supply is present (even if the PIC is in reset, so drawing almost no current), I'd expect you to be OK.
Let us know how it goes!