PWM and LED Bar Graph

BeanieBots

Moderator
Fortunately, your MOSFET requirements are not very severe so just about any logic level type will do. The one advised by boriz should be fine but might be a little overkill for your app. If you have one, fine, use it. If you need to buy one, then go for lower spec and save a little expense.

Believe it or not, one with a slightly LOWER current rating is likely to run cooler if driven direct from a PICAXE rather than with a proper driver. This is because lower current (and voltage) devices have less gate capacitance and thus turn on/off quicker.

I'd use an IRF520. Why, because I have a few and it would do the job. It also happens to be the one used on the PICAXE high power project board and is also very cheap and readily available.
 

Dippy

Moderator
Setting PWM duty manually reuqires manipulating the registers, like this example.

Assuming we have fDuty as the duty value:
CCP1CON.5 = fDuty.bit1
CCP1CON.4 = fDuty.bit0
CCPR1L = fDuty >> 2

I'm not sure whether that applies to all PICs but at least it start your ball rolling.
You'll have to read the PIC Data Sheet to see the register number.
 
Top