网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 61IC中国电子在线 >> DSP >> C2000文章 >> C28X系列 >> 文章正文
  TMS320F2812的延时程序(完整)         ★★★ 【字体:
TMS320F2812的延时程序(完整)
作者:admin    文章来源:本站原创    点击数:    更新时间:2004-7-20    

.def _DSP28x_usDelay

;====================================================
;Delay Function 
;The C assembly call will look as follows: 
;
;  extern void Delay(long time);                

;        MOV   AL,#LowLoopCount
;        MOV   AH,#HighLoopCount
;        LCR   _Delay
;
;Or as follows (if count is less then 16-bits):
;
;        MOV   ACC,#LoopCount
;        LCR   _Delay


        .global  __DSP28x_usDelay
_DSP28x_usDelay:
        SUB    ACC,#1
        NOP
        NOP
        BF     _DSP28x_usDelay,GEQ    ;; Loop if ACC >= 0
        LRETR 

;There is a 9/10 cycle overhead and each loop
;takes five cycles. The LoopCount is given by
;the following formula:

;  DELAY_CPU_CYLES = 9 + 5*LoopCount

; LoopCount = (DELAY_CPU_CYCLES - 9) / 5

;==================================================
--


RE:我是这么调用的(C语言)
extern void DSP28x_usDelay(long time);
在需要延时的地方加入
DSP28x_usDelay(0x100000);//根据延迟时间写入参数

               欢迎点击进入:TI德州中文网   (国内唯一针对TI应用的中文技术网站)    文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    TMS320F2812的SPWM原程序
    基于LabVIEW和TMS320F2812的…
    TMS320F2812的CAN调试成功经…
    基于TMS320F2812和μC/OS II…
    TMS320F2812 全局汇编函数
    TMS320F2812 CMD 文件各段含…
    基于TMS320F2812集中供电系统…
    TMS320F2812的CMD文件配置详…
    基于TMS320F2812的多轴伺服控…
    利用TMS320F2812 DSP&DRV592…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61IC 湘ICP备05002478号