> 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? If neither speed nor space is an issue just call math routines. You may have to expand the values to mutiple bytes first, depending on what math routines you use. Microchip has some math routines in app notes. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu