Go to GlobalSpec.com Home
Toolbar   The Engineering Toolbar
The Ultimate Resource for Engineering and Technical Research. (Learn More)

Math Utility Routines

From Microchip Technology, Inc.
 

 
This application note provides some utility math routines for Microchip's second generation of high performance 8-bit microcontroller, the PIC17C42. Three assembly language modules are provided, namely ARITH.ASM, BCD.ASM and FXP?DIV.ASM. Currently in each file the following subroutines are implemented: ARITH.ASM ? Single precision 8 x 8 unsigned multiply ? 16 x 16 double precision multiply (signed or unsigned) ? 16 / 16 double precision divide (signed or unsigned) ? 16 x 16 double precision addition ? 16 x 16 double precision subtraction ? double precision square root ? double precision numerical differentiation ? double precision numerical integration ? Pseudo Random number generation ? Gaussian distributed random number generation BCD.ASM ? 8-bit binary to 2 digit BCD conversion ? 16-bit binary to 5 digit BCD conversion ? 5-bit BCD to 16-bit binary conversion ? 2 digit BCD addition FXP?DIV.ASM. As more routines are available, they will be added to the library. The latest routines may be obtained either through Microchip's bulletin board or by contacting your nearest Microchip sales office for a copy on a MS-DOS floppy. These routines have been optimized wherever possible with a compromise between speed, RAM utilization, and code size. Some routines (multiplication and division) are provided in two forms, one optimized for speed and the other optimized for code size. All the routines have been implemented as callable subroutines and the usage of each routine is explained below. At the end of the application note, the listing files of the above programs are given.

Products & Services
Microcontrollers (MCU) are complete computer systems on a chip. They combine an arithmetic logic unit (ALU), memory, timer/counters, serial port, input/output (I/O) ports and a clock oscillator. Search by Specification | Learn more about Microcontrollers (MCU)
Specialty microprocessors and microcontrollers are specialty or proprietary products and accessories related to microprocessors and microcontrollers. Learn more about Specialty Microprocessors and Microcontrollers

Product Announcements
Acromag, Inc. - New PMC modules interface
I/O signals to a reconfigurable Virtex-5 FPGA optimized for ultra-high-performance DSP. Acromag's new PMC I/O modules provide a DSP-optimized Virtex-5 FPGA for fast execution of complex algorithms... (read more)
OceanServer Technology, Inc. - Tiny Serial Compass
The OS5000-S is a low-cost, three-Axis, tilt-compensated, solid-state digital compass for OEM applications such as antenna positioning, GPS integration, attitude reference, robotic control, platform... (read more)
OceanServer Technology, Inc. - USB or Serial Low Cost Digital Compass
The OS5000-US is a small form factor (1" square) 3-Axis, tilt compensated digital compass. The flexible design allows customers to use either a USB or RS232 Serial connection for system integration. (read more)
Acromag, Inc. - New PMC I/O modules simplify the use of
reconfigurable Virtex-5 FPGAs for high-performance logic applications. Acromag's new PMC I/O modules provide a Virtex-5 FPGA for fast processing of custom logic routines supported by large banks of... (read more)
Microchip Technology, Inc. - Next Generation 16-Bit Digital Signal Controllers
Microchip Technology Inc., a leading provider of microcontroller and analog semiconductors, today announced the first seven next-generation 16-bit dsPIC® Digital Signal Controllers (DSCs) for common,... (read more)
OceanServer Technology, Inc. - OS5000-USD Digital Compass with Depth
The OS5000-USD is a small form factor 3-axis, tilt compensated digital compass which has the unique ability to report the depth in water of a device. The compass string provides the "Dnnn.n" field... (read more)
Acromag, Inc. - New PMC modules feature a Virtex-5 FPGA
with an embedded PowerPC core for high-performance I/O signal processing. Acromag's new PMC I/O modules provide a Virtex-5 FPGA with hard core PowerPC for fast execution of the most complex and... (read more)
Trans-Tek, Inc. - 360° Angular Transducer & Display System
The Model 0607-0001 360° ADT and Model 1004-0000 Display, as a system, provide precision feedback and readout of shaft angular displacement over a full 360° revolution. (read more)

Topics of Interest
This application note presents an implementation of the following fixed point math routines for the PICmicro microcontroller families: Multiplication,Division. Routines for the PICmicro... (Read More)
This application note presents implementations of the following math routines for the Microchip PICmicro microcontroller family: square root function, exponential function, base 10 exponential... (Read More)
This application note presents implementations of the following math routines for the Microchip PICmicro microcontroller family: square root function, exponential function, base 10 exponential... (Read More)
The 4000 series of integrated circuits represents the CMOS IC logic family. This section presents the available 4000 series of ICs for ready reference for logic designers. The IC numbers given here... (Read More)
This application note presents an implementation of the following floating point math routines for the PICmicro microcontroller families: float to integer conversion,integer to float... (Read More)