Electronic – Help with P-channel mosfets

mosfet

i am trying to get my head around p channel mosfets and bought some A03401 mosfets. As i understand the mosfet will not allow current to flow if Vgs == Vds and thats why the pull up resistor is there. I have not even attempted to connect a microcontroller yet because the led was on in this configuration. i read Vgs and Vds and they are both 0.6v and so i am not sure why the mosfet is allowing current to flow. any help would be much appreciated. thanks.
ps. appolgies for poor picture quality, camera is broken.

circuit

Best Answer

You have the P-MOSFET connected wrong. The Source (S) terminal should be toward the 5V and the Drain (D) should connect to the LED in your diagram.

The condition where the P-MOSFET will be off is if the voltage between the Gate (G) and the Source (S) is less than the VGSTHR.

The reason that the LED lit up in your drawn configuration is because the body diode was forward biased and letting current pass from the D terminal to the S terminal.