1. 首页
  2. 课程学习
  3. 嵌入式
  4. PIC16C5X的PIC16CXXX数学函数实用例程

PIC16C5X的PIC16CXXX数学函数实用例程

上传者: 2022-10-22 15:22:49上传 PDF文件 652.50 KB 热度 10次

Thisapplicationnoteprovidessomeutilitymath

routinesforMicrochip’sPIC16C5XandPIC16CXXX

seriesof8-bitmicrocontrollers.Thefollowingmath

outlinesareprovided:

•8x8unsignedmultiply

•16x16doubleprecisionmultiply

•FixedPointDivision(Table3)

•16x16doubleprecisionaddition

•16x16doubleprecisionsubtraction

•BCD(BinaryCodedDecimal)tobinaryconversion

routines

•BinarytoBCDconversionroutines

•BCDaddition

•BCDsubtraction

•Squareroot

Thesearewritteninnativeassemblylanguageandthe

listingfilesareprovided.Theyarealsoavailableona

disk(MS-DOS

).Alltheroutinesprovidedcanbe

calledassubroutines.Mostoftheroutineshavetwodif-

ferentversions:oneoptimizedforspeedandtheother

optimizedforcodesize.Thecallingsequenceofeach

routineisexplainedatthebeginningofeachlistingfile.AN526PIC16C5X/PIC16CXXXMathUtilityRoutinesTABLE1:PERFORMANCESPECSAuthor:AmarPalacherlaMicrochipTechnologyInc.SpecProgramMemoryInstructionCyclesPLEASENOTE:ThisapplicationnoteusestheoldSpeedEfcient3537MicrochipMathRoutineformat.Itisintendedforref-CodeEfcient1671erencepurposesonlyandisbeingprovidedforthoseofyoustillimplementingBinaryCodedDeci-FIGURE1:FlowchartforUnsigned

用户评论