Ruben Jšnsson wrote: > Hello Tjaart > > How about this one. > > It takes 76 us for 1 pulsewidth output which at 4Mhz > equals to a pwm frequency of abt 13kHz. > > I have *not* tested the code (which probably means that it doesnt > work :-) > > ;pw is current pulse width variable (0-F). > ;f_outp is outputbit to fet. > ;f_overcurrent is input from overcurrent comparator. > ;f_undercurrent is input from undercurrent comparator. > ;f_cp1 and f_cp2 is charge pump outputs. > This looks very good. I will test it over the weekend or on Monday. You have already beat me 10 times! -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za |--------------------------------------------------| | WASP International | |R&D Engineer : GSM peripheral services development| |--------------------------------------------------| |SMS mailto: tjaart@sms.wasp.co.za (160 chars max)| | http://www.wasp.co.za/~tjaart/index.html | |Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973| | WGS-84 : 26ˇ10.52'S 28ˇ06.19'E | |--------------------------------------------------|