Math@ SX specific math@,
http://avtanski.net/projects/math Hello, I have set up an online generator for multi-bite 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.
The AES-128 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.+
If you wish to see my PICmicros cryptographic codes, you may see it on
the articles of those codes are available on
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,
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
Increment the result by one:
Convert to decimal ASCII:
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 firstname.lastname@example.org at your earliest convenience Louis Frias
|file: /Techref/microchip/math/index.htm, 15KB, , updated: 2013/7/22 17:07, local time: 2015/4/27 14:04,
|©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?key=divide"> PIC Microcontoller, PIC Math Methods</A>
|Did you find what you needed? "divide"|
PICList 2015 contributors:
o List host: MIT, Site host massmind.org, Top posters @20150427 IVP, RussellMc, Bob Blick, alan.b.pearce, James Cameron, Josh Koffman, Dwayne Reid, Isaac Marino Bavaresco, Robert Dvoracek, Jesse Lackey,
* 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 RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!