HankMcSpank
New Member
I need to switch a P-chan mosfet on/off (mosfet source voltage will be 9V ...ie a battery) from a PIC pin at about 16Khz - the frequency has to be this high as it'll be in an audio circuit (ie put it above the average adult's hearing) ....a the PIC has a VCC of just 3.3V....therefore the source switching waveform is 16Khz, 0 to 3.3V.
Now clearly, a PIC with a 3.3V cannot turn a P-Chan mosfet whose source is tied to 9V on/off.
So how to get the PIC's output level to be right for switching the p mosfet? At first I thought, just use an n channel mosfet ...gate to the pic pin, source to ground, and a 10k resistor in the drain to 9V...connect the drain/resistor junction to the p mosfet gate .....that will switch between 0V & 9V nicely ...indeed it does, but I don't get a nice square wave on the p chan gate.. it's got typical CR slope thing going on - which means capacitance is creeping in from somewhere - I'm figuring the N mosfet's internal capacitance? (or possibly the p mosfet's gate to source capactiance?)
I tried an digital NPN in place of the fet at q1 - no better!
So what would be the best way to approach this...I don't want to drop the value of the switching frequency ....nor the 10k resistor (ie between the n channel mosfet & 9V as that would really start ramping up the current when the n chan mosfet is switched on (this is destined for a battery fed device).
I'm surprised to be hitting such problems....16khz isnt that high a frequency - there must be a way I can get that p channel gate switched with a nice square wave ?!!
I'd happily buy a proper load switch...but they all seem to be 5V .... I need 9V....also I'd wonder if they'd be any better at 16khz than what I'm experiencing?
**broken link removed**
Now clearly, a PIC with a 3.3V cannot turn a P-Chan mosfet whose source is tied to 9V on/off.
So how to get the PIC's output level to be right for switching the p mosfet? At first I thought, just use an n channel mosfet ...gate to the pic pin, source to ground, and a 10k resistor in the drain to 9V...connect the drain/resistor junction to the p mosfet gate .....that will switch between 0V & 9V nicely ...indeed it does, but I don't get a nice square wave on the p chan gate.. it's got typical CR slope thing going on - which means capacitance is creeping in from somewhere - I'm figuring the N mosfet's internal capacitance? (or possibly the p mosfet's gate to source capactiance?)
I tried an digital NPN in place of the fet at q1 - no better!
So what would be the best way to approach this...I don't want to drop the value of the switching frequency ....nor the 10k resistor (ie between the n channel mosfet & 9V as that would really start ramping up the current when the n chan mosfet is switched on (this is destined for a battery fed device).
I'm surprised to be hitting such problems....16khz isnt that high a frequency - there must be a way I can get that p channel gate switched with a nice square wave ?!!
I'd happily buy a proper load switch...but they all seem to be 5V .... I need 9V....also I'd wonder if they'd be any better at 16khz than what I'm experiencing?
**broken link removed**
Last edited: