Oneverycommonandrelativelyquickmethodforfind-
ingthesquarerootofanumberistheNewton-Raphson
method.Althoughthismethodisquickintermsof
mathematics,italsorequiresextensiveuseofdivision
toproduceresults,usuallyiteratingmanytimes.Inthe
PIC18CXX2microcontrollerfamily,thoughnotdifficult,
divisiondoesrequiresseveralbasicoperations.How-
ever,withthehelpofthesinglecyclehardwaremulti-
plier,oneofthemanynicefeaturesinthePIC18CXX2
andtheuseofatechniquedifferentfromtheNewton-
Raphsonmethod,divisionisavoided.ThefollowingTB040FastIntegerSquareRootalgorithmdemonstrateshowthesinglecyclemultiplierAuthor:RossM.FoslerisusefulincalculatingasquarerootandatthesameMicrochipTechnologyInc.time,saveprocessortime.THEALGORITHMINTRODUCTIONUsingthebinarynatureofthemicrocontroller,theOneverycommonandrelativelyquickmethodforfind-squarerootofaf
暂无评论