摘要
为了使单片机在采用汇编语言设计简易数字电压表的小数部分处理过程中减少利用的寄存器数量及编程复杂度,采用"余数拆分"算法。方法不需要做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.
出处
《现代电子技术》
2014年第18期30-31,共2页
Modern Electronics Technique