现代电子技术
現代電子技術
현대전자기술
MODERN ELECTRONICS TECHNIQUE
2014年
18期
30-31
,共2页
“余数拆分”算法%数字电压表%AT89C51%ADC0809
“餘數拆分”算法%數字電壓錶%AT89C51%ADC0809
“여수탁분”산법%수자전압표%AT89C51%ADC0809
remainder split algorithm%digital voltmeter%AT89C51%ADC0809
为了使单片机在采用汇编语言设计简易数字电压表的小数部分处理过程中减少利用的寄存器数量及编程复杂度,采用“余数拆分”算法。方法不需要做16位的除法运算,仍采用8位的寄存器即可以获得所要求精度的小数位数。对该算法在简易数字电压表中的应用进行了原理分析,同时进行了软件设计,并通过Proteus仿真来验证该处理方法的可行性。该算法使得所需要的硬件资源减少、编程简单,值得应用与推广。
為瞭使單片機在採用彙編語言設計簡易數字電壓錶的小數部分處理過程中減少利用的寄存器數量及編程複雜度,採用“餘數拆分”算法。方法不需要做16位的除法運算,仍採用8位的寄存器即可以穫得所要求精度的小數位數。對該算法在簡易數字電壓錶中的應用進行瞭原理分析,同時進行瞭軟件設計,併通過Proteus倣真來驗證該處理方法的可行性。該算法使得所需要的硬件資源減少、編程簡單,值得應用與推廣。
위료사단편궤재채용회편어언설계간역수자전압표적소수부분처리과정중감소이용적기존기수량급편정복잡도,채용“여수탁분”산법。방법불수요주16위적제법운산,잉채용8위적기존기즉가이획득소요구정도적소수위수。대해산법재간역수자전압표중적응용진행료원리분석,동시진행료연건설계,병통과Proteus방진래험증해처리방법적가행성。해산법사득소수요적경건자원감소、편정간단,치득응용여추엄。
In order to reduce the number of registers used by MCU and programming complexity in the decimal part pro-cessing in the simple digital voltmeter designed with assembly language,the remainder split algorithm was adopted,which does not need to do 16-place division operation,but still uses the 8-bit register to obtain the decimal digits of the required accuracy. The principle analysis of algorithm application in simple digital voltage meter is conducted. The software design was made. The feasibility of the processing method was verified by Proteus simulation. The algorithm makes the required hardware resources re-duced and the programming simple. It is worth of application and promotion.