这个PRT0DM是什么意思啊

[复制链接]
 楼主| 冰清玉洁 发表于 2015-1-5 19:12 | 显示全部楼层 |阅读模式
我定义io口是用#define Port0_2(b) (PRT0DR=(b==0)?(PRT0DR&0xFB):(PRT0DR|0x04))


PRT0DM是什么意思
zhuhuis 发表于 2015-1-5 19:13 | 显示全部楼层
PRT0DR和PRT0DM等就是寄存器名称,相应解释在datasheet可以找到
 楼主| 冰清玉洁 发表于 2015-1-5 19:14 | 显示全部楼层
PRT0DM0     RT0DM1   设置模式   
几个模式分别代表什么意义啊???????
chenho 发表于 2015-1-5 19:16 | 显示全部楼层
DM0,DM1,DM2,一起用于驱动模式
Bits 7 to 0: Drive Mode x[7:0]. In the PRTxDMx registers
there are eight possible drive modes for each port pin. Three
mode bits are required to select one of these modes, and
these three bits are spread into three different registers
(PRTxDM0, PRTxDM1, and PRTxDM2). The bit position of
the effected port pin (for example, Pin[2] in Port 0) is the
same as the bit position of each of the three drive mode register
bits that control the Drive mode for that pin (for example,
bit[2] in PRT0DM0, bit[2] in PRT0DM1, and bit[2] in
PRT0DM2). The three bits from the three registers are
treated as a group. These are referred to as DM2, DM1, and
DM0, or together as DM[2:0].
 楼主| 冰清玉洁 发表于 2015-1-5 19:17 | 显示全部楼层
嗯,好,我看看,多谢啊
kk5290122 发表于 2015-1-7 21:16 | 显示全部楼层
这些都是一些寄存器的简称……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

307

主题

3250

帖子

5

粉丝
快速回复 在线客服 返回列表 返回顶部