Quote Originally Posted by sayzer View Post
If your PIC has comparator, then you can use it to detect current as you wish.
The example below shows the use of an external comparator, but if your PIC has an internal one then you are good to go.


<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2892&d=1223533980" >
________________
Thank you Sayzer, for the hint.
To be honest, I've not clearly understood if GH1 and GH2 are 2 different pins or whatelse. Any suggestions for the filter capacitanze (R and C values) that goes to the comparator? I think to drive the motor with max 5KHz PWM wave. Voltage 24Volts, maximum allowed current to the motor 5A.
Some suggestions also for a good logic level MOSFET for this kind of motor and the name for a fast recovery diodes?

Thank you a lot.