« Return to Thread: - Need fast divide by 14 constant routine? ( Random access 8-bit data in PIC16F flash )

Re: - Need fast divide by 14 constant routine? ( Random access8-bit data in PIC16F flash )

by William "Chops" Westfield :: Rate this Message:

Reply to Author | View in Thread


On May 8, 2008, at 11:31 AM, Mark Scoville wrote:
> Or mult by 18, then divide by 256. Will not be any more accurate than
> *9/128, but Divide by 256 is simply dropping the least sig byte.
>>
>> Multiply by 9, then divide by 128?  (close..)

Not close enough.  Fails about 50 times over the range of 1..256, and is
off by more than 1 by starting at 910.

BillW

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

 « Return to Thread: - Need fast divide by 14 constant routine? ( Random access 8-bit data in PIC16F flash )

LightInTheBox - Buy quality products at wholesale price