I want to build a buck converter with p type mosfet. Specification: input voltage:24v Output voltage:12v I have chosen frequency 20khz,and my inductor value and capacitor value is 1mH and 20uF.
Now all seems to be okay.the problem is i cant drive the pmosfet.I wanted to drive Pmosfet with a NPN transistor.The circuit diagram is given below.Is this okay? If this procedure is okay then what is the problem,why it is not giving me output 12 vol? If the circuit is not okay than what kind of circuit should i use to drive Pmos?