|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Most of this code has originated from requests and challenges on the PICList mailing list. I tried to debug the routines as much as possible (for a hobby), but no guarantees. In case you find a bug, please let me know. Please send any questions or comments to golovchenko@mail.ru, or the PICList, as many nice folks hang around there and most probably will be glad to help you. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Questions:
Nikolai answers:
... you could use the tested routines from piclist.com. You will need:Please check http://www.piclist.com/techref/microchip/math/index.htm
- decimal to binary conversion routine (4 digits to 16 bits)
- 16 bit by 16 bit division (to find 10000/x)
- binary to decimal conversion (16 bits to 4 digits)
Comments:
Says: Vittorio Capini replies: hi Mr. Nikolai. In the code "Fixed Point Q(0.16) log2(x) I do not understand how to build the table, starting from the relationship [log2(0.5)-log2(0.5:0.5/16:1)]. what is it log2(0.5:0.5/16:1) ? can you take an example.
See also:
Vittorio Capini Says: