See also:
http://avtanski.net/projects/math Hello, I have set up an online generator for multibite math code (addition, subtraction, multiplication, division, logical operations) that might be useful for somebody: http://avtanski.net/projects/math In the form you enter operand size (how many bytes each number consists of), select what subroutines you need, press a button and get your code. Regards,  Alex+
http://mifit.utic.com.ar/ Mifit (Micro fitter) searches the best approximation to a set of data points using simple equations (rects and quadratics), and computes the maximum absolute and relative errors for the adjusted interval, the whole data set, or a specified range. It can generate the assembly code to implement it (currently only for Microchip's PIC family of microcontrollers). Currently only Linux is supported.
Edi Permadi of President University Says:
The AES128 could be efffectively implemented on PICmicros processor. I was coding that cipher on PIC16F84 and PIC16F877 and of course PIC16F877 results better throughput. If you wish to see my code, i may freely download it on links below.+Source Codes: v1.0 v1.1 v1.2 v1.3 v1.4
Now, PIC16F877 could run AES128 faster than previous version. v1.5.7If you wish to see my PICmicros cryptographic codes, you may see it on
http://cryptonutter.googlecode.comthe articles of those codes are available on
http://edipermadi.wordpress.com
Comments:
Questions:
Hi
Using PIC16F877  I have an input value of up to 65535 (from an A/D convereter) and want to scale it by a variable factor to give an answer from 0.0001 up to 99999, with 1 in 65535 resolution. (The value will be displayed on a 5 digit 7 segment display, with + or  sign)
I'm struggling.. any bright folk have a suggestion?
Thanks in advance,
Graham
James Newton replies: So 0 will be .0001? and 65535 will be 99999? First, convert to integer: Multiply your beginning and ending output by 10000. 0.0001 * 10000 = 1. 99999 * 10000 = 999,990,000. Now, subtract the starting value from the ending value to find the output range. 999,990,000  1 = 999989999. Now for any input value, you will multiply it by 999989999/65535 = 15258.869291218432898451209277485 and then add 1. You will display the first 5 digits of this answer, then a period, then the last 4 digits.
For example, if the input is 0, the answer will be 0 * 15258.869291218432898451209277485 + 1 = 1. Please note that this is actually 000,000,001 which will be displayed as 00000.0001. If the input is 65535, the answer will be 65535 * 15258.869291218432898451209277485 + 1 = 999990000 which will be displayed as 99999.0000
Now, I have no idea how the heck you are going to get that kind of precision
out of a PIC. The best I can show you is the input * 15258.9 + 1. with that,
the top end is 99999.2012. The code to do the multiplication is at
http://www.piclist.com/cgibin/constdivmul.exe?Acc=ACC&Bits=16&endian=little&Const=15258.9&ConstErr=0&Temp=TEMP&cpu=pic16
Increment the result by one:
http://www.piclist.com/techref/microchip/math/incdec/32bitwz.htm
Convert to decimal ASCII:
http://www.piclist.com/techref/microchip/math/radix/b2bp32b10d.htm
+
louis frias asks: Hi every one I am looking for 48 bit x 48 bit "signed integer divide" I see in the your math libraries 48/24 bit code but not 48/48. If there is non ...Is there any one willing to write/modify any existing signed integer divides such as the 32/32 signed divide given in the microchip math library Handbook ??????????????? Please email to me loui@g2a.net at your earliest convenience Louis Frias
Archive:
Code:
file: /Techref/microchip/math/index.htm, 15KB, , updated: 2013/7/22 17:07, local time: 2015/5/28 13:08,

©2015 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/microchip/math/index.htm"> PIC Microcontoller, PIC Math Methods</A> 
Did you find what you needed? 
PICList 2015 contributors:
o List host: MIT, Site host massmind.org, Top posters @20150528 RussellMc, IVP, Bob Blick, James Cameron, alan.b.pearce, Dwayne Reid, Josh Koffman, embedded systems, Isaac Marino Bavaresco, Robert Dvoracek, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. ongoing support is MOST appreciated! * Contributors: Richard Seriani, Sr. 
Welcome to www.piclist.com! 
.