Hi David, If all you need is overcurrent and don't need super precision, you can monitor the voltage drop in your power transistors. The trick is to ignore the voltage when the transistor is off. But if you are generating the drive from software then that is easy too. I didn't use analog in, just a regular IO port. Don't use pins that are schmitt triggers! Use the ones with ttl levels. I posted a project many years ago, it uses a 16F876 generating PWM from the timer interrupt and doing cycle-by-cycle current limiting, maybe it will give you some ideas: http://bobblick.com/techref/projects/sv2hb/sv2hb.html Sorry my website hasn't been updated in 15 years, but at least the pages are still there :) Bob On Mon, Jun 22, 2015, at 06:19 AM, David C Brown wrote: > I need an overcurrent detector for a small DC motor. I thought of using > low side sensing with the ADC of a PIC measuring the voltage across the > sense resistor and then doing the integration and peak suppression in > software. I can tolerate half a volt or more voltage drop in normal > operation. >=20 > This seems to such an obvious idea that I am surprised that I can't find > any reference to it in a search for "overcurrent detection using PIC". =20 > So > is there some gotcha that I am too stupid to see? --=20 http://www.fastmail.com - Email service worth paying for. Try it for free --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .