常驻嘉宾
我爱雯婕
- 积分
- 4657
- 威望
- 2223
- 贡献
- 1682
- 兑换币
- 4
- 注册时间
- 2009-3-4
- 在线时间
- 376 小时
|
1贡献
本帖最后由 chenrunshe_007 于 2009-5-9 16:27 编辑
Apprently,16 bit MCU is good at dealing with the "unsigned int" variable(also we can say the "word"), so we had better use the "word" variables more often, compared with no matter the "byte" or "float" varialbes. But one rule often lead us is that we should try to use simple varialbes as much as possible, to make the program more simplfied, so that the MCU will operate more quickly. There is a contradiction here, how to judge this situation?when to use the "word" variable and when to use the "byte" variable on earth? Please help me, let's talk about it.
由于本人无聊,调试车调累了决定换一种方式提问,各位朋友大可不看上面的东西。我觉得还是有必要翻译一下:总所周知,十六位的单片机擅长处理16位变量,所以我们要尽量声明变量为unsigned int(或者word),但是编程有一条准着指导这我们:尽量用简单的变量,使程序更简洁运行跟更快。这时候就有矛盾了,到底什么时候声明变量为word好,什么时候声明变量为byte好?有什么准则么?希望大家能够帮我一把。 |
|