Niveau: Supérieur, Doctorat, Bac+8
X INTRODUCTION This application note provides some utility math routines for Microchip's PIC16C5X and PIC16CXXX series of 8-bit microcontrollers. The following math outlines are provided: • 8x8 unsigned multiply • 16x16 double precision multiply • Fixed Point Division (Table 3) • 16x16 double precision addition • 16x16 double precision subtraction • BCD (Binary Coded Decimal) to binary conversion routines • Binary to BCD conversion routines • BCD addition • BCD subtraction • Square root These are written in native assembly language and the listing files are provided. They are also available on a disk (MS-DOSÒ ). All the routines provided can be called as subroutines. Most of the routines have two dif- ferent versions: one optimized for speed and the other optimized for code size. The calling sequence of each routine is explained at the beginning of each listing file. SINGLE PRECISION UNSIGNED MULTIPLICATION (8x8) This routine computes the product of two 8-bit unsigned PLEASE NOTE: This application note uses the old Microchip Math Routine format. It is intended for ref- erence purposes only and is being provided for those of you still implementing Binary Coded Deci- mal(BCD) routines. For any new designs, please refer to application notes contained in Microchip's Embedded Control Handbook Volume II - Math Library. Author: Amar Palacherla Microchip Technology Inc.
- point divide
- bit
- binary
- unsigned fixed
- utility routines
- unsigned
- routine
- adjust bcd