This is my buck/boost converter in the simulation. I get the desired voltage of -12 V but in the real circuit I am only getting -4.88 V, and my transistor heats up; I think it is even burned. I don't know how to turn on and off my transistor safely.
Why am I getting a higher voltage than -12 V?
My transistor is silicon PNP.