Whats this op amp doing?




http://www.modtronix.com/products/prog/pickit2/pickit2%20data***.pdf

(updated pdf on microchips site but I think its almost exactly the same)

I'm trying to understand what the opamp on page 29 is doing. It looks to be
acting as a comparator but I can't make much sense of it. It seems to be
controlling the power to the target device(i.e., simply turning on and off
the mosfet). Not sure why they are using the op amp though but I guess it
might have something ot do with the charge pump on the next page?

What I think is going is maybe that the op amp is comparing the voltage
V_TGT and turning on and off the mosfet which feeds the inductor to create a
charge pump and so on... the control being done by the pic itself. I can't
see why though the op amp is necessary unless its needed to "drive" the
mosfet for some reason?

Any ideas?

Thanks,
Jon


.