Board logo

标题: 56f8013中怎么用Quadrate Count Mode [打印本页]

作者: skywolflgd    时间: 2006-6-28 09:57     标题: 56f8013中怎么用Quadrate Count Mode

56f8013中没能专门的编码器接口,在它的介绍中好像提到可以用它的定时器来做这样的接口,只是我一直没有搞清楚这个问题.不知道哪位有做过,请指教!谢谢

[此贴子已经被作者于2006-6-28 9:57:51编辑过]


作者: powerwu    时间: 2006-6-30 06:55

在控制寄存器TMRCTRL中当计数模式CM设置为100, PCS选择一个输入管脚为A相脉冲输入, SCS选择选择另一个输入管脚为B相脉冲输入,○NCE选择为0(重复计数), LENGTH = 0, DIR = 0. OM =0, 计数器将初级和次级外部输入信号作为积分编码信号进行解码,提供了计数和方向信息。英文手册13-9和13-10页给了详细介绍。

• Set the Control (CTRL) register PCS bits to 0000
• Set the Control (CTRL) register SCS bits to 01
• Clear the Status and Control (SCTRL) register
• Set the Counter (CNTR) register to 0x0000
• Set the Load (LOAD) register to 0x0000
• Set the Compare 1 (COMP1) register to 0xFFFF
• Set the Compare 2 (COMP2) register to 0x0000
• Clear the Comparator Status and Control (CSCTRL) register
• Set the Control (CTRL) register CM bits to 100

http://www.freescale.com/files/dsp/doc/ref_manual/MC56F8000RM.pdf
作者: piaoyi0358    时间: 2006-8-4 10:29

兄弟,你开发56f8013用的codewarrior全代码编译license,能不能给我传一个piaoyi0358@126.com
非常感谢!!!!!




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0