论文部分内容阅读
在需要频繁输入数据的单片机应用系统中,通常需要使用19个按键来完成输入数据的任务。这些按键分别是0~F数码键、小数点键、符号键和确认(回车)键。然而,在许多微型化的单片机应用系统中,所需输入的数据类型比较简单、数据量不大且频次也不高,但对体积的要求却非常苛刻。这时,如果采用上述的数据输入方法,不但无法减小面板尺寸,还会浪费一定的硬件资源。因此,能否减少按键的数量,是该类产品设计上的一个关键问题。四键输入数据的原理和技巧 原理 我们知道,一个n进制的任意整数,是由正负符号、位数和0~(n-1)之间变化的数码组成的。根据这个规律,我们可以使用三个按键,通过单片机系统分别控制被输入数据的符号值、当前输入位值和当前输入位上的数码值,便可以输入一个n进制的任意整数。为了使系统能够真正接收输入的一组数据,通常还需要增加一个确认(回车)键。因此,在实际应中,
In the need to frequently enter the data of the microcontroller applications, usually need to use 19 keys to complete the task of inputting data. These keys are 0 ~ F numeric keys, decimal point keys, symbolic keys and confirm (Enter) key. However, in many miniaturized SCM applications, the type of data to be input is relatively simple, the amount of data is not large and the frequency is not high, but the volume requirement is very harsh. At this time, if the above data input method is adopted, not only the panel size can not be reduced, but also a certain amount of hardware resources are wasted. Therefore, the ability to reduce the number of keys is a key issue in the design of such products. Four-key input data theory and skills principle We know that an arbitrary integer n-hexadecimal, is composed of positive and negative symbols, digits and 0 ~ (n-1) between the changes in the digital composition. According to this rule, we can use the three keys to control the symbolic value of the input data, the current input bit value and the digital value of the current input bit by using the single-chip microcomputer system, so as to input any integer in n-ary. In order for the system to actually receive the incoming set of data, it is often necessary to add a confirm (enter) key. Therefore, in practice,