EMC8BIT单片机指令应用的误区及其技巧.docx
![preview](https://dl-preview.csdnimg.cn/86818173/0001-c1eb1691eae98dbe66133f09b89cc688_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
EMC8BIT单片机指令应用的误区及其技巧 EMC8BIT单片机指令应用的误区及其技巧是单片机应用开发中非常重要的一份资源,涵盖了EMC8BIT单片机指令应用的各种误区和技巧,旨在帮助开发者更好地理解和应用EMC8BIT单片机指令,从而提高开发效率和产品质量。 1. 减法指令的误区 EMC8BIT单片机的减法指令有三条,分别是SUB A,R、SUB R,A和SUB A,K。需要注意的是,不论A的位置在前面还是后面,A都是减数,不是被减数。如果想计算A-2的值,如果写成SUB A,@2,其实是执行2-A。解决方法是使用ADD A,@256-2或ADD A,@254。 2. 查表(散转)指令的误区 EMC8BIT单片机的查表指令有两种误区。第一种是关于"ADD R2,A"指令。在EMC153/156的指令系统中,没有TBL指令,当要查表时只好用"ADD R2,A"(或MOV R2,A)来代替。但是使用"ADD R2,A"时要注意,这条指令只能改变PC指针的低8位(即256字节),高位其它位一律清零!所以使用"ADD R2,A"时必须保证整个表格都在ROM的每一页的前256字节区间内。 第二种误区是关于"TBL"指令。在EMC447/458及后续的芯片的指令系统中,增加了一条新指令----就是TBL指令。TBL是查表指令,号称可以放在程序的任何位置。但是且慢----TBL指令的使用也要注意:首先,表格不能跨页(每1024字节为一页(PAGE));其次,表格也不能跨"段"。 3. CY标志的误区 EMC8BIT单片机的减法指令对CY标志的影响与其他单片机指令系统不同。在EMC8BIT单片机中,当减法发生借位时,CY=0,未发生借位时CY=1。如果不注意这点,很容易在一些运算或判断程序中留下BUG。 4. EMC8BIT单片机指令应用技巧 EMC8BIT单片机指令应用技巧包括减法指令的技巧、查表指令的技巧、CY标志的技巧等。例如,在进行减法运算时,需要注意减法指令的顺序和ACC的位置。在进行查表运算时,需要注意查表指令的使用限制和表格的大小限制。 EMC8BIT单片机指令应用的误区及其技巧是单片机应用开发中非常重要的一份资源,旨在帮助开发者更好地理解和应用EMC8BIT单片机指令,从而提高开发效率和产品质量。
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/release/download_crawler_static/86818173/bg1.jpg)
![](https://csdnimg.cn/release/download_crawler_static/86818173/bg2.jpg)
![](https://csdnimg.cn/release/download_crawler_static/86818173/bg3.jpg)
![](https://csdnimg.cn/release/download_crawler_static/86818173/bg4.jpg)
![](https://csdnimg.cn/release/download_crawler_static/86818173/bg5.jpg)
剩余78页未读,继续阅读
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/a7a9f6748ed941a7b7e67cb0d6d5d714_sun13212715744.jpg!1)
- 粉丝: 104
- 资源: 2万+
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)