Ok Ill go through a few terms (on this datasheet specifically):
Vds is the maximum voltage the MOSFET can get to power your components (36V)
Vds cont. is the maximum average voltage before it melts (28V)
now scrolling down:
VIH is the signal line voltage (coming from your microcontroller or whatever) (4.5-5.5V)
VIL is ground (0V-.5V)
Max F is the maximum frequency your PWM can go (1.5khz)
So basically send your 5V PWM from your PIC to the 'In' pin to turn on the MOSFET, connect a 0V ground to pin 'S', and up to 28V average to the 'D' pin.
Now looking at your schematic . . .
Know that a diode typically drops your voltage by about .7V. So if you have a V1 of 5V, the MOSFET turn on pin will only see 4.3V, which is below the spec on the datasheet. So if your PIC is powered at 5V, your circuit will not work.
You may want to consider PWM optimized MOSFETs, or some other MOSFET that has a lower turn on voltage. Or you can consider running your PIC at a higher voltage, say 5.2V . . .
Additional notes:
- Higher turn on voltages result in higher MOSFET efficiency and hence a lower chance of melting from too much wasted heat.
- If you plan to run more than a watt or two through it, I highly recommend heat sinking your MOSFET.