I wrote; > > I need to implement the following equation in a 16F876. > > RESULT = (255 / A) * B > > A and B are bytes (each have possible values of 01 to FF) > > RESULT is a word (unsigned) for a timer routine counter. > > Speed is not an issue. Code space is not really either. > > What's the best way to do this sort of thing? Further to this, can I simply use the "8 bit by 8 bit to 24 bit floating point" http://www.piclist.com/techref/microchip/math/div/8by8to24fp-ng.htm for the first (divide) part, then the "24 bit by 8 bit" multiply for the second? http://www.piclist.com/techref/microchip/math/mul/23x8bbaj.htm I'm not much at that sort of math if you hadn't guessed by now! :-) Regards... -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu