I've fallen into the trap of using Pic controllers for everything now. I'm designing a stepper motor control circuit for bipolar motors and after a bit of reading, a constant current chopper circuit appears to be the best idea. Now if you consider a basic circuit using mosfets for energising the poles of the motor and a 0.1 ohm resistor in the ground of the driver circuit for current sensing my question is as follows : If I fed the high side of the 0.1 ohm resistor into a comparator input on a 16f628 with a simple RC network to smooth it slightly with the other side of the comparator to a 0-5 volt variable voltage source, in theory I should be able to detect when the current rises above a preset value. The PIC would monitor an input (RB7) and output the value on RB4 i.e. high on RB7 would output high on RB4. If the output from the comparator was high (indicating an over current state), the output to RB4 would be turned off until the comparator showed a low. RB4 would feed the mosfet controlling the motor. Any ideas about this idea ? I should be able to control 2 phases with one single PIC with a chopper frequency of many Khz with a 4mhz internal oscillator. Cheers Dom -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads