所需E币: 3
时间: 2019-12-24 20:51
大小: 652.5KB
ThisapplicationnoteprovidessomeutilitymathroutinesforMicrochip’sPIC16C5XandPIC16CXXXseriesof8-bitmicrocontrollers.Thefollowingmathoutlinesareprovided:•8x8unsignedmultiply•16x16doubleprecisionmultiply•FixedPointDivision(Table3)•16x16doubleprecisionaddition•16x16doubleprecisionsubtraction•BCD(BinaryCodedDecimal)tobinaryconversionroutines•BinarytoBCDconversionroutines•BCDaddition•BCDsubtraction•SquarerootThesearewritteninnativeassemblylanguageandthelistingfilesareprovided.Theyarealsoavailableonadisk(MS-DOS).Alltheroutinesprovidedcanbecalledassubroutines.Mostoftheroutineshavetwodif-ferentversions:oneoptimizedforspeedandtheotheroptimizedforcodesize.Thecallingsequenceofeachroutineisexplainedatthebeginningofeachlistingfile.AN526PIC16C5X/PIC16CXXXMathUtilityRoutinesTABLE1:PERFORMANCESPECSAuthor:AmarPalacherlaMicrochipTechnologyInc.SpecProgramMemoryInstructionCyclesPLEASENOTE:ThisapplicationnoteusestheoldSpeedEfcient3537MicrochipMathRoutineformat.Itisintendedforref-CodeEfcient1671erencepurposesonlyandisbeingprovidedforthoseofyoustillimplementingBinaryCodedDeci-FIGURE1:FlowchartforUnsigned……