📄 基于tms320f2812事件管理器的一种测频方法.htm
字号:
t,这里时基T1的频率为时钟主频除以分频系数,即f<SUB>T1</SUB>=150M/64,因此所测频率f=150M/64t。下面为捕获中断子程序。</P>
<P>unsigned int capnum1;</P>
<P>unsigned int capnum2;</P>
<P>float f;</P>
<P> float pinlvf[5];</P>
<P> int fnum=0;</P>
<P> interrupt void CAPINT1_ISR(void) //
EV-A捕获中断子程序</P>
<P>{</P>
<P>unsigned int temp;</P>
<P> EvaRegs.EVAIFRC.bit.CAP1INT=1;//
清捕获中断1标志位</P>
<P> capnum1=EvaRegs.CAP1FIFO;</P>
<P> capnum2=EvaRegs.CAP1FIFO;</P>
<P> if(capnum2 > capnum1)</P>
<P>
temp = capnum2-capnum1;</P>
<P> else</P>
<P>
temp = capnum2+(0xFFFF-capnum1);</P>
<P> pinlvf[fnum++] =temp;</P>
<P> if(fnum>4)
fnum=0;//取5个数值后回零</P>
<P> f= 2343750.0/(float)temp;//f=
150M/64/temp</P>
<P> PieCtrl.PIEACK.bit.ACK3 =
1;//开外设中断应答</P>
<P>}</P>
<P><B>结语</B><B> </B></P>
<P>本文给出了基于DSP芯片TMS320F2812的一种测频方法,主要利用了其自带的片内外设事件管理器的捕获功能。方法简单,实时性好,所测频率精度达到10<SUP>-3</SUP>,完全能够满足电力系统中经常要用到的测频精度。并已在电网自动化FTU上应用,有较大的实用价值。</P>
<P>
<B>参</B><B> </B><B>考</B><B> </B><B>文</B><B> </B><B>献<A
href="http://www.51kaifa.com/"><FONT color=#ffffff
size=1><U>欢迎访问无忧电子开发网</U></FONT></A><FONT size=1><FONT
color=#ffffff>(</FONT><A href="http://www.51kaifa.com/jswz"><FONT
color=#ffffff><U>技术文章</U></FONT></A><FONT color=#ffffff> </FONT><A
href="http://www.51kaifa.com/zxyd"><FONT
color=#ffffff><U>在线阅读</U></FONT></A><FONT color=#ffffff> </FONT><A
href="http://www.51kaifa.com/shop"><FONT
color=#ffffff><U>在线商城</U></FONT></A><FONT
color=#ffffff>)</FONT></FONT></B><B></B></P>
<P>[1]TMS320F2810,TMS320F2812 Digital Signal Processors Data Manual.Texas
Instrument,2002.</P>
<P>[2] TMS320F28x Event Manager (EV) Peripheral Reference Guide.Texas
Instrument,2002.</P>
<P>[3]张卫宁.TMS320C28x系列DSP的CPU与外设(上,下).清华大学出版社.</P>
<P>[4]包明,赵明富,郭建华,等.基于FPGA的高速高精度频率测量的研究.单片机与嵌入式系统应用,2003,(2):31-33.</P>
<P>[5]吴文全,束华. 基于单片机的多周期完全同步测频技术.电子技术应用,2004,(4):20-21</P>
<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
<TBODY>
<TR>
<TD align=right
width="23%"> (全文结束)</TD></TR></TBODY></TABLE><BR></TD></TR>
<TR>
<TD class=Article_tdbgall align=right
colSpan=2>文章录入:fengfeiyi 责任编辑:fengfeiyi
</TD></TR>
<TR>
<TD width=5></TD>
<TD width=752>
<LI>上一篇文章: <A class=LinkPrevArticle
title="文章标题:基于16位定点DSP的并行乘法器的设计 作 者:王叶辉 林贻侠 严伟 更新时间:2006-5-15 20:40:14"
href="http://www.21control.com/DSP/DSPtech/200605/DSP_20060515204014.html">基于16位定点DSP的并行乘法器的设计</A><BR>
<LI>下一篇文章: 没有了</LI></TD></TR>
<TR class=Article_tdbgall align=right>
<TD colSpan=2>【<A
href="http://www.21control.com/DSP/Comment.asp?ArticleID=3006"
target=_blank>发表评论</A>】【<A
href="http://www.21control.com/User/User_Favorite.asp?Action=Add&ChannelID=1005&InfoID=3006"
target=_blank>加入收藏</A>】【<A
href="http://www.21control.com/DSP/SendMail.asp?ArticleID=3006"
target=_blank>告诉好友</A>】【<A
href="http://www.21control.com/DSP/Print.asp?ArticleID=3006"
target=_blank>打印此文</A>】【<A href="javascript:window.close();">关闭窗口</A>】
</TD></TR></TBODY></TABLE>
<TABLE class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center
border=0>
<TBODY>
<TR>
<TD class=main_shadow></TD></TR></TBODY></TABLE><!--文章显示代码结束--><!--最新热点、最新推荐、相关文章代码开始-->
<TABLE class=center_tdbgall style="WORD-BREAK: break-all" cellSpacing=0
cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD class=main_title_282 width="33%"><B>最新热点</B></TD>
<TD width=5 rowSpan=2></TD>
<TD class=main_title_282 width="33%"><B>最新推荐</B></TD>
<TD width=5 rowSpan=2></TD>
<TD class=main_title_282 width="33%"><B>相关文章</B></TD></TR>
<TR>
<TD class=main_tdbg_760 vAlign=top height=100>
<SCRIPT language=javascript
src="基于TMS320F2812事件管理器的一种测频方法.files/Article_Hot3.js"></SCRIPT>
</TD>
<TD class=main_tdbg_760 vAlign=top width="33%">
<SCRIPT language=javascript
src="基于TMS320F2812事件管理器的一种测频方法.files/Article_Elite3.js"></SCRIPT>
</TD>
<TD class=main_tdbg_760 vAlign=top width="33%">没有相关文章</TD></TR></TBODY></TABLE>
<TABLE class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center
border=0>
<TBODY>
<TR>
<TD class=main_shadow></TD></TR></TBODY></TABLE><!--最新热点、最新推荐、相关文章代码结束--><!--网友评论代码开始-->
<TABLE class=center_tdbgall style="WORD-BREAK: break-all" cellSpacing=0
cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR class=main_title_760>
<TD height=25> <IMG src="基于TMS320F2812事件管理器的一种测频方法.files/TEAM.gif"
align=absMiddle> <STRONG>网友评论:</STRONG>(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
</TD></TR>
<TR>
<TD class=main_tdbg_760>
<SCRIPT language=javascript
src="基于TMS320F2812事件管理器的一种测频方法.files/Comment.htm"></SCRIPT>
</TD></TR></TBODY></TABLE>
<TABLE class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center
border=0>
<TBODY>
<TR>
<TD class=main_shadow></TD></TR></TBODY></TABLE><!--网友评论代码结束--><!-- ********网页中部代码结束******** --><!-- ********网页底部代码开始******** -->
<TABLE class=Bottom_tdbgall style="WORD-BREAK: break-all" cellSpacing=0
cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR align=middle>
<TD class=Bottom_Adminlogo colSpan=2>| <A class=Bottom
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.21control.com');"
href="http://www.21control.com/DSP/DSPtech/200605/DSP_20060520204705.html#">设为首页</A>
| <A class=Bottom
href="javascript:window.external.addFavorite('http://www.21control.com','嵌入式控制研究室');">加入收藏</A>
| <A class=Bottom href="mailto:rouder@163.com">联系站长</A> | <A class=Bottom
href="http://www.21control.com/FriendSite/Index.asp"
target=_blank>友情链接</A> | <A class=Bottom
href="http://www.21control.com/Copyright.asp" target=_blank>版权申明</A> | <A
class=Bottom href="http://www.21control.com/Admin/Admin_Index.asp"
target=_blank>管理登录</A> | </TD></TR>
<TR class=Bottom_Copyright>
<TD width="20%"><IMG height=55
src="基于TMS320F2812事件管理器的一种测频方法.files/powerease_logo.gif" width=165></TD>
<TD width="80%"><BGCOLOR="#FFFFFF" height="20" align="center"><FONT
color=#333333>Copyright © 2005<B>www.21control.com
嵌入式控制技术研究室</B> 版权所有 <BR><FONT color=#333333>
</FONT></FONT>站长:<A href="mailto:rouder@163.com">康草科技</A>
</TD></TR></TBODY></TABLE><!-- ********网页底部代码结束******** --><NOSCRIPT><IFRAME
src="基于TMS320F2812事件管理器的一种测频方法.files/ClassTree.htm" width=0
height=0></IFRAME></IFRAME></NOSCRIPT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -