I'm trying to switch 12V with an IRL540 from a 5V micro. Right now I have it a 1k resistor between 12V and the drain, the source to ground, and the gate has a 100kHz 5V square wave on it. That's the whole circuit, this was just to validate the switching.
If I go faster than this it starts to not even reach 12V before I turn on the FET and pull it down again.
As we can see from the capture there's quite a lag in rise time, I suspect by the charge needing to return to the drain of the FET. But should it really take this long? It's at least an order of magnitude longer than what's specified in the data sheet (given that's with Vdd at 50V, but this seems very slow). My square wave seems fine. What can I do to fix this?