P Channel MOS transistor as a switch, the gate source of the threshold is -0.4v, when the voltage difference of the gate source is -0.4v will make DS conduction, if S is 2.8v,g to 1.8V, then Gs=-1v,mos tube conduction, D is 2.8V
If S is 2.8v,g to 2.8V,VGSW
Then the MoS tube is not conduction, D is 0V,
So, if 2.8V is connected to S, the MoS Tong is powering the system, and the system is connected to D, using G control.
Then the gpio connected to the G high level to 2.8-0.4=2.4v above, in order to make the MoS tube shutdown, low level to enable the MoS tube.
If the voltage range of the Gpio that controls G is 1.8V, then the Gpio High is 1.8v,gs for the 1.8-2.8=-1v,mos tube and cannot be turned off.
When the Gpio is low, if 0.1V, then the GS for 0.1-2.8=-2.7v,mos tube conduction. In this case, the GPIO will not be able to control the conduction and shutdown of the MoS tube.