So I've made this basic circuit to drive Vout between ~0V and ~1.65V.
The default state should be ~0V, hence I use a p-type mosfet:
https://docs.rs-online.com/d95a/0900766b800ae907.pdf
Now, for some reason it looks like the fet has broken down after applying a voltage to the gate the first time by closing the switch (s1). I'm having quite a hard time in fet-based circuit design so maybe somebody could help me a bit in what I'm doing wrong or how I'm mis-understanding the situation?
The source is driven by a 5V supply. R1 = 20k, R2 and R3 are 10k.
Q1 is an FDV304P P-channel mosfet as given in the link above.
The purpose of this circuit is to drive an IC's enable pin. By default this enable should be turned low but when the switch is closed, the enable should be high. The switch simulates a IO pin from another IC.
Best Answer
As @"Math Keeps Me Busy" says you can do this without a mosfet, but if you would like to use one you can do it like this:
simulate this circuit – Schematic created using CircuitLab
The first one uses a P-mosfet. Changes from yours that I have made:
The second one uses an N-MOSFET as a low-side switch. It will invert the output (Vout* will be 1.66V when SW3 is open, and 0V when SW3 is closed)